Skip to content

Add more info about where autodiff can be applied#154795

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
ZuseZ4:autodiff-general-docs
Apr 7, 2026
Merged

Add more info about where autodiff can be applied#154795
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
ZuseZ4:autodiff-general-docs

Conversation

@ZuseZ4
Copy link
Copy Markdown
Member

@ZuseZ4 ZuseZ4 commented Apr 4, 2026

It's taken quite a few years, but we finally have a PR open to distribute Enzyme: #154754
I therefore went over the docs once more and noticed we don't explain a lot of the most basic features, which we added over the years and have since taken for granted.

@Sa4dUs, do you think there are more interesting cases that we are missing?

Generally, there's still a lot of complexity in it, especially for people who haven't used Enzyme before.
To some extent, that's just a result of my general design goal to expose all performance-relevant features of Enzyme, and let users explore nice abstractions on top if it, via crates. Since we don't have those nightly users yet, users haven't had time to build nicer abstractions on top of it.

I also feel like a more guided book would be a better first introduction to Enzyme, but for now I just focused on the list of features.

r? @oli-obk

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 4, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 4, 2026

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the autodiff-general-docs branch from 4177aed to df9d50a Compare April 4, 2026 03:36
@rust-log-analyzer

This comment has been minimized.

@Sa4dUs
Copy link
Copy Markdown
Contributor

Sa4dUs commented Apr 4, 2026

in terms of usage cases, not really. maybe mentioning what we can't do? as a user, i'd really appreciate to at least have a general idea of my tool's limitations upfront

@rust-log-analyzer

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the autodiff-general-docs branch from a233712 to 3a7ffdc Compare April 4, 2026 17:20
@ZuseZ4
Copy link
Copy Markdown
Member Author

ZuseZ4 commented Apr 4, 2026

tidy didn't like my dbg statements in the example code, so I replaced it with equality checks, to tell users about the expected outcome.

In theory doing equality comparisons on floats is bad coding style and we shouldn't encourage it via docs, but then again the whole point of compiler based AD is that we know (and check) which IR we generate, so there can't be any missmatches due to rounding. So I guess here it's fine.

@oli-obk
Copy link
Copy Markdown
Contributor

oli-obk commented Apr 7, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

📌 Commit 3a7ffdc has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
…i-obk

Add more info about where autodiff can be applied

It's taken quite a few years, but we finally have a PR open to distribute Enzyme: rust-lang#154754
I therefore went over the docs once more and noticed we don't explain a lot of the most basic features, which we added over the years and have since taken for granted.

@Sa4dUs, do you think there are more interesting cases that we are missing?

Generally, there's still a lot of complexity in it, especially for people who haven't used Enzyme before.
To some extent, that's just a result of my general design goal to expose all performance-relevant features of Enzyme, and let users explore nice abstractions on top if it, via crates. Since we don't have those nightly users yet, users haven't had time to build nicer abstractions on top of it.

I also feel like a more guided book would be a better first introduction to Enzyme, but for now I just focused on the list of features.

r? @oli-obk
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
…i-obk

Add more info about where autodiff can be applied

It's taken quite a few years, but we finally have a PR open to distribute Enzyme: rust-lang#154754
I therefore went over the docs once more and noticed we don't explain a lot of the most basic features, which we added over the years and have since taken for granted.

@Sa4dUs, do you think there are more interesting cases that we are missing?

Generally, there's still a lot of complexity in it, especially for people who haven't used Enzyme before.
To some extent, that's just a result of my general design goal to expose all performance-relevant features of Enzyme, and let users explore nice abstractions on top if it, via crates. Since we don't have those nightly users yet, users haven't had time to build nicer abstractions on top of it.

I also feel like a more guided book would be a better first introduction to Enzyme, but for now I just focused on the list of features.

r? @oli-obk
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
…i-obk

Add more info about where autodiff can be applied

It's taken quite a few years, but we finally have a PR open to distribute Enzyme: rust-lang#154754
I therefore went over the docs once more and noticed we don't explain a lot of the most basic features, which we added over the years and have since taken for granted.

@Sa4dUs, do you think there are more interesting cases that we are missing?

Generally, there's still a lot of complexity in it, especially for people who haven't used Enzyme before.
To some extent, that's just a result of my general design goal to expose all performance-relevant features of Enzyme, and let users explore nice abstractions on top if it, via crates. Since we don't have those nightly users yet, users haven't had time to build nicer abstractions on top of it.

I also feel like a more guided book would be a better first introduction to Enzyme, but for now I just focused on the list of features.

r? @oli-obk
rust-bors bot pushed a commit that referenced this pull request Apr 7, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #150965 (Fix no results when searching for == in doc)
 - #153999 (Remove `TaggedQueryKey::def_kind`)
 - #154146 (Split out the creation of `Cycle` to a new `process_cycle` function)
 - #154147 (Do not attempt generating DllImport for extern types)
 - #154812 (Update Fira Mono License Information)
 - #154880 (bootstrap: minor improvements to download-rustc)
 - #154886 (Stabilize check-cfg suggestions for symbol)
 - #154889 (Update wasm-component-ld to 0.5.22)
 - #154928 (Fix pin docs)
 - #154942 (delegation: generate more verbose error delegation)
 - #153269 (GCI: During reachability analysis don't try to evaluate the initializer of overly generic free const items)
 - #154506 (Migrate some tests from `tests/ui/issues` to appropriate directories)
 - #154673 (Use a different name for fast try builds)
 - #154761 (coretests: add argument order regression tests for min_by/max_by/minmax_by)
 - #154795 (Add more info about where autodiff can be applied)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154825 (constify `Step for NonZero<u*>`)
 - #154837 (library: std: motor: use OS' process::exit in abort_internal)
 - #154866 (add regression test for #146514)
 - #154922 (c-b: Export inverse hyperbolic trigonometric functions)
 - #154931 (delegation(small cleanup): remove not needed PhantomData)
 - #154950 (library: no `cfg(target_arch)` on scalable intrinsics)
