-
Notifications
You must be signed in to change notification settings - Fork 129
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
CMakeLists.txt Improvements for CUDA #1337
Conversation
- Bumped cmake minimim version to 3.17 - Changed `DACE_LIBS` element to `CUDA::cudart` - Removed unneeded `include_directories` and link_directories calls - Removed `compile_cuda`. CUDA files are now passed directly to targets - Removed `-fPIC` and `-std` args from nvcc as they are handled automatically now - Renamed `CUDA_NVCC_FLAGS` to `CMAKE_CUDA_FLAGS`
- Moved `-gencode` handling to `cmake`: cmake variable `DACE_CUDA_ARCHITECTURES_DEFAULT` is set in python code to be used by `CMAKE_CUDA_ARCHITECTURES` instead of manually creating the compiler arg string. - Default cuda arch is no longer included forcefully in presence of a native architecture - `get_cuda_arch.cpp` now returns a properly formatted architecture string compatible with cmake. - `get_cuda_arch.cpp` now fails if no architectures are found
This reverts commit abdfc88.
|
@kylosus thank you, I'll take a look |
I think it's because the old cmake links to static |
This is something we considered, but cannot reliably implement in the code generator without significant effort. |
Handled automatically since spcl#1337
Hi, what's the status of this PR? Looks like this would be a nice change for DaCe? |
@BenWeber42 It shoud be ready to merge, but the cmake can probably be improved further. I didn't touch parts unrelated to CUDA. |
Ok, thanks for the clarification. I think it's easiest to have this PR only be about CUDA related improvements to the CMakeLists.txt (I edited the title accordingly). Could you maybe merge latest master into this branch? Since it hasn't been synced in quite a while. |
Seems fine |
There was a segfault in the gpu test. I restarted it... |
The failing test had been silently ignored until this PR. See the discussion above |
@BenWeber42 @kylosus I fixed this test in #1441. Turns out there were some invalid (empty) ranges in the maps of one of the tests |
Just approved the fix. Thanks again. That's great, then it looks like we should continue here as follows:
|
Fixes invalid ranges used in a test. Opened following #1337
@kylosus could you please update this PR to the latest master? I fixed the issue you were observing. |
This PR bumps
cmake
version to3.17
and replaces the deprecatedfind_package(CUDA)
with FindCUDAToolkit, with a number of improvements to the compilation process:cmake
CMakeLists.txt
or manual-gencode
string generation in python code.OpenMP
andThreads
targets