Comments (8)
What version/commit are you on?
We should handle that so I'm a bit surprised but if you get that on the main branch we definitely will fix it!
from enzyme.
Hi @wsmoses , thanks for your reply. Indeed I was on a outdated version and now I was trying to build Enzyme on lastest master. However met the issue:
error: ‘ElementType’ is not a member of ‘llvm::Attribute::AttrKind’
I am wondering if there is a recommended LLVM for the latest Enzyme build? Thanks.
from enzyme.
Ah sorry I just meant the latest Enzyme not the latest LLVM. Probably the latest stable release so 16? We generally try to keep up with llvm head (and compiler as of a few days ago), but someone could push a temporary breaking change that takes us time to learn about and adapt to.
from enzyme.
Hi @wsmoses . Thanks for the suggestion. I have successfully built LLVM (16.0.6) and Enzyme (latest main). And met the issue below:
~/llvm-project/build/bin/clang++ -mllvm -max-heap-to-stack-size=1000000 -I /usr/local/cuda-11.4/include -I /home/bx2k/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I /home/bx2k/.local/lib/python3.8/site-packages/torch/include -I ./src/ -I . -ffast-math --cuda-path=/usr/local/cuda-11.4 --cuda-gpu-arch=sm_86 -std=c++14 -Xclang -load -Xclang ~/Enzyme/enzyme/build/Enzyme/ClangEnzyme-16.so -Rpass=enzyme -mllvm -enzyme-max-cache -DALLOCATOR -DABI -O3 -DALLOW_AD=1 -mllvm -enzyme-new-cache=1 -mllvm -enzyme-mincut-cache=1 -DSIZE=20 -mllvm -enzyme-phi-restructure=0 -mllvm -enzyme-coalese -mllvm -enzyme-loop-invariant-cache=1 -c src/raymarching.cu -o src/raymarching.o -D_GLIBCXX_USE_CXX11_ABI=0
ptxas fatal : Unresolved extern function '_Z17__enzyme_autodiffPviPKfPfiS1_S2_iS1_S2_iS1_S2_iS1_S2_iS1_S2_iS1_S2_ijjPKi'
clang-16: error: ptxas command failed with exit code 255 (use -v to see invocation)
clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
Target: x86_64-unknown-linux-gnu
The compile command line was working fine on Enzyme commit ec75831a8cb0170090c366f8da6e3b2b87a20f6e
. Would you mind please giving any suggestions? Thanks.
from enzyme.
For newer LLVM's the way to load the pass is -fpass-plugin=/path/to/ClangEnzyme-XX.so.
This is technically documented here (https://enzyme.mit.edu/getting_started/Faq/#opt-cant-find--enzyme-option), but very hard to find.
Any PR's to our docs (github.com/EnzymeAD/www) are very appreciated!
from enzyme.
For newer LLVM's the way to load the pass is -fpass-plugin=/path/to/ClangEnzyme-XX.so.
This is technically documented here (https://enzyme.mit.edu/getting_started/Faq/#opt-cant-find--enzyme-option), but very hard to find.
Any PR's to our docs (github.com/EnzymeAD/www) are very appreciated!
Thanks for your reply. For the newer LLVM, I met some Unknown command line argument issues. These arguments include enzyme-max-cache
, enzyme-mincut-cache
, enzyme-aggressive-aa
, enzyme-phi-restructure
, enzyme-loop-invariant-cache
. I am wondering are there any changes to these arguments (renamed/removed/hidden etc)? Or is it only the newer LLVM issue?
~/llvm-project/build/bin/clang++ -mllvm -max-heap-to-stack-size=1000000 -I /usr/local/cuda-11.4/include -I /home/bx2k/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I /home/bx2k/.local/lib/python3.8/site-packages/torch/include -I ./src/ -I . -ffast-math --cuda-path=/usr/local/cuda-11.4 --cuda-gpu-arch=sm_86 -std=c++14 -fpass-plugin=/home/bx2k/Enzyme/enzyme/build/Enzyme/ClangEnzyme-16.so -Rpass=enzyme -mllvm -enzyme-max-cache -DALLOCATOR -DABI -O3 -DALLOW_AD=1 -c src/raymarching.cu -o src/raymarching.o -D_GLIBCXX_USE_CXX11_ABI=0
clang (LLVM option parsing): Unknown command line argument '-enzyme-max-cache'. Try: 'clang (LLVM option parsing) --help'
from enzyme.
Since @tgymnich recently in a different GH issue commented on how to use command line flags on newer llvm's, I'll copy the link here #1295 (comment)
Separately, since I presume you copied those flags from the SC21 artifact repo, in most cases you shouldn't need to add those flags (and they were used for performing an ablation study on the impact of those optimizations -- the default values should be reasonably performant, and if not we should fix them).
from enzyme.
Thanks for the reply!
from enzyme.
Related Issues (20)
- Asan reports `stack-use-after-scope` HOT 3
- Does multisource work? HOT 17
- ninja: build stopped: subcommand failed. HOT 1
- Adding an advanced option flag with Enzyme CMake HOT 2
- Support LLVM 17 HOT 1
- Dose Auto Diff CUDA Kernel available now?
- Segmentation fault on Kalman example HOT 2
- Performed illegal update analysis on Kalman example HOT 11
- Correctness Issue 1 with Kalman Filter HOT 1
- Correctness Issue 2 with Kalman Filter (with DGEMM warning) HOT 1
- Error when differentiating Explicit template class HOT 5
- DiffUse Bug
- The llvm::Type::getInt8PtrTy API is removed in LLVM. HOT 1
- "caching potentially capturing/offset of allocation" crash
- Can not handle `@llvm.maximum.f32(float %38, float %39)` HOT 4
- `Cannot deduce adding type of: i32` when function is defined in seperate include file HOT 5
- Enzyme mutates enzyme_const array when optimization flag -O1 or further used
- cannot handle unknown binary operator: %5 = sub nsw i64 1597463007, %4 HOT 5
- Compilation error, "Cannot deduce type of copy" / -enzyme-print-activity HOT 4
- Support for x86_fp80 (long double) HOT 2
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.