-
Notifications
You must be signed in to change notification settings - Fork 95
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
Undefined symbols for __enzyme_autodiff(...) #197
Comments
What version of llvm/clang are you using? |
sorry, forgot to add that. Clang 11.1.0 |
No worries, ok that rules out the new pass manager causing disruption. What version of Enzyme did you use (and how did you build/install it)? Also which clang are you using (apple installed version, homebrew, or something distinct)? Just to double check, mind pasting the output of |
sorry for the delay in responding, I've only been working on this in the evenings. I believe that I am using the apple installed clang version. The output from clang++ --version is: clang version 11.1.0 I am using Enzyme 0.0.9 (I installed it a few weeks ago and haven't updated since). I installed it via homebrew on macOS Big Sur. |
A brief update, I've updated enzyme to 0.0.11 and clang 12.0.0. And I'm pretty sure it's clang via homebrew not apple's version. Unfortunately, the missing symbol issue is still happening post update. |
Hi Chris, Do you mind trying to add -lowerinvoke prior to calling Enzyme within opt, then trying again?
|
Also note that it appears homebrew has updated to LLVM 12, but has the default Enzyme install on LLVM 11, so you may also need to be explicit in using the right Clang (I'll update homebrew to keep enzyme at 12 as well shortly).
|
Thanks. The use of -lowerinvoke solved the missing symbols issue. It might be worth noting that I switched to a docker image that I created as an Enzyme playground. Not sure if you think something like that is useful for others to experiment around with. But if so, I could try to find a way to share it (dockerfile pull request or an image on dockerhub). |
Following up here quickly (apologies on the delay as had a paper hackathon this weekend). The lowerinvoke should now no longer be needed regardless. As do your docker playground that would definitely be useful! If you build one, would you mind adding it to the website (the www branch of this repo)? |
No problem, know the feeling regarding papers. I just wanted to close the issue as it wasn't a problem any more. Yeah, I can add a brief description/instructions to the website (aside from putting an image on dockerhub). But I will have to check if I have to run the dockerfile/image and the text for the website through the release process at work first. So it could potentially take a few weeks. |
Not sure if you use Docker, but I just pushed an image to Docker Hub set up with Enzyme for C/C++. It can be found under chrislupp/enzyme-playground. I'm putting together a brief guide for the website and will file a pull request when done. |
Hi,
I've been trying to assess how to use Enzyme together with more complex codes (that use Eigen) and created a pretty simple C++ test program:
I've been compiling it with the following:
I've tried to base all of the above on other examples (some posted as issues here). Several of the other examples compile and link properly. Unfortunately, it seems that the autodiffed function for my example never makes it into the executable, because I get a missing symbol error on linking:
That's kind of perplexing to me, because other examples I build don't seem to have this issue. I've also tried more explicit declarations of the autodiff functions, but no luck. Am I missing something fundamental here, or are there any pointers you could give me to resolve this. Thanks!
The text was updated successfully, but these errors were encountered: