Skip to content

Commit f647cce

Browse files
committed
Include "cuda_runtime_api.h" for stdpar_nvhpc only if a GPU has been targeted.
1 parent 3e1e943 commit f647cce

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/plssvm/backends/stdpar/detail/utility.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020

2121
#include "sycl/sycl.hpp" // ::sycl::device
2222
#elif defined(PLSSVM_STDPAR_BACKEND_HAS_NVHPC)
23-
#include "cuda_runtime_api.h"
23+
#if defined(PLSSVM_STDPAR_BACKEND_NVHPC_GPU)
24+
#include "cuda_runtime_api.h"
25+
#endif
2426

2527
#include <cuda/atomic> // cuda::atomic_ref, cuda::thread_scope_device
2628
#elif defined(PLSSVM_STDPAR_BACKEND_HAS_HIPSTDPAR)

0 commit comments

Comments
 (0)