Coverage for cuda/bindings/_internal/nvjitlink.pyx: 78.24%

239 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-07-29 01:38 +0000

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

2# 

3# SPDX-License-Identifier: Apache-2.0 

4# 

5# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. 

6# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=11665992d7c94100ae00600171ac56e9e99ee0c2c43c1cb720b4df27602ca829 

7  

8  

9# <<<< PREAMBLE CONTENT >>>> 

10  

11cdef extern from * nogil: 

12 """ 

13 #if defined(_MSC_VER) && !defined(__clang__) 

14 #include <intrin.h> 

15 static __forceinline int atomic_int_load(int *p) { 

16 int v = *(int volatile *)p; _ReadBarrier(); return v; 

17 } 

18 static __forceinline void atomic_int_store(int *p, int v) { 

19 _WriteBarrier(); *(int volatile *)p = v; 

20 } 

21 #elif defined(__cplusplus) 

22 /* GCC/Clang __atomic builtins work in any C++ standard without headers */ 

23 static inline int atomic_int_load(int *p) { 

24 return __atomic_load_n(p, __ATOMIC_ACQUIRE); 

25 } 

26 static inline void atomic_int_store(int *p, int v) { 

27 __atomic_store_n(p, v, __ATOMIC_RELEASE); 

28 } 

29 #else 

30 #include <stdatomic.h> 

31 static inline int atomic_int_load(int *p) { 

32 return (int)atomic_load_explicit((atomic_int *)p, memory_order_acquire); 

33 } 

34 static inline void atomic_int_store(int *p, int v) { 

35 atomic_store_explicit((atomic_int *)p, v, memory_order_release); 

36 } 

37 #endif 

38  

39 """ 

40 cdef int _cyb_atomic_int_load "atomic_int_load"(int *p) nogil 

41 cdef void _cyb_atomic_int_store "atomic_int_store"(int *p, int v) nogil 

42  

43cdef extern from "<dlfcn.h>": 

44 void* _cyb_dlsym "dlsym"(void*, const char*) nogil 

45 const void * _cyb_RTLD_DEFAULT "RTLD_DEFAULT" 

46  

47from libc.stdint cimport intptr_t as _cyb_intptr_t 

48  

49import threading as _cyb_threading 

50  

51cdef int _cyb___py_nvjitlink_init = 0 

52cdef dict _cyb_func_ptrs = None 

53cdef object _cyb_symbol_lock = _cyb_threading.Lock() 

54  

55# <<<< END OF PREAMBLE CONTENT >>>> 

56  

57from libc.stdint cimport uintptr_t 

58  

59from .utils import FunctionNotFoundError, NotSupportedError 

60from cuda.pathfinder import load_nvidia_dynamic_lib 

61  

62  

63############################################################################### 

64# Wrapper init 

65############################################################################### 

66  

67cdef void* __nvJitLinkCreate = NULL 

68cdef void* __nvJitLinkDestroy = NULL 

69cdef void* __nvJitLinkAddData = NULL 

70cdef void* __nvJitLinkAddFile = NULL 

71cdef void* __nvJitLinkComplete = NULL 

72cdef void* __nvJitLinkGetLinkedCubinSize = NULL 

73cdef void* __nvJitLinkGetLinkedCubin = NULL 

74cdef void* __nvJitLinkGetLinkedPtxSize = NULL 

75cdef void* __nvJitLinkGetLinkedPtx = NULL 

76cdef void* __nvJitLinkGetErrorLogSize = NULL 

77cdef void* __nvJitLinkGetErrorLog = NULL 

78cdef void* __nvJitLinkGetInfoLogSize = NULL 

79cdef void* __nvJitLinkGetInfoLog = NULL 

80cdef void* __nvJitLinkVersion = NULL 

81cdef void* __nvJitLinkGetLinkedLTOIRSize = NULL 

82cdef void* __nvJitLinkGetLinkedLTOIR = NULL 

83  

84cdef int _init_nvjitlink() except -1 nogil: 

85 global _cyb___py_nvjitlink_init 

86 cdef void* handle = NULL 

87 with gil, _cyb_symbol_lock: 

88 if _cyb___py_nvjitlink_init: return 0 

89  

90 global __nvJitLinkCreate 

91 __nvJitLinkCreate = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkCreate') 

92 if __nvJitLinkCreate == NULL: 

93 if handle == NULL: 

94 handle = load_library() 

95 __nvJitLinkCreate = _cyb_dlsym(handle, 'nvJitLinkCreate') 

96  

97 global __nvJitLinkDestroy 

98 __nvJitLinkDestroy = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkDestroy') 

99 if __nvJitLinkDestroy == NULL: 

100 if handle == NULL: 

101 handle = load_library() 

102 __nvJitLinkDestroy = _cyb_dlsym(handle, 'nvJitLinkDestroy') 

103  

104 global __nvJitLinkAddData 

105 __nvJitLinkAddData = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkAddData') 

106 if __nvJitLinkAddData == NULL: 

107 if handle == NULL: 

108 handle = load_library() 

109 __nvJitLinkAddData = _cyb_dlsym(handle, 'nvJitLinkAddData') 

110  

111 global __nvJitLinkAddFile 

112 __nvJitLinkAddFile = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkAddFile') 

113 if __nvJitLinkAddFile == NULL: 

114 if handle == NULL: 

115 handle = load_library() 

116 __nvJitLinkAddFile = _cyb_dlsym(handle, 'nvJitLinkAddFile') 

117  

118 global __nvJitLinkComplete 

119 __nvJitLinkComplete = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkComplete') 

120 if __nvJitLinkComplete == NULL: 

121 if handle == NULL: 

122 handle = load_library() 

123 __nvJitLinkComplete = _cyb_dlsym(handle, 'nvJitLinkComplete') 

124  

125 global __nvJitLinkGetLinkedCubinSize 

126 __nvJitLinkGetLinkedCubinSize = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') 

127 if __nvJitLinkGetLinkedCubinSize == NULL: 

128 if handle == NULL: 

129 handle = load_library() 

130 __nvJitLinkGetLinkedCubinSize = _cyb_dlsym(handle, 'nvJitLinkGetLinkedCubinSize') 

131  

132 global __nvJitLinkGetLinkedCubin 

133 __nvJitLinkGetLinkedCubin = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') 

134 if __nvJitLinkGetLinkedCubin == NULL: 

135 if handle == NULL: 

136 handle = load_library() 

137 __nvJitLinkGetLinkedCubin = _cyb_dlsym(handle, 'nvJitLinkGetLinkedCubin') 

138  

139 global __nvJitLinkGetLinkedPtxSize 

140 __nvJitLinkGetLinkedPtxSize = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') 

141 if __nvJitLinkGetLinkedPtxSize == NULL: 

142 if handle == NULL: 2a bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbJbGbfbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbKbIb

143 handle = load_library() 2bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbJbGbfbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbKbIb

144 __nvJitLinkGetLinkedPtxSize = _cyb_dlsym(handle, 'nvJitLinkGetLinkedPtxSize') 

145  

146 global __nvJitLinkGetLinkedPtx 

147 __nvJitLinkGetLinkedPtx = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') 

148 if __nvJitLinkGetLinkedPtx == NULL: 

149 if handle == NULL: 

150 handle = load_library() 

151 __nvJitLinkGetLinkedPtx = _cyb_dlsym(handle, 'nvJitLinkGetLinkedPtx') 

152  

153 global __nvJitLinkGetErrorLogSize 

154 __nvJitLinkGetErrorLogSize = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') 

155 if __nvJitLinkGetErrorLogSize == NULL: 

156 if handle == NULL: 

157 handle = load_library() 

158 __nvJitLinkGetErrorLogSize = _cyb_dlsym(handle, 'nvJitLinkGetErrorLogSize') 

159  

160 global __nvJitLinkGetErrorLog 

161 __nvJitLinkGetErrorLog = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetErrorLog') 

162 if __nvJitLinkGetErrorLog == NULL: 

163 if handle == NULL: 

164 handle = load_library() 

165 __nvJitLinkGetErrorLog = _cyb_dlsym(handle, 'nvJitLinkGetErrorLog') 

166  

167 global __nvJitLinkGetInfoLogSize 

168 __nvJitLinkGetInfoLogSize = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') 

169 if __nvJitLinkGetInfoLogSize == NULL: 

170 if handle == NULL: 

171 handle = load_library() 

172 __nvJitLinkGetInfoLogSize = _cyb_dlsym(handle, 'nvJitLinkGetInfoLogSize') 

173  

174 global __nvJitLinkGetInfoLog 

175 __nvJitLinkGetInfoLog = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetInfoLog') 

176 if __nvJitLinkGetInfoLog == NULL: 

177 if handle == NULL: 

178 handle = load_library() 

179 __nvJitLinkGetInfoLog = _cyb_dlsym(handle, 'nvJitLinkGetInfoLog') 

180  

181 global __nvJitLinkVersion 

182 __nvJitLinkVersion = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkVersion') 

183 if __nvJitLinkVersion == NULL: 

184 if handle == NULL: 

185 handle = load_library() 

186 __nvJitLinkVersion = _cyb_dlsym(handle, 'nvJitLinkVersion') 

187  

188 global __nvJitLinkGetLinkedLTOIRSize 

189 __nvJitLinkGetLinkedLTOIRSize = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetLinkedLTOIRSize') 

190 if __nvJitLinkGetLinkedLTOIRSize == NULL: 

191 if handle == NULL: 

192 handle = load_library() 

193 __nvJitLinkGetLinkedLTOIRSize = _cyb_dlsym(handle, 'nvJitLinkGetLinkedLTOIRSize') 

194  

195 global __nvJitLinkGetLinkedLTOIR 

196 __nvJitLinkGetLinkedLTOIR = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvJitLinkGetLinkedLTOIR') 

197 if __nvJitLinkGetLinkedLTOIR == NULL: 

198 if handle == NULL: 

199 handle = load_library() 

200 __nvJitLinkGetLinkedLTOIR = _cyb_dlsym(handle, 'nvJitLinkGetLinkedLTOIR') 

201  

202 _cyb_atomic_int_store(<int *>&_cyb___py_nvjitlink_init, 1) 

203 return 0 

204  

205cdef inline int _check_or_init_nvjitlink() except -1 nogil: 

206 if _cyb_atomic_int_load(<int *>&_cyb___py_nvjitlink_init): 2a bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbJbGbjbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 Lb9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbKbIbEb' ( ) * + , - h i . MbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9b

207 return 0 2a bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbJbGbjbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 Lb9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbKbIbEb' ( ) * + , - h i . MbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9b

208  

209 return _init_nvjitlink() 

210  

211  

212cpdef dict _inspect_function_pointers(): 

213 global _cyb_func_ptrs 

214 if _cyb_func_ptrs is not None: 

215 return _cyb_func_ptrs 

216  

217 _check_or_init_nvjitlink() 

218 cdef dict data = {} 

219 global __nvJitLinkCreate 

220 data["__nvJitLinkCreate"] = <_cyb_intptr_t>__nvJitLinkCreate 

221  

222 global __nvJitLinkDestroy 

223 data["__nvJitLinkDestroy"] = <_cyb_intptr_t>__nvJitLinkDestroy 

224  

225 global __nvJitLinkAddData 

226 data["__nvJitLinkAddData"] = <_cyb_intptr_t>__nvJitLinkAddData 2a bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbGbfbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbIb

227  

228 global __nvJitLinkAddFile 

229 data["__nvJitLinkAddFile"] = <_cyb_intptr_t>__nvJitLinkAddFile 2a bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbGbfbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbIb

230  

231 global __nvJitLinkComplete 

232 data["__nvJitLinkComplete"] = <_cyb_intptr_t>__nvJitLinkComplete 

233  

234 global __nvJitLinkGetLinkedCubinSize 

235 data["__nvJitLinkGetLinkedCubinSize"] = <_cyb_intptr_t>__nvJitLinkGetLinkedCubinSize 2a bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O

236  

237 global __nvJitLinkGetLinkedCubin 

238 data["__nvJitLinkGetLinkedCubin"] = <_cyb_intptr_t>__nvJitLinkGetLinkedCubin 

239  

240 global __nvJitLinkGetLinkedPtxSize 

241 data["__nvJitLinkGetLinkedPtxSize"] = <_cyb_intptr_t>__nvJitLinkGetLinkedPtxSize 

242  

243 global __nvJitLinkGetLinkedPtx 

244 data["__nvJitLinkGetLinkedPtx"] = <_cyb_intptr_t>__nvJitLinkGetLinkedPtx 

245  

246 global __nvJitLinkGetErrorLogSize 

247 data["__nvJitLinkGetErrorLogSize"] = <_cyb_intptr_t>__nvJitLinkGetErrorLogSize 

248  

249 global __nvJitLinkGetErrorLog 

250 data["__nvJitLinkGetErrorLog"] = <_cyb_intptr_t>__nvJitLinkGetErrorLog 

251  

252 global __nvJitLinkGetInfoLogSize 

253 data["__nvJitLinkGetInfoLogSize"] = <_cyb_intptr_t>__nvJitLinkGetInfoLogSize 

254  

255 global __nvJitLinkGetInfoLog 

256 data["__nvJitLinkGetInfoLog"] = <_cyb_intptr_t>__nvJitLinkGetInfoLog 2a ^ _ ` { | } ~ ab

257  

258 global __nvJitLinkVersion 

259 data["__nvJitLinkVersion"] = <_cyb_intptr_t>__nvJitLinkVersion 2a ^ _ ` { | } ~ ab

260  

261 global __nvJitLinkGetLinkedLTOIRSize 

262 data["__nvJitLinkGetLinkedLTOIRSize"] = <_cyb_intptr_t>__nvJitLinkGetLinkedLTOIRSize 

263  

264 global __nvJitLinkGetLinkedLTOIR 

265 data["__nvJitLinkGetLinkedLTOIR"] = <_cyb_intptr_t>__nvJitLinkGetLinkedLTOIR 2a bbcbdbeb^ _ ` { kblbmbnb/ : ; = r s t u j k l m v w x y z A B C fbgbhbib| } ~ abobpbqbrb? @ [ ] D E F G n o p q H I J K L M N O

266 _cyb_func_ptrs = data 2a bbcbdbeb^ _ ` { kblbmbnb/ : ; = r s t u j k l m v w x y z A B C fbgbhbib| } ~ abobpbqbrb? @ [ ] D E F G n o p q H I J K L M N O

267 return data 

268  

269  

270cpdef _inspect_function_pointer(str name): 

271 global _cyb_func_ptrs 

272 if _cyb_func_ptrs is None: 

273 _cyb_func_ptrs = _inspect_function_pointers() 

274 return _cyb_func_ptrs[name] 

275  

276  

277  

278  

279cdef void* load_library() except* with gil: 1ajklmnopq

280 cdef uintptr_t handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint 

281 return <void*>handle 

282  

283  

284############################################################################### 

285# Wrapper functions 

286############################################################################### 

287  

288cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

289 global __nvJitLinkCreate 

290 _check_or_init_nvjitlink() 2bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbGbjbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 Lb9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbIbEb' ( ) * + , - h i .

291 if __nvJitLinkCreate == NULL: 2bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbGbjbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 Lb9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbIbEb' ( ) * + , - h i .

292 with gil: 

293 raise FunctionNotFoundError("function nvJitLinkCreate is not found") 

294 return (<nvJitLinkResult (*)(nvJitLinkHandle*, uint32_t, const char**) noexcept nogil>__nvJitLinkCreate)( 2bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C FbGbjbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 Lb9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O HbIbEb' ( ) * + , - h i .

295 handle, numOptions, options) 

296  

297  

298cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

299 global __nvJitLinkDestroy 

300 _check_or_init_nvjitlink() 2bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C jbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O Eb' ( ) * + , - h i .

301 if __nvJitLinkDestroy == NULL: 2bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C jbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O Eb' ( ) * + , - h i .

302 with gil: 

303 raise FunctionNotFoundError("function nvJitLinkDestroy is not found") 

304 return (<nvJitLinkResult (*)(nvJitLinkHandle*) noexcept nogil>__nvJitLinkDestroy)( 2bbcbdbeb^ _ ` { kblbmbnbsbtbubvbwb/ : ; = r s t u j k l m v w x y z A B C jbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 Db! g # $ % fbgbhbib| } ~ abobpbqbrbxbybzbAbBb? @ [ ] D E F G n o p q H I J K L M N O Eb' ( ) * + , - h i .

305 handle) 

306  

307  

308cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

309 global __nvJitLinkAddData 

310 _check_or_init_nvjitlink() 2bbcbdbebr s t u j k l m v w x y z A B C jbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 Db! g # $ % fbgbhbibD E F G n o p q H I J K L M N O Eb' ( ) * + , - h i .

311 if __nvJitLinkAddData == NULL: 2bbcbdbebr s t u j k l m v w x y z A B C jbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 Db! g # $ % fbgbhbibD E F G n o p q H I J K L M N O Eb' ( ) * + , - h i .

312 with gil: 

313 raise FunctionNotFoundError("function nvJitLinkAddData is not found") 

314 return (<nvJitLinkResult (*)(nvJitLinkHandle, nvJitLinkInputType, const void*, size_t, const char*) noexcept nogil>__nvJitLinkAddData)( 2bbcbdbebr s t u j k l m v w x y z A B C jbP CbQ b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 Db! g # $ % fbgbhbibD E F G n o p q H I J K L M N O Eb' ( ) * + , - h i .

315 handle, inputType, data, size, name) 

316  

317  

318cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

319 global __nvJitLinkAddFile 

320 _check_or_init_nvjitlink() 2^ _ ` { | } ~ ab

321 if __nvJitLinkAddFile == NULL: 2^ _ ` { | } ~ ab

322 with gil: 

323 raise FunctionNotFoundError("function nvJitLinkAddFile is not found") 

324 return (<nvJitLinkResult (*)(nvJitLinkHandle, nvJitLinkInputType, const char*) noexcept nogil>__nvJitLinkAddFile)( 2^ _ ` { | } ~ ab

325 handle, inputType, fileName) 

