Skip to content

Commit

Permalink
Disable building GPU extension if IMPLICIT_DISABLE_CUDA environment v…
Browse files Browse the repository at this point in the history
…ariable is set

Add an option to build implicit without the GPU extension, if the IMPLICIT_DISABLE_CUDA
is set. Closes #446
  • Loading branch information
benfred committed Apr 11, 2022
1 parent fd941d7 commit 88bb71e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions implicit/gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ find_package(CUDAToolkit)
if(CUDAToolkit_FOUND)
if (${CUDAToolkit_VERSION} VERSION_LESS "11.0.0")
message("implicit requires CUDA 11.0 or greater for GPU acceleration - found CUDA ${CUDAToolkit_VERSION}")

elseif(DEFINED ENV{IMPLICIT_DISABLE_CUDA})
# disable building the CUDA extension if the IMPLICIT_DISABLE_CUDA environment variable is set
message("Disabling building the GPU extension since IMPLICIT_DISABLE_CUDA env var is set")

else()
enable_language(CUDA)
add_cython_target(_cuda CXX)
Expand Down

0 comments on commit 88bb71e

Please sign in to comment.