This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
Open
Description
opened on Dec 9, 2021
To manage expectations, we should document what is expected to work already, what we will possibly fix and what is probably
not going to work till we have finished a better Enzyme integration. All issues should be solved in the next iteration.
This overview should be moved into a real documentation..
Not Working, unlikely to be fixed:
- Differentiating a function having one or more
f32
parameters (f64
works andf32
values are allowed inside of the function). - Not ffi-safe types
- Differentiating a function which accepts or uses a
dyn trait
object anywhere. - AD across language barriers
- CUDA and HIP support.
- Using oxide-enzyme in a dependency, rather than in your current main project.
Likely to be fixed
- Only a combined forward+ReverseAD pass is supported at the moment. Enzyme does support ForwardAD and splitting
the forward and reverse pass of ReverseAD. (Working on it). - Differentiating a function which uses parallelism (e.g. rayon) other than OpenMP / MPI.
- Differentiating a function using BLAS / Lapack routines. If you compile them with debug symbols it will already work.
If you use a pre-compiled version it might or might not work, Enzyme doesn't cover all functions yet.
Fixed
- Generating Functions returning one
f64
parameter in the return struct. - Generating Functions returning three or more parameters in the return struct.
Workarounds:
- There is no real workaround for the
dyn trait
issue, since it requires creating a new vTable. You might be lucky if that object
is not interacting with your active values, but that's not granted. - You can cast
f32
tof64
values before passing them to the function and cast them back tof32
inside of your function. - If you want to differentiate functions calling C/C++/Julia/Fortran/... routines, first compile those other languages to
.bc
bitcode files. Look up the build script on where to place them. You might run into some issues due to missing symbols when using other languages, let me know about your experiences. - Similar to differentiating across language barriers. Technically it will work if you use rust wrappers around them or if you use the clang version which we build in
~/.cache/enzyme/rustc-<version>-src
, but that is probably too messy to set up and also requires looking at https://enzyme.mit.edu/getting_started/CUDAGuide/
Metadata
Assignees
Labels
No labels
Activity