Coverage for cuda / bindings / _bindings / cynvrtc.pyx: 58%

266 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2025-12-10 01:19 +0000

1# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 

2# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE 

3  

4# This code was automatically generated with version 13.1.0. Do not modify it directly. 

5cimport cuda.bindings._lib.dlfcn as dlfcn 

6from cuda.pathfinder import load_nvidia_dynamic_lib 

7from libc.stdint cimport intptr_t, uintptr_t 

8import threading 

9  

10cdef object __symbol_lock = threading.Lock() 

11cdef bint __cuPythonInit = False 

12cdef void *__nvrtcGetErrorString = NULL 

13cdef void *__nvrtcVersion = NULL 

14cdef void *__nvrtcGetNumSupportedArchs = NULL 

15cdef void *__nvrtcGetSupportedArchs = NULL 

16cdef void *__nvrtcCreateProgram = NULL 

17cdef void *__nvrtcDestroyProgram = NULL 

18cdef void *__nvrtcCompileProgram = NULL 

19cdef void *__nvrtcGetPTXSize = NULL 

20cdef void *__nvrtcGetPTX = NULL 

21cdef void *__nvrtcGetCUBINSize = NULL 

22cdef void *__nvrtcGetCUBIN = NULL 

23cdef void *__nvrtcGetLTOIRSize = NULL 

24cdef void *__nvrtcGetLTOIR = NULL 

25cdef void *__nvrtcGetOptiXIRSize = NULL 

26cdef void *__nvrtcGetOptiXIR = NULL 

27cdef void *__nvrtcGetProgramLogSize = NULL 

28cdef void *__nvrtcGetProgramLog = NULL 

29cdef void *__nvrtcAddNameExpression = NULL 

30cdef void *__nvrtcGetLoweredName = NULL 

31cdef void *__nvrtcGetPCHHeapSize = NULL 

32cdef void *__nvrtcSetPCHHeapSize = NULL 

33cdef void *__nvrtcGetPCHCreateStatus = NULL 

34cdef void *__nvrtcGetPCHHeapSizeRequired = NULL 

35cdef void *__nvrtcSetFlowCallback = NULL 

36  

37cdef int _cuPythonInit() except -1 nogil: 

38 global __cuPythonInit 

39  

40 # Load library 

41 with gil, __symbol_lock: 

42 handle = <void*><uintptr_t>(load_nvidia_dynamic_lib("nvrtc")._handle_uint) 

43  

44 # Load function 

45 global __nvrtcGetErrorString 

46 __nvrtcGetErrorString = dlfcn.dlsym(handle, 'nvrtcGetErrorString') 

47 global __nvrtcVersion 

48 __nvrtcVersion = dlfcn.dlsym(handle, 'nvrtcVersion') 

49 global __nvrtcGetNumSupportedArchs 

50 __nvrtcGetNumSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetNumSupportedArchs') 

51 global __nvrtcGetSupportedArchs 

52 __nvrtcGetSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetSupportedArchs') 

53 global __nvrtcCreateProgram 

54 __nvrtcCreateProgram = dlfcn.dlsym(handle, 'nvrtcCreateProgram') 

55 global __nvrtcDestroyProgram 

56 __nvrtcDestroyProgram = dlfcn.dlsym(handle, 'nvrtcDestroyProgram') 

57 global __nvrtcCompileProgram 

58 __nvrtcCompileProgram = dlfcn.dlsym(handle, 'nvrtcCompileProgram') 

59 global __nvrtcGetPTXSize 

60 __nvrtcGetPTXSize = dlfcn.dlsym(handle, 'nvrtcGetPTXSize') 

61 global __nvrtcGetPTX 

62 __nvrtcGetPTX = dlfcn.dlsym(handle, 'nvrtcGetPTX') 

63 global __nvrtcGetCUBINSize 

64 __nvrtcGetCUBINSize = dlfcn.dlsym(handle, 'nvrtcGetCUBINSize') 

65 global __nvrtcGetCUBIN 

66 __nvrtcGetCUBIN = dlfcn.dlsym(handle, 'nvrtcGetCUBIN') 

67 global __nvrtcGetLTOIRSize 

68 __nvrtcGetLTOIRSize = dlfcn.dlsym(handle, 'nvrtcGetLTOIRSize') 

69 global __nvrtcGetLTOIR 

70 __nvrtcGetLTOIR = dlfcn.dlsym(handle, 'nvrtcGetLTOIR') 

71 global __nvrtcGetOptiXIRSize 

72 __nvrtcGetOptiXIRSize = dlfcn.dlsym(handle, 'nvrtcGetOptiXIRSize') 

73 global __nvrtcGetOptiXIR 

74 __nvrtcGetOptiXIR = dlfcn.dlsym(handle, 'nvrtcGetOptiXIR') 

75 global __nvrtcGetProgramLogSize 

76 __nvrtcGetProgramLogSize = dlfcn.dlsym(handle, 'nvrtcGetProgramLogSize') 

77 global __nvrtcGetProgramLog 

78 __nvrtcGetProgramLog = dlfcn.dlsym(handle, 'nvrtcGetProgramLog') 

79 global __nvrtcAddNameExpression 

80 __nvrtcAddNameExpression = dlfcn.dlsym(handle, 'nvrtcAddNameExpression') 

81 global __nvrtcGetLoweredName 

82 __nvrtcGetLoweredName = dlfcn.dlsym(handle, 'nvrtcGetLoweredName') 

83 global __nvrtcGetPCHHeapSize 

84 __nvrtcGetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSize') 

85 global __nvrtcSetPCHHeapSize 

86 __nvrtcSetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcSetPCHHeapSize') 

87 global __nvrtcGetPCHCreateStatus 

88 __nvrtcGetPCHCreateStatus = dlfcn.dlsym(handle, 'nvrtcGetPCHCreateStatus') 

89 global __nvrtcGetPCHHeapSizeRequired 

90 __nvrtcGetPCHHeapSizeRequired = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSizeRequired') 

91 global __nvrtcSetFlowCallback 

92 __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback') 

93 __cuPythonInit = True 

94 return 0 

95  

96# Create a very small function to check whether we are init'ed, so the C 

97# compiler can inline it. 

98cdef inline int cuPythonInit() except -1 nogil: 

99 if __cuPythonInit: 

100 return 0 

101 return _cuPythonInit() 

102  

103cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: 

104 global __nvrtcGetErrorString 

105 cuPythonInit() 

106 if __nvrtcGetErrorString == NULL: 

107 with gil: 

108 raise RuntimeError('Function "nvrtcGetErrorString" not found') 

109 err = (<const char* (*)(nvrtcResult) except ?NULL nogil> __nvrtcGetErrorString)(result) 

110 return err 

111  

112cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

113 global __nvrtcVersion 

114 cuPythonInit() 

115 if __nvrtcVersion == NULL: 

116 with gil: 

117 raise RuntimeError('Function "nvrtcVersion" not found') 

