You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
austingarrett:build $ cmake -DEnzyme_DIR=$PWD/../../extern/Enzyme/enzyme/build .. && make && ./test
CMake Version: 3.25.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/austin-garrett/src/Enzyme-Bug/working/build
[ 50%] Building CXX object CMakeFiles/test.dir/main.cpp.o
/home/austin-garrett/src/Enzyme-Bug/working/main.cpp:44:8: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
auto [a, b, c] = grad_logpdf(x, mu, std);
^~~~~~~~~
1 warning generated.
[100%] Linking CXX executable test
ld.lld: error: <unknown>:0:0: infunction_Z11grad_logpdfddd void (ptr, double, double, double): Enzyme: Cannot cast __enzyme_autodiff primal argument 1, found i32 0, type i32 - to arg 0 ptr
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/test.dir/build.make:97: test] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Removing cmake_minimum_required(VERSION 3.25.1) gives the following output:
austingarrett:build ⟩ cmake -DEnzyme_DIR=$PWD/../../extern/Enzyme/enzyme/build .. && make && ./test
CMake Version: 3.25.1
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.25)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/austin-garrett/src/Enzyme-Bug/working/build
[ 50%] Building CXX object CMakeFiles/test.dir/main.o
/home/austin-garrett/src/Enzyme-Bug/working/main.cpp:44:8: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
auto [a, b, c] = grad_logpdf(x, mu, std);
^~~~~~~~~
1 warning generated.
[100%] Linking CXX executable test
[100%] Built target test
logprob = -1.043939
dlogprob/dx[i] = [-0.500000, 0.500000, -0.750000]
Note it's still CMake version 3.25.1, which leads me to think it's the directive itself causing issues.
The text was updated successfully, but these errors were encountered:
Tested with
clang
version15.0.7
on Ubuntu.The
main.cpp
:The
CMakeLists.txt
:Output:
Removing
cmake_minimum_required(VERSION 3.25.1)
gives the following output:Note it's still
CMake
version3.25.1
, which leads me to think it's the directive itself causing issues.The text was updated successfully, but these errors were encountered: