Enzyme: No forward mode derivative found
- Dominant language
- LLVM
- Stars
- 1.7k
- Forks
- 188
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 26
Description
Hi, I am trying to use the Enzyme forward mode for a function inside a large OOP C++ codebase for scientific computing. All the code have been compiled using LLDEnzyme in combination with LTO (clang version 18.1.3, with the latest Enzyme).
Now, I'm encountering the following error :
in function preprocess__xyz_ void (ptr, ptr, ptr, ptr, ptr): Enzyme: No forward mode derivative found for _ZN4_yyyy_EES5_S9_
at context: tail call void @_ZN4_xyz_EES5_S9_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(400) %1, ptr noundef nonnull align 8 dereferenceable(400) %2, ptr noundef nonnull align 8 dereferenceable(400) %3, ptr noundef nonnull align 8 dereferenceable(400) %4) #35, !dbg !287
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
The function to be derived is a member function of an object, and I used a wrapper function as mentioned in the repository example section.
Any idea for the source of this error?
Thanks!
Saleh
Contributor guide
Research direction
No source files or tests are named. Start by reducing the member-function wrapper to a minimal C++ reproducer and inspect the generated LLVM/LTO call where Enzyme reports no forward-mode derivative; done means documenting a reproducible diagnosis for the missing derivative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100