Comments (5)
Mind pasting the whole file (perhaps in an Enzyme explorer link enzyme.mit.edu/explorer)?
from enzyme.
https://fwd.gymni.ch/CmHXUs. When implementing the f in a CPP file, the Enzyme tool crashes with the following error message:
[2/3] Building CXX object CMakeFiles/testEnzyme.dir/main.cpp.o
FAILED: CMakeFiles/testEnzyme.dir/main.cpp.o
/home/linuxbrew/.linuxbrew/bin/clang++ -std=gnu++17 -O3 -DNDEBUG -fcolor-diagnostics -fplugin=/home/linuxbrew/.linuxbrew/Cellar/enzyme/0.0.89/lib/ClangEnzyme-16.so -MD -MT CMakeFiles/testEnzyme.dir/main.cpp.o -MF CMakeFiles/testEnzyme.dir/main.cpp.o.d -o CMakeFiles/testEnzyme.dir/main.cpp.o -c /mnt/c/Users/alijm/CLionProjects/testEnzyme/main.cpp
error: Enzyme: No reverse pass found for _ZNK7MyClassIdE1fEd
at context: %3 = tail call noundef double @_ZNK7MyClassIdE1fEd(ptr noundef nonnull align 8 dereferenceable(8) %1, double noundef %0) #9
from enzyme.
Ah sorry I didn't fully read your post properly. If you have the function in a different cpp file and Enzyme deduces it needs to be diffeerentiated (it detects this here), you need to enable multisource support with LLDEnzyme or an alternate mechanism.
from enzyme.
So use LLDEnzyme flags instead of clang, or do I need to add anything else?
from enzyme.
We updated our docs here to describe the differences: https://enzyme.mit.edu/getting_started/UsingEnzyme/#differentiating-cc
It also contains a link to a cmake template which hopefully works for you, please let us know if not!
from enzyme.
Related Issues (20)
- Clarify usage through linking HOT 10
- Failing unittest Enzyme/ReverseMode/gsl_sf_legendre_array_e.ll
- Enzyme C++ sugar for vector input/outputs HOT 2
- Batching for Vector Intrinsics
- Syntax for custom forward rule in C? HOT 4
- How to use enzyme in my makefile? HOT 2
- Compiling with -O{1,2,3} breaks custom rule that works with -O0 HOT 2
- incorrect gradient for if statement HOT 2
- Failure with new c++ sugar
- Enzyme TA expectations/issues HOT 5
- C++ interface TODO list HOT 13
- No pass found for various GSL FFT and Statistics methods
- Enzyme derivatives attempting to free stack allocations HOT 4
- Unexpected Compiler Error in Rust Enzyme Bindings for Forward Autodiff HOT 4
- Enzyme failed to support atomicAdd, atomicCAS, and assert for cuda code HOT 1
- Outstanding nuances in the C++ sugar HOT 1
- Forward Mode Cuda ldg error
- Failing to erase fictitious PHI nodes
- Enzyme warns `freeing without malloc` on allocated pointers
- OpenStack github runners down? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enzyme.