Skip to content

Commit 6ee0d4d

Browse files
committed
Skips relying on include dir should use correct include dir
1 parent 521b59d commit 6ee0d4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numba_cuda/numba/cuda/testing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,16 @@ def skip_on_arm(reason):
115115
def skip_if_cuda_includes_missing(fn):
116116
# Skip when cuda.h is not available - generally this should indicate
117117
# whether the CUDA includes are available or not
118-
cuda_h = os.path.join(config.CUDA_INCLUDE_PATH, 'cuda.h')
118+
cuda_include_path = libs.get_cuda_include_dir()
119+
cuda_h = os.path.join(cuda_include_path, 'cuda.h')
119120
cuda_h_file = (os.path.exists(cuda_h) and os.path.isfile(cuda_h))
120121
reason = 'CUDA include dir not available on this system'
121122
return unittest.skipUnless(cuda_h_file, reason)(fn)
122123

123124

124125
def skip_if_curand_kernel_missing(fn):
125-
curand_kernel_h = os.path.join(config.CUDA_INCLUDE_PATH, 'curand_kernel.h')
126+
cuda_include_path = libs.get_cuda_include_dir()
127+
curand_kernel_h = os.path.join(cuda_include_path, 'curand_kernel.h')
126128
curand_kernel_h_file = (os.path.exists(curand_kernel_h) and
127129
os.path.isfile(curand_kernel_h))
128130
reason = 'curand_kernel.h not available on this system'

0 commit comments

Comments
 (0)