326  

327  

328cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

329 global __nvJitLinkComplete 

330 _check_or_init_nvjitlink() 2bbcbdbeb^ _ ` { kblbmbnb/ : ; = r s t u j k l m v w x y z A B C jbP Q b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! g # $ % fbgbhbib| } ~ abobpbqbrb? @ [ ] D E F G n o p q H I J K L M N O ' ( ) * + , - h i .

331 if __nvJitLinkComplete == NULL: 2bbcbdbeb^ _ ` { kblbmbnb/ : ; = r s t u j k l m v w x y z A B C jbP Q b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! g # $ % fbgbhbib| } ~ abobpbqbrb? @ [ ] D E F G n o p q H I J K L M N O ' ( ) * + , - h i .

332 with gil: 

333 raise FunctionNotFoundError("function nvJitLinkComplete is not found") 

334 return (<nvJitLinkResult (*)(nvJitLinkHandle) noexcept nogil>__nvJitLinkComplete)( 2bbcbdbeb^ _ ` { kblbmbnb/ : ; = r s t u j k l m v w x y z A B C jbP Q b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! g # $ % fbgbhbib| } ~ abobpbqbrb? @ [ ] D E F G n o p q H I J K L M N O ' ( ) * + , - h i .

335 handle) 

336  

337  

338cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

339 global __nvJitLinkGetLinkedCubinSize 

340 _check_or_init_nvjitlink() 1jklmPQbRScTdUefVWXYZ0123456789!#$%nopq'()*+,-hi.

341 if __nvJitLinkGetLinkedCubinSize == NULL: 1jklmPQbRScTdUefVWXYZ0123456789!#$%nopq'()*+,-hi.

342 with gil: 

343 raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") 

344 return (<nvJitLinkResult (*)(nvJitLinkHandle, size_t*) noexcept nogil>__nvJitLinkGetLinkedCubinSize)( 1jklmPQbRScTdUefVWXYZ0123456789!#$%nopq'()*+,-hi.

345 handle, size) 

346  

347  

348cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

349 global __nvJitLinkGetLinkedCubin 

350 _check_or_init_nvjitlink() 1jklmPQbRScTdUefVWXYZ0123456789!#$%nopq'()*+,-hi.

351 if __nvJitLinkGetLinkedCubin == NULL: 1jklmPQbRScTdUefVWXYZ0123456789!#$%nopq'()*+,-hi.

352 with gil: 

353 raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") 

354 return (<nvJitLinkResult (*)(nvJitLinkHandle, void*) noexcept nogil>__nvJitLinkGetLinkedCubin)( 1jklmPQbRScTdUefVWXYZ0123456789!#$%nopq'()*+,-hi.

355 handle, cubin) 

356  

357  

358cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

359 global __nvJitLinkGetLinkedPtxSize 

360 _check_or_init_nvjitlink() 1zABCgLMNO

361 if __nvJitLinkGetLinkedPtxSize == NULL: 1zABCgLMNO

362 with gil: 

363 raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") 

364 return (<nvJitLinkResult (*)(nvJitLinkHandle, size_t*) noexcept nogil>__nvJitLinkGetLinkedPtxSize)( 1zABCgLMNO

365 handle, size) 

366  

367  

368cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

369 global __nvJitLinkGetLinkedPtx 

370 _check_or_init_nvjitlink() 1zABCgLMNO

371 if __nvJitLinkGetLinkedPtx == NULL: 1zABCgLMNO

372 with gil: 

373 raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") 

374 return (<nvJitLinkResult (*)(nvJitLinkHandle, char*) noexcept nogil>__nvJitLinkGetLinkedPtx)( 1zABCgLMNO

375 handle, ptx) 

376  

377  

378cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

379 global __nvJitLinkGetErrorLogSize 

380 _check_or_init_nvjitlink() 2/ : ; = jbP Q b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! g # $ % ? @ [ ] ' ( ) * + , - h i .

381 if __nvJitLinkGetErrorLogSize == NULL: 2/ : ; = jbP Q b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! g # $ % ? @ [ ] ' ( ) * + , - h i .

382 with gil: 

383 raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") 

384 return (<nvJitLinkResult (*)(nvJitLinkHandle, size_t*) noexcept nogil>__nvJitLinkGetErrorLogSize)( 2/ : ; = jbP Q b R S c T d U e f V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! g # $ % ? @ [ ] ' ( ) * + , - h i .

385 handle, size) 

386  

387  

388cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

389 global __nvJitLinkGetErrorLog 

390 _check_or_init_nvjitlink() 2/ : ; = jb? @ [ ]

391 if __nvJitLinkGetErrorLog == NULL: 2/ : ; = jb? @ [ ]

392 with gil: 

393 raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") 

394 return (<nvJitLinkResult (*)(nvJitLinkHandle, char*) noexcept nogil>__nvJitLinkGetErrorLog)( 2/ : ; = jb? @ [ ]

395 handle, log) 

396  

397  

398cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

399 global __nvJitLinkGetInfoLogSize 

400 _check_or_init_nvjitlink() 1rstuPQbRScTdUefVWXYZ0123456789!g#$%DEFG'()*+,-hi.

401 if __nvJitLinkGetInfoLogSize == NULL: 1rstuPQbRScTdUefVWXYZ0123456789!g#$%DEFG'()*+,-hi.

402 with gil: 

403 raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") 

404 return (<nvJitLinkResult (*)(nvJitLinkHandle, size_t*) noexcept nogil>__nvJitLinkGetInfoLogSize)( 1rstuPQbRScTdUefVWXYZ0123456789!g#$%DEFG'()*+,-hi.

405 handle, size) 

406  

407  

408cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

409 global __nvJitLinkGetInfoLog 

410 _check_or_init_nvjitlink() 1rstubcdefgDEFGhi

411 if __nvJitLinkGetInfoLog == NULL: 1rstubcdefgDEFGhi

412 with gil: 

413 raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") 

414 return (<nvJitLinkResult (*)(nvJitLinkHandle, char*) noexcept nogil>__nvJitLinkGetInfoLog)( 1rstubcdefgDEFGhi

415 handle, log) 

416  

417  

418cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

419 global __nvJitLinkVersion 

420 _check_or_init_nvjitlink() 2a JbKbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9b

421 if __nvJitLinkVersion == NULL: 2a JbKbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9b

422 with gil: 

423 raise FunctionNotFoundError("function nvJitLinkVersion is not found") 

424 return (<nvJitLinkResult (*)(unsigned int*, unsigned int*) noexcept nogil>__nvJitLinkVersion)( 2a JbKbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9b

425 major, minor) 

426  

427  

428cdef nvJitLinkResult _nvJitLinkGetLinkedLTOIRSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

429 global __nvJitLinkGetLinkedLTOIRSize 

430 _check_or_init_nvjitlink() 1vwxyHIJK

431 if __nvJitLinkGetLinkedLTOIRSize == NULL: 1vwxyHIJK

432 with gil: 

433 raise FunctionNotFoundError("function nvJitLinkGetLinkedLTOIRSize is not found") 

434 return (<nvJitLinkResult (*)(nvJitLinkHandle, size_t*) noexcept nogil>__nvJitLinkGetLinkedLTOIRSize)( 1vwxyHIJK

435 handle, size) 

436  

437  

438cdef nvJitLinkResult _nvJitLinkGetLinkedLTOIR(nvJitLinkHandle handle, void* ltoir) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: 

439 global __nvJitLinkGetLinkedLTOIR 

440 _check_or_init_nvjitlink() 1vwxyHIJK

441 if __nvJitLinkGetLinkedLTOIR == NULL: 1vwxyHIJK

442 with gil: 

443 raise FunctionNotFoundError("function nvJitLinkGetLinkedLTOIR is not found") 

444 return (<nvJitLinkResult (*)(nvJitLinkHandle, void*) noexcept nogil>__nvJitLinkGetLinkedLTOIR)( 1vwxyHIJK

445 handle, ltoir)