Skip to content

Commit 98bd3a9

Browse files
committed
Correct include dir location on Windows
Windows doesn't seem to place the headers under targets - instead they're installed at `$env:CONDA_PREFIX\Library\include`.
1 parent 763e185 commit 98bd3a9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

numba_cuda/numba/cuda/cuda_paths.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,11 @@ def get_conda_include_dir():
297297
if not is_conda_env:
298298
return
299299

300-
target_name = get_current_cuda_target_name()
301-
302-
if target_name:
300+
if platform.system() == "Windows":
301+
include_dir = os.path.join(
302+
sys.prefix, 'Library', 'include'
303+
)
304+
elif target_name := get_current_cuda_target_name():
303305
include_dir = os.path.join(
304306
sys.prefix, 'targets', target_name, 'include'
305307
)

0 commit comments

Comments
 (0)