@rust-bors rust-bors bot merged commit 3352861 into rust-lang:main Apr 7, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Apr 7, 2026
Rollup merge of #154795 - ZuseZ4:autodiff-general-docs, r=oli-obk

Add more info about where autodiff can be applied

It's taken quite a few years, but we finally have a PR open to distribute Enzyme: #154754
I therefore went over the docs once more and noticed we don't explain a lot of the most basic features, which we added over the years and have since taken for granted.

@Sa4dUs, do you think there are more interesting cases that we are missing?

Generally, there's still a lot of complexity in it, especially for people who haven't used Enzyme before.
To some extent, that's just a result of my general design goal to expose all performance-relevant features of Enzyme, and let users explore nice abstractions on top if it, via crates. Since we don't have those nightly users yet, users haven't had time to build nicer abstractions on top of it.

I also feel like a more guided book would be a better first introduction to Enzyme, but for now I just focused on the list of features.

r? @oli-obk
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 8, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#150965 (Fix no results when searching for == in doc)
 - rust-lang/rust#153999 (Remove `TaggedQueryKey::def_kind`)
 - rust-lang/rust#154146 (Split out the creation of `Cycle` to a new `process_cycle` function)
 - rust-lang/rust#154147 (Do not attempt generating DllImport for extern types)
 - rust-lang/rust#154812 (Update Fira Mono License Information)
 - rust-lang/rust#154880 (bootstrap: minor improvements to download-rustc)
 - rust-lang/rust#154886 (Stabilize check-cfg suggestions for symbol)
 - rust-lang/rust#154889 (Update wasm-component-ld to 0.5.22)
 - rust-lang/rust#154928 (Fix pin docs)
 - rust-lang/rust#154942 (delegation: generate more verbose error delegation)
 - rust-lang/rust#153269 (GCI: During reachability analysis don't try to evaluate the initializer of overly generic free const items)
 - rust-lang/rust#154506 (Migrate some tests from `tests/ui/issues` to appropriate directories)
 - rust-lang/rust#154673 (Use a different name for fast try builds)
 - rust-lang/rust#154761 (coretests: add argument order regression tests for min_by/max_by/minmax_by)
 - rust-lang/rust#154795 (Add more info about where autodiff can be applied)
 - rust-lang/rust#154808 (Post-attribute ports cleanup pt. 1)
 - rust-lang/rust#154825 (constify `Step for NonZero<u*>`)
 - rust-lang/rust#154837 (library: std: motor: use OS' process::exit in abort_internal)
 - rust-lang/rust#154866 (add regression test for rust-lang/rust#146514)
 - rust-lang/rust#154922 (c-b: Export inverse hyperbolic trigonometric functions)
 - rust-lang/rust#154931 (delegation(small cleanup): remove not needed PhantomData)
 - rust-lang/rust#154950 (library: no `cfg(target_arch)` on scalable intrinsics)
github-actions bot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Apr 9, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#150965 (Fix no results when searching for == in doc)
 - rust-lang/rust#153999 (Remove `TaggedQueryKey::def_kind`)
 - rust-lang/rust#154146 (Split out the creation of `Cycle` to a new `process_cycle` function)
 - rust-lang/rust#154147 (Do not attempt generating DllImport for extern types)
 - rust-lang/rust#154812 (Update Fira Mono License Information)
 - rust-lang/rust#154880 (bootstrap: minor improvements to download-rustc)
 - rust-lang/rust#154886 (Stabilize check-cfg suggestions for symbol)
 - rust-lang/rust#154889 (Update wasm-component-ld to 0.5.22)
 - rust-lang/rust#154928 (Fix pin docs)
 - rust-lang/rust#154942 (delegation: generate more verbose error delegation)
 - rust-lang/rust#153269 (GCI: During reachability analysis don't try to evaluate the initializer of overly generic free const items)
 - rust-lang/rust#154506 (Migrate some tests from `tests/ui/issues` to appropriate directories)
 - rust-lang/rust#154673 (Use a different name for fast try builds)
 - rust-lang/rust#154761 (coretests: add argument order regression tests for min_by/max_by/minmax_by)
 - rust-lang/rust#154795 (Add more info about where autodiff can be applied)
 - rust-lang/rust#154808 (Post-attribute ports cleanup pt. 1)
 - rust-lang/rust#154825 (constify `Step for NonZero<u*>`)
 - rust-lang/rust#154837 (library: std: motor: use OS' process::exit in abort_internal)
 - rust-lang/rust#154866 (add regression test for rust-lang/rust#146514)
 - rust-lang/rust#154922 (c-b: Export inverse hyperbolic trigonometric functions)
 - rust-lang/rust#154931 (delegation(small cleanup): remove not needed PhantomData)
 - rust-lang/rust#154950 (library: no `cfg(target_arch)` on scalable intrinsics)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants