blt icon indicating copy to clipboard operation
blt copied to clipboard

Revamp CUDA support in BLT

Open gzagaris opened this issue 4 years ago • 4 comments

The CMake code in SetupCUDA.cmake seems to be relying on both find_package(CUDA), which was deprecated since CMake 3.10, and the modern first-class CUDA language support in CMake.

Using both is confusing.

This part can be refined and cleaned up quite a bit and we should consider leveraging FindCUDAToolkit(https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html#) that is available with newer versions of CMake as applicable.

gzagaris avatar Apr 28 '20 01:04 gzagaris

Just to add to this issue so it's not forgotten. At the time this line (https://github.com/LLNL/blt/blob/0d71af8d3ac0ea1abeb8983a201013753a857a35/cmake/SetupCompilerOptions.cmake#L268) was implemented, CMake did not support C++17 or higher when compiling CUDA. Newer versions of CMake now support all the way up to C++20. This check should be improved to check which CMake version you are running and error out only if that version doesn't support higher C++ standards.

white238 avatar Jul 28 '20 18:07 white238

For versions of CMake where FindCUDAToolkit is not available, https://gitlab.kitware.com/cmake/cmake/-/issues/17816 describes how similar functionality can be implemented without relying on FindCUDA.cmake.

joshessman-llnl avatar Nov 04 '20 17:11 joshessman-llnl