118 err = (<nvrtcResult (*)(int*, int*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcVersion)(major, minor) 

119 return err 

120  

121cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

122 global __nvrtcGetNumSupportedArchs 

123 cuPythonInit() 

124 if __nvrtcGetNumSupportedArchs == NULL: 

125 with gil: 

126 raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') 

127 err = (<nvrtcResult (*)(int*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetNumSupportedArchs)(numArchs) 

128 return err 

129  

130cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

131 global __nvrtcGetSupportedArchs 

132 cuPythonInit() 

133 if __nvrtcGetSupportedArchs == NULL: 

134 with gil: 

135 raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') 

136 err = (<nvrtcResult (*)(int*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetSupportedArchs)(supportedArchs) 

137 return err 

138  

139cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

140 global __nvrtcCreateProgram 

141 cuPythonInit() 

142 if __nvrtcCreateProgram == NULL: 

143 with gil: 

144 raise RuntimeError('Function "nvrtcCreateProgram" not found') 

145 err = (<nvrtcResult (*)(nvrtcProgram*, const char*, const char*, int, const char**, const char**) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcCreateProgram)(prog, src, name, numHeaders, headers, includeNames) 

146 return err 

147  

148cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

149 global __nvrtcDestroyProgram 

150 cuPythonInit() 

151 if __nvrtcDestroyProgram == NULL: 

152 with gil: 

153 raise RuntimeError('Function "nvrtcDestroyProgram" not found') 

154 err = (<nvrtcResult (*)(nvrtcProgram*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcDestroyProgram)(prog) 

155 return err 

156  

157cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

158 global __nvrtcCompileProgram 

159 cuPythonInit() 

160 if __nvrtcCompileProgram == NULL: 

161 with gil: 

162 raise RuntimeError('Function "nvrtcCompileProgram" not found') 

163 err = (<nvrtcResult (*)(nvrtcProgram, int, const char**) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcCompileProgram)(prog, numOptions, options) 

164 return err 

165  

166cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

167 global __nvrtcGetPTXSize 

168 cuPythonInit() 

169 if __nvrtcGetPTXSize == NULL: 

170 with gil: 

171 raise RuntimeError('Function "nvrtcGetPTXSize" not found') 

172 err = (<nvrtcResult (*)(nvrtcProgram, size_t*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetPTXSize)(prog, ptxSizeRet) 

173 return err 

174  

175cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

176 global __nvrtcGetPTX 

177 cuPythonInit() 

178 if __nvrtcGetPTX == NULL: 

179 with gil: 

180 raise RuntimeError('Function "nvrtcGetPTX" not found') 

181 err = (<nvrtcResult (*)(nvrtcProgram, char*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetPTX)(prog, ptx) 

182 return err 

183  

184cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

185 global __nvrtcGetCUBINSize 

186 cuPythonInit() 

187 if __nvrtcGetCUBINSize == NULL: 

188 with gil: 

189 raise RuntimeError('Function "nvrtcGetCUBINSize" not found') 

190 err = (<nvrtcResult (*)(nvrtcProgram, size_t*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetCUBINSize)(prog, cubinSizeRet) 

191 return err 

192  

193cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

194 global __nvrtcGetCUBIN 

195 cuPythonInit() 

196 if __nvrtcGetCUBIN == NULL: 

197 with gil: 

198 raise RuntimeError('Function "nvrtcGetCUBIN" not found') 

199 err = (<nvrtcResult (*)(nvrtcProgram, char*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetCUBIN)(prog, cubin) 

200 return err 

201  

202cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

203 global __nvrtcGetLTOIRSize 

204 cuPythonInit() 

205 if __nvrtcGetLTOIRSize == NULL: 

206 with gil: 

207 raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') 

208 err = (<nvrtcResult (*)(nvrtcProgram, size_t*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetLTOIRSize)(prog, LTOIRSizeRet) 

209 return err 

210  

211cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

212 global __nvrtcGetLTOIR 

213 cuPythonInit() 

214 if __nvrtcGetLTOIR == NULL: 

215 with gil: 

216 raise RuntimeError('Function "nvrtcGetLTOIR" not found') 

217 err = (<nvrtcResult (*)(nvrtcProgram, char*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetLTOIR)(prog, LTOIR) 

218 return err 

219  

220cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

221 global __nvrtcGetOptiXIRSize 

222 cuPythonInit() 

223 if __nvrtcGetOptiXIRSize == NULL: 

224 with gil: 

225 raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') 

226 err = (<nvrtcResult (*)(nvrtcProgram, size_t*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetOptiXIRSize)(prog, optixirSizeRet) 

227 return err 

228  

229cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

230 global __nvrtcGetOptiXIR 

231 cuPythonInit() 

232 if __nvrtcGetOptiXIR == NULL: 

233 with gil: 

234 raise RuntimeError('Function "nvrtcGetOptiXIR" not found') 

235 err = (<nvrtcResult (*)(nvrtcProgram, char*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetOptiXIR)(prog, optixir) 

236 return err 

237  

238cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

239 global __nvrtcGetProgramLogSize 

240 cuPythonInit() 

241 if __nvrtcGetProgramLogSize == NULL: 

242 with gil: 

243 raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') 

244 err = (<nvrtcResult (*)(nvrtcProgram, size_t*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetProgramLogSize)(prog, logSizeRet) 

245 return err 

246  

247cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

248 global __nvrtcGetProgramLog 

249 cuPythonInit() 

250 if __nvrtcGetProgramLog == NULL: 

251 with gil: 

252 raise RuntimeError('Function "nvrtcGetProgramLog" not found') 

253 err = (<nvrtcResult (*)(nvrtcProgram, char*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetProgramLog)(prog, log) 

254 return err 

255  

256cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

257 global __nvrtcAddNameExpression 

258 cuPythonInit() 

259 if __nvrtcAddNameExpression == NULL: 

260 with gil: 

261 raise RuntimeError('Function "nvrtcAddNameExpression" not found') 

262 err = (<nvrtcResult (*)(nvrtcProgram, const char*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcAddNameExpression)(prog, name_expression) 

263 return err 

264  

265cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

266 global __nvrtcGetLoweredName 

267 cuPythonInit() 

268 if __nvrtcGetLoweredName == NULL: 

269 with gil: 

270 raise RuntimeError('Function "nvrtcGetLoweredName" not found') 

271 err = (<nvrtcResult (*)(nvrtcProgram, const char*, const char**) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetLoweredName)(prog, name_expression, lowered_name) 

272 return err 

273  

274cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

275 global __nvrtcGetPCHHeapSize 

276 cuPythonInit() 

277 if __nvrtcGetPCHHeapSize == NULL: 

278 with gil: 

279 raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') 

280 err = (<nvrtcResult (*)(size_t*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetPCHHeapSize)(ret) 

281 return err 

282  

283cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

284 global __nvrtcSetPCHHeapSize 

285 cuPythonInit() 

286 if __nvrtcSetPCHHeapSize == NULL: 

287 with gil: 

288 raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') 

289 err = (<nvrtcResult (*)(size_t) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcSetPCHHeapSize)(size) 

290 return err 

291  

292cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

293 global __nvrtcGetPCHCreateStatus 

294 cuPythonInit() 

295 if __nvrtcGetPCHCreateStatus == NULL: 

296 with gil: 

297 raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') 

298 err = (<nvrtcResult (*)(nvrtcProgram) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetPCHCreateStatus)(prog) 

299 return err 

300  

301cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

302 global __nvrtcGetPCHHeapSizeRequired 

303 cuPythonInit() 

304 if __nvrtcGetPCHHeapSizeRequired == NULL: 

305 with gil: 

306 raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') 

307 err = (<nvrtcResult (*)(nvrtcProgram, size_t*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcGetPCHHeapSizeRequired)(prog, size) 

308 return err 

309  

310cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: 

311 global __nvrtcSetFlowCallback 

312 cuPythonInit() 

313 if __nvrtcSetFlowCallback == NULL: 

314 with gil: 

315 raise RuntimeError('Function "nvrtcSetFlowCallback" not found') 

316 err = (<nvrtcResult (*)(nvrtcProgram, void*, void*) except ?NVRTC_ERROR_INVALID_INPUT nogil> __nvrtcSetFlowCallback)(prog, callback, payload) 

317 return err 

318  

319cdef dict func_ptrs = None 

320  

321cpdef dict _inspect_function_pointers(): 

322 global func_ptrs 

323 if func_ptrs is not None: 

324 return func_ptrs 

325  

326 cuPythonInit() 

327 cdef dict data = {} 

328  

329 global __nvrtcGetErrorString 

330 data["__nvrtcGetErrorString"] = <intptr_t>__nvrtcGetErrorString 

331 global __nvrtcVersion 

332 data["__nvrtcVersion"] = <intptr_t>__nvrtcVersion 

333 global __nvrtcGetNumSupportedArchs 

334 data["__nvrtcGetNumSupportedArchs"] = <intptr_t>__nvrtcGetNumSupportedArchs 

335 global __nvrtcGetSupportedArchs 

336 data["__nvrtcGetSupportedArchs"] = <intptr_t>__nvrtcGetSupportedArchs 

337 global __nvrtcCreateProgram 

338 data["__nvrtcCreateProgram"] = <intptr_t>__nvrtcCreateProgram 

339 global __nvrtcDestroyProgram 

340 data["__nvrtcDestroyProgram"] = <intptr_t>__nvrtcDestroyProgram 

341 global __nvrtcCompileProgram 

342 data["__nvrtcCompileProgram"] = <intptr_t>__nvrtcCompileProgram 

343 global __nvrtcGetPTXSize 

344 data["__nvrtcGetPTXSize"] = <intptr_t>__nvrtcGetPTXSize 

345 global __nvrtcGetPTX 

346 data["__nvrtcGetPTX"] = <intptr_t>__nvrtcGetPTX 

347 global __nvrtcGetCUBINSize 

348 data["__nvrtcGetCUBINSize"] = <intptr_t>__nvrtcGetCUBINSize 

349 global __nvrtcGetCUBIN 

350 data["__nvrtcGetCUBIN"] = <intptr_t>__nvrtcGetCUBIN 

351 global __nvrtcGetLTOIRSize 

352 data["__nvrtcGetLTOIRSize"] = <intptr_t>__nvrtcGetLTOIRSize 

353 global __nvrtcGetLTOIR 

354 data["__nvrtcGetLTOIR"] = <intptr_t>__nvrtcGetLTOIR 

355 global __nvrtcGetOptiXIRSize 

356 data["__nvrtcGetOptiXIRSize"] = <intptr_t>__nvrtcGetOptiXIRSize 

357 global __nvrtcGetOptiXIR 

358 data["__nvrtcGetOptiXIR"] = <intptr_t>__nvrtcGetOptiXIR 

359 global __nvrtcGetProgramLogSize 

360 data["__nvrtcGetProgramLogSize"] = <intptr_t>__nvrtcGetProgramLogSize 

361 global __nvrtcGetProgramLog 

362 data["__nvrtcGetProgramLog"] = <intptr_t>__nvrtcGetProgramLog 

363 global __nvrtcAddNameExpression 

364 data["__nvrtcAddNameExpression"] = <intptr_t>__nvrtcAddNameExpression 

365 global __nvrtcGetLoweredName 

366 data["__nvrtcGetLoweredName"] = <intptr_t>__nvrtcGetLoweredName 

367 global __nvrtcGetPCHHeapSize 

368 data["__nvrtcGetPCHHeapSize"] = <intptr_t>__nvrtcGetPCHHeapSize 

369 global __nvrtcSetPCHHeapSize 

370 data["__nvrtcSetPCHHeapSize"] = <intptr_t>__nvrtcSetPCHHeapSize 

371 global __nvrtcGetPCHCreateStatus 

372 data["__nvrtcGetPCHCreateStatus"] = <intptr_t>__nvrtcGetPCHCreateStatus 

373 global __nvrtcGetPCHHeapSizeRequired 

374 data["__nvrtcGetPCHHeapSizeRequired"] = <intptr_t>__nvrtcGetPCHHeapSizeRequired 

375 global __nvrtcSetFlowCallback 

376 data["__nvrtcSetFlowCallback"] = <intptr_t>__nvrtcSetFlowCallback 

377  

378 func_ptrs = data 

379 return data 

380  

381cpdef _inspect_function_pointer(str name): 

382 global func_ptrs 

383 if func_ptrs is None: 

384 func_ptrs = _inspect_function_pointers() 

385 return func_ptrs[name]