-
Notifications
You must be signed in to change notification settings - Fork 4
Improves the backend debugging guide #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/debug_backend.md
) by incorporating additional debugging techniques and clarifying existing steps
src/debug_backend.md
Outdated
Please create an issue on [https://github.com/EnzymeAD/Enzyme/issues](github) and share `mwe.ll` and (if you have it) `reduced.ll`, as well as links to the compiler explorer. Please feel free to also add your Rust code or a link to it. With that, hopefully someone from the Enzyme core repository will be able to fix your bug. Once that happened, I will update the Enzyme submodule inside the rust compiler, which should allow you to now differentiate your Rust code. Thanks for helping us to improve Rust-AD. | ||
Please create an issue on [https://github.com/EnzymeAD/Enzyme/issues](https://github.com/EnzymeAD/Enzyme/issues) and share `mwe.ll` and (if you have it) `reduced.ll`, as well as links to the compiler explorer. Please feel free to also add your Rust code or a link to it. | ||
|
||
**Documenting Findings:** Some Enzyme errors, like `"Attempting to call an indirect active function whose runtime value is inactive"`, have historically caused confusion. If you investigate such an issue, even if you don't find a complete solution, please consider documenting your findings (e.g., in the Enzyme issue or by proposing an update to these docs). This helps prevent others from starting from scratch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it’s not rust specific, can you suggest first adding to the overall Enzyme docs (github.com/EnzymeAD/www)
src/debug_backend.md
Outdated
|
||
**Documenting Findings:** Some Enzyme errors, like `"Attempting to call an indirect active function whose runtime value is inactive"`, have historically caused confusion. If you investigate such an issue, even if you don't find a complete solution, please consider documenting your findings (e.g., in the Enzyme issue or by proposing an update to these docs). This helps prevent others from starting from scratch. | ||
|
||
With a clear reproducer and documentation, hopefully someone from the Enzyme core repository will be able to fix your bug. Once that happens, the Enzyme submodule inside the rust compiler will be updated, which should allow you to differentiate your Rust code. Thanks for helping us to improve Rust-AD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: EnzymeAD/Enzyme isn’t called Enzyme core, perhaps rephrase “someone from the Enzyme core repository” => “an Enzyme developer”
src/debug_backend.md
Outdated
## 5) Report your bug. | ||
|
||
Afterwards, you should be able to copy and paste your `mwe.ll` (and `reduced.ll`) example into our [compiler explorer](https://enzyme.mit.edu/explorer/). | ||
Afterwards, you should be able to copy and paste your `mwe.ll` (or `reduced.ll`) example into the [Enzyme compiler explorer](https://enzyme.mit.edu/explorer/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not: honestly the world “our” is fine here
requested changes are done, can you review it again and merge it if there are no more edits |
Thanks! |
Changes include:
std::hint::black_box
andextern "..."
to control LLVM-IR generation.largely based on suggestions from ZuseZ4 in issue EnzymeAD/rust#193 (comment).