-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Enzyme should be loaded on-demand at runtime #143295
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-autodiff`#![feature(autodiff)]``#![feature(autodiff)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-autodiff`#![feature(autodiff)]``#![feature(autodiff)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for Enhancement.
This is an enhancement request for the sake of making the Enzyme autodiff functionality more maintainable: load Enzyme at runtime, on demand, via a mechanism like dlopen. My understanding is that both T-infra (or at least @Kobzol) and the relevant autodiff lead (@ZuseZ4) are interested in seeing this happen, because it would help decouple the Enzyme bindings and thus the infrastructure maintenance required to ship Enzyme support.
I do not fully understand what Enzyme actually "is" (is it actually a shared object that is loaded by LLVM? or do you open it and then it runs LLVM? or do you just have both in the same address space and then... magic happens?) so I cannot describe further what is required other than that. I am opening this issue so we can better identify and track
@rustbot label: +C-enhancement +F-autodiff +A-LLVM +T-compiler +T-infra +T-libs
Footnotes
"statically" in this case means "required dynamic linkage", so it is loaded by the dynamic loader upon loading
librustc_driver.so↩