Skip to content

Commit

Permalink
Add numba.cuda path to NVRTC include path
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarkall committed Aug 2, 2023
1 parent ad931f8 commit dc112f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion numba/cuda/cudadrv/nvrtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
NvrtcSupportError)

import functools
import os
import threading
import warnings

Expand Down Expand Up @@ -233,7 +234,11 @@ def compile(src, name, cc):
major, minor = cc
arch = f'--gpu-architecture=compute_{major}{minor}'
include = f'-I{config.CUDA_INCLUDE_PATH}'
options = [arch, include, '-rdc', 'true']

cudadrv_path = os.path.dirname(os.path.abspath(__file__))
numba_cuda_path = os.path.dirname(cudadrv_path)
numba_include = f'-I{numba_cuda_path}'
options = [arch, include, numba_include, '-rdc', 'true']

# Compile the program
compile_error = nvrtc.compile_program(program, options)
Expand Down

0 comments on commit dc112f4

Please sign in to comment.