Skip to content

Commit

Permalink
Correctly infer CUDA compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorostsa committed Jun 25, 2024
1 parent 0dac722 commit f97104d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/core/config/include/hpx/config/compiler_specific.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@
#endif

// Detecting CUDA compilation mode
// TODO: ensure __NVCC__ is enough to infer nvcc and review the macros.
// Detecting NVCC
#if defined(__NVCC__) || defined(__CUDACC__)
#if defined(__NVCC__)
// NVCC build version numbers can be high (without limit?) so we leave it out
// from the version definition
# define HPX_CUDA_VERSION (__CUDACC_VER_MAJOR__*100 + __CUDACC_VER_MINOR__)
Expand All @@ -108,7 +109,7 @@
# define HPX_COMPUTE_DEVICE_CODE
# endif
// Detecting Clang CUDA
#elif defined(__clang__) && defined(__CUDA__)
#elif defined(__clang__) && defined(__CUDACC__)
# define HPX_COMPUTE_CODE
# if defined(__CUDA_ARCH__)
// clang compiling CUDA code, device mode.
Expand Down

0 comments on commit f97104d

Please sign in to comment.