Comments (5)
I peeked at the unreleased Rust Enzyme book and took notice of the macro syntax.
The current syntax is:
#[autodiff(df, Reverse, Active, Active, Active)]
fn f(x: f32, y: f32) -> f32 {
x * x + 3.0 * y
}
Have you considered putting the activity declarations next to the arguments? That way it is clear which declarations are associated with which arguments. Something like:
#[autodiff(df, Reverse, Active)]
fn f(#[active] x: f32, #[active] y: f32) -> f32 {
x * x + 3.0 * y
}
On another note, the book looks great so far. Excellent work as usual.
from rust.
As per zulip discussion we will remove the Return activity in cases where a function returns (), since we anyhow only accept const there and it might confuse users to have to annotate a not existing return.
from rust.
That is in fact supported and I prefer it. I believe for technical reasons, we can't/don't support those inline attributes on the return type.
from rust.
And a word of warning, there are a few syntax bugs in the book currently. I'll fix them (using mdbook test
) as soon as the new rebase is ready.
from rust.
I am mostly without internet till end of year, I'll answer in more details in the first days of January. The inline syntax is supported, unless you apply multiple autodiff macros to the same function.
from rust.
Related Issues (20)
- Recognize misspelled env vars HOT 6
- CI doesn't re-run for follow-up commits HOT 1
- Write more testcases for the fnc_tree parser HOT 1
- could not staticallly determine size of realloc
- Add Apple CI
- Getting `faer` to work with Enzyme HOT 11
- Cannot deduce adding type of: %19 = call { i64, i1 } @llvm.umul.with.overflow.i64 HOT 2
- reproducability between rustc and opt HOT 13
- autodiff: dot product patterns broken in debug HOT 14
- autodiff and rsmpi HOT 8
- Examples do not compile HOT 9
- Failing sin(*x) testcase HOT 3
- TODO: write a propper error handler based on LLVM-extract
- Pin this repo HOT 2
- decltype(auto) llvm::cast(From*) [with To = llvm::VectorType; From = llvm::Type]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type! HOT 7
- Release Mode: illegal hardware instruction (core dumped) HOT 5
- Support Download-CI LLVM HOT 6
- fix no return case HOT 2
- [CI] Updating Enzyme forces LLVM rebuild HOT 2
- Test safety checks in CI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.