File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
numba_cuda/numba/cuda/cudadrv Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33from numba .core import config
44from numba .cuda .cudadrv .error import (NvrtcError , NvrtcCompilationError ,
55 NvrtcSupportError )
6- from cuda .cuda .cudadrv .driver import get_version
76
87import functools
98import os
@@ -106,9 +105,6 @@ class NVRTC:
106105 'nvrtcGetProgramLog' : (nvrtc_result , nvrtc_program , c_char_p ),
107106 }
108107
109- if get_version () >= (12 , 0 ):
110- _PROTOTYPES |= _CU12ONLY_PROTOTYPES
111-
112108 # Singleton reference
113109 __INSTANCE = None
114110
@@ -123,6 +119,10 @@ def __new__(cls):
123119 cls .__INSTANCE = None
124120 raise NvrtcSupportError ("NVRTC cannot be loaded" ) from e
125121
122+ from numba .cuda .cudadrv .runtime import get_version
123+ if get_version () >= (12 , 0 ):
124+ inst ._PROTOTYPES |= inst ._CU12ONLY_PROTOTYPES
125+
126126 # Find & populate functions
127127 for name , proto in inst ._PROTOTYPES .items ():
128128 func = getattr (lib , name )
You can’t perform that action at this time.
0 commit comments