Skip to content

Commit 170a767

Browse files
committed
Fix up generated code
1 parent 532fdc9 commit 170a767

14 files changed

Lines changed: 2490 additions & 2669 deletions

File tree

cuda_bindings/cuda/bindings/_internal/_fast_enum.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3-
4-
5-
# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly.
3+
#
4+
# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly.
65

76

87
"""

cuda_bindings/cuda/bindings/_internal/driver.pxd

Lines changed: 19 additions & 50 deletions
Large diffs are not rendered by default.

cuda_bindings/cuda/bindings/_internal/driver_linux.pyx

Lines changed: 275 additions & 802 deletions
Large diffs are not rendered by default.

cuda_bindings/cuda/bindings/_internal/driver_windows.pyx

Lines changed: 275 additions & 802 deletions
Large diffs are not rendered by default.

cuda_bindings/cuda/bindings/_internal/nvrtc.pxd

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly.
5+
# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly.
66

77
from ..cynvrtc cimport *
88

@@ -35,8 +35,3 @@ cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_I
3535
cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil
3636
cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil
3737
cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void * callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil
38-
cdef nvrtcResult _nvrtcGetTileIRSize(nvrtcProgram prog, size_t* TileIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
39-
cdef nvrtcResult _nvrtcGetTileIR(nvrtcProgram prog, char* TileIR) except ?NVRTC_ERROR_INVALID_INPUT nogil
40-
cdef nvrtcResult _nvrtcInstallBundledHeaders(const char* installPath, unsigned int flags, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil
41-
cdef nvrtcResult _nvrtcGetBundledHeadersInfo(nvrtcBundledHeadersInfo* info, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil
42-
cdef nvrtcResult _nvrtcRemoveBundledHeaders(const char* installPath, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil

cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx

Lines changed: 1 addition & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly.
5+
# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t, uintptr_t
88

@@ -83,11 +83,6 @@ cdef void* __nvrtcSetPCHHeapSize = NULL
8383
cdef void* __nvrtcGetPCHCreateStatus = NULL
8484
cdef void* __nvrtcGetPCHHeapSizeRequired = NULL
8585
cdef void* __nvrtcSetFlowCallback = NULL
86-
cdef void* __nvrtcGetTileIRSize = NULL
87-
cdef void* __nvrtcGetTileIR = NULL
88-
cdef void* __nvrtcInstallBundledHeaders = NULL
89-
cdef void* __nvrtcGetBundledHeadersInfo = NULL
90-
cdef void* __nvrtcRemoveBundledHeaders = NULL
9186

9287

9388
cdef void* load_library() except* with gil:
@@ -274,41 +269,6 @@ cdef int _init_nvrtc() except -1 nogil:
274269
handle = load_library()
275270
__nvrtcSetFlowCallback = dlsym(handle, 'nvrtcSetFlowCallback')
276271

277-
global __nvrtcGetTileIRSize
278-
__nvrtcGetTileIRSize = dlsym(RTLD_DEFAULT, 'nvrtcGetTileIRSize')
279-
if __nvrtcGetTileIRSize == NULL:
280-
if handle == NULL:
281-
handle = load_library()
282-
__nvrtcGetTileIRSize = dlsym(handle, 'nvrtcGetTileIRSize')
283-
284-
global __nvrtcGetTileIR
285-
__nvrtcGetTileIR = dlsym(RTLD_DEFAULT, 'nvrtcGetTileIR')
286-
if __nvrtcGetTileIR == NULL:
287-
if handle == NULL:
288-
handle = load_library()
289-
__nvrtcGetTileIR = dlsym(handle, 'nvrtcGetTileIR')
290-
291-
global __nvrtcInstallBundledHeaders
292-
__nvrtcInstallBundledHeaders = dlsym(RTLD_DEFAULT, 'nvrtcInstallBundledHeaders')
293-
if __nvrtcInstallBundledHeaders == NULL:
294-
if handle == NULL:
295-
handle = load_library()
296-
__nvrtcInstallBundledHeaders = dlsym(handle, 'nvrtcInstallBundledHeaders')
297-
298-
global __nvrtcGetBundledHeadersInfo
299-
__nvrtcGetBundledHeadersInfo = dlsym(RTLD_DEFAULT, 'nvrtcGetBundledHeadersInfo')
300-
if __nvrtcGetBundledHeadersInfo == NULL:
301-
if handle == NULL:
302-
handle = load_library()
303-
__nvrtcGetBundledHeadersInfo = dlsym(handle, 'nvrtcGetBundledHeadersInfo')
304-
305-
global __nvrtcRemoveBundledHeaders
306-
__nvrtcRemoveBundledHeaders = dlsym(RTLD_DEFAULT, 'nvrtcRemoveBundledHeaders')
307-
if __nvrtcRemoveBundledHeaders == NULL:
308-
if handle == NULL:
309-
handle = load_library()
310-
__nvrtcRemoveBundledHeaders = dlsym(handle, 'nvrtcRemoveBundledHeaders')
311-
312272
__py_nvrtc_init = True
313273
return 0
314274

@@ -402,21 +362,6 @@ cpdef dict _inspect_function_pointers():
402362
global __nvrtcSetFlowCallback
403363
data["__nvrtcSetFlowCallback"] = <intptr_t>__nvrtcSetFlowCallback
404364

405-
global __nvrtcGetTileIRSize
406-
data["__nvrtcGetTileIRSize"] = <intptr_t>__nvrtcGetTileIRSize
407-
408-
global __nvrtcGetTileIR
409-
data["__nvrtcGetTileIR"] = <intptr_t>__nvrtcGetTileIR
410-
411-
global __nvrtcInstallBundledHeaders
412-
data["__nvrtcInstallBundledHeaders"] = <intptr_t>__nvrtcInstallBundledHeaders
413-
414-
global __nvrtcGetBundledHeadersInfo
415-
data["__nvrtcGetBundledHeadersInfo"] = <intptr_t>__nvrtcGetBundledHeadersInfo
416-
417-
global __nvrtcRemoveBundledHeaders
418-
data["__nvrtcRemoveBundledHeaders"] = <intptr_t>__nvrtcRemoveBundledHeaders
419-
420365
func_ptrs = data
421366
return data
422367

@@ -670,53 +615,3 @@ cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void * callback, void*
670615
raise FunctionNotFoundError("function nvrtcSetFlowCallback is not found")
671616
return (<nvrtcResult (*)(nvrtcProgram, void *, void*) noexcept nogil>__nvrtcSetFlowCallback)(
672617
prog, callback, payload)
673-
674-
675-
cdef nvrtcResult _nvrtcGetTileIRSize(nvrtcProgram prog, size_t* TileIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
676-
global __nvrtcGetTileIRSize
677-
_check_or_init_nvrtc()
678-
if __nvrtcGetTileIRSize == NULL:
679-
with gil:
680-
raise FunctionNotFoundError("function nvrtcGetTileIRSize is not found")
681-
return (<nvrtcResult (*)(nvrtcProgram, size_t*) noexcept nogil>__nvrtcGetTileIRSize)(
682-
prog, TileIRSizeRet)
683-
684-
685-
cdef nvrtcResult _nvrtcGetTileIR(nvrtcProgram prog, char* TileIR) except ?NVRTC_ERROR_INVALID_INPUT nogil:
686-
global __nvrtcGetTileIR
687-
_check_or_init_nvrtc()
688-
if __nvrtcGetTileIR == NULL:
689-
with gil:
690-
raise FunctionNotFoundError("function nvrtcGetTileIR is not found")
691-
return (<nvrtcResult (*)(nvrtcProgram, char*) noexcept nogil>__nvrtcGetTileIR)(
692-
prog, TileIR)
693-
694-
695-
cdef nvrtcResult _nvrtcInstallBundledHeaders(const char* installPath, unsigned int flags, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
696-
global __nvrtcInstallBundledHeaders
697-
_check_or_init_nvrtc()
698-
if __nvrtcInstallBundledHeaders == NULL:
699-
with gil:
700-
raise FunctionNotFoundError("function nvrtcInstallBundledHeaders is not found")
701-
return (<nvrtcResult (*)(const char*, unsigned int, const char**) noexcept nogil>__nvrtcInstallBundledHeaders)(
702-
installPath, flags, errorLog)
703-
704-
705-
cdef nvrtcResult _nvrtcGetBundledHeadersInfo(nvrtcBundledHeadersInfo* info, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
706-
global __nvrtcGetBundledHeadersInfo
707-
_check_or_init_nvrtc()
708-
if __nvrtcGetBundledHeadersInfo == NULL:
709-
with gil:
710-
raise FunctionNotFoundError("function nvrtcGetBundledHeadersInfo is not found")
711-
return (<nvrtcResult (*)(nvrtcBundledHeadersInfo*, const char**) noexcept nogil>__nvrtcGetBundledHeadersInfo)(
712-
info, errorLog)
713-
714-
715-
cdef nvrtcResult _nvrtcRemoveBundledHeaders(const char* installPath, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
716-
global __nvrtcRemoveBundledHeaders
717-
_check_or_init_nvrtc()
718-
if __nvrtcRemoveBundledHeaders == NULL:
719-
with gil:
720-
raise FunctionNotFoundError("function nvrtcRemoveBundledHeaders is not found")
721-
return (<nvrtcResult (*)(const char*, const char**) noexcept nogil>__nvrtcRemoveBundledHeaders)(
722-
installPath, errorLog)

cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx

Lines changed: 1 addition & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly.
5+
# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t
88

@@ -101,11 +101,6 @@ cdef void* __nvrtcSetPCHHeapSize = NULL
101101
cdef void* __nvrtcGetPCHCreateStatus = NULL
102102
cdef void* __nvrtcGetPCHHeapSizeRequired = NULL
103103
cdef void* __nvrtcSetFlowCallback = NULL
104-
cdef void* __nvrtcGetTileIRSize = NULL
105-
cdef void* __nvrtcGetTileIR = NULL
106-
cdef void* __nvrtcInstallBundledHeaders = NULL
107-
cdef void* __nvrtcGetBundledHeadersInfo = NULL
108-
cdef void* __nvrtcRemoveBundledHeaders = NULL
109104

110105

111106
cdef int _init_nvrtc() except -1 nogil:
@@ -192,21 +187,6 @@ cdef int _init_nvrtc() except -1 nogil:
192187
global __nvrtcSetFlowCallback
193188
__nvrtcSetFlowCallback = GetProcAddress(handle, 'nvrtcSetFlowCallback')
194189

195-
global __nvrtcGetTileIRSize
196-
__nvrtcGetTileIRSize = GetProcAddress(handle, 'nvrtcGetTileIRSize')
197-
198-
global __nvrtcGetTileIR
199-
__nvrtcGetTileIR = GetProcAddress(handle, 'nvrtcGetTileIR')
200-
201-
global __nvrtcInstallBundledHeaders
202-
__nvrtcInstallBundledHeaders = GetProcAddress(handle, 'nvrtcInstallBundledHeaders')
203-
204-
global __nvrtcGetBundledHeadersInfo
205-
__nvrtcGetBundledHeadersInfo = GetProcAddress(handle, 'nvrtcGetBundledHeadersInfo')
206-
207-
global __nvrtcRemoveBundledHeaders
208-
__nvrtcRemoveBundledHeaders = GetProcAddress(handle, 'nvrtcRemoveBundledHeaders')
209-
210190
__py_nvrtc_init = True
211191
return 0
212192

@@ -300,21 +280,6 @@ cpdef dict _inspect_function_pointers():
300280
global __nvrtcSetFlowCallback
301281
data["__nvrtcSetFlowCallback"] = <intptr_t>__nvrtcSetFlowCallback
302282

303-
global __nvrtcGetTileIRSize
304-
data["__nvrtcGetTileIRSize"] = <intptr_t>__nvrtcGetTileIRSize
305-
306-
global __nvrtcGetTileIR
307-
data["__nvrtcGetTileIR"] = <intptr_t>__nvrtcGetTileIR
308-
309-
global __nvrtcInstallBundledHeaders
310-
data["__nvrtcInstallBundledHeaders"] = <intptr_t>__nvrtcInstallBundledHeaders
311-
312-
global __nvrtcGetBundledHeadersInfo
313-
data["__nvrtcGetBundledHeadersInfo"] = <intptr_t>__nvrtcGetBundledHeadersInfo
314-
315-
global __nvrtcRemoveBundledHeaders
316-
data["__nvrtcRemoveBundledHeaders"] = <intptr_t>__nvrtcRemoveBundledHeaders
317-
318283
func_ptrs = data
319284
return data
320285

@@ -568,53 +533,3 @@ cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void * callback, void*
568533
raise FunctionNotFoundError("function nvrtcSetFlowCallback is not found")
569534
return (<nvrtcResult (*)(nvrtcProgram, void *, void*) noexcept nogil>__nvrtcSetFlowCallback)(
570535
prog, callback, payload)
571-
572-
573-
cdef nvrtcResult _nvrtcGetTileIRSize(nvrtcProgram prog, size_t* TileIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
574-
global __nvrtcGetTileIRSize
575-
_check_or_init_nvrtc()
576-
if __nvrtcGetTileIRSize == NULL:
577-
with gil:
578-
raise FunctionNotFoundError("function nvrtcGetTileIRSize is not found")
579-
return (<nvrtcResult (*)(nvrtcProgram, size_t*) noexcept nogil>__nvrtcGetTileIRSize)(
580-
prog, TileIRSizeRet)
581-
582-
583-
cdef nvrtcResult _nvrtcGetTileIR(nvrtcProgram prog, char* TileIR) except ?NVRTC_ERROR_INVALID_INPUT nogil:
584-
global __nvrtcGetTileIR
585-
_check_or_init_nvrtc()
586-
if __nvrtcGetTileIR == NULL:
587-
with gil:
588-
raise FunctionNotFoundError("function nvrtcGetTileIR is not found")
589-
return (<nvrtcResult (*)(nvrtcProgram, char*) noexcept nogil>__nvrtcGetTileIR)(
590-
prog, TileIR)
591-
592-
593-
cdef nvrtcResult _nvrtcInstallBundledHeaders(const char* installPath, unsigned int flags, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
594-
global __nvrtcInstallBundledHeaders
595-
_check_or_init_nvrtc()
596-
if __nvrtcInstallBundledHeaders == NULL:
597-
with gil:
598-
raise FunctionNotFoundError("function nvrtcInstallBundledHeaders is not found")
599-
return (<nvrtcResult (*)(const char*, unsigned int, const char**) noexcept nogil>__nvrtcInstallBundledHeaders)(
600-
installPath, flags, errorLog)
601-
602-
603-
cdef nvrtcResult _nvrtcGetBundledHeadersInfo(nvrtcBundledHeadersInfo* info, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
604-
global __nvrtcGetBundledHeadersInfo
605-
_check_or_init_nvrtc()
606-
if __nvrtcGetBundledHeadersInfo == NULL:
607-
with gil:
608-
raise FunctionNotFoundError("function nvrtcGetBundledHeadersInfo is not found")
609-
return (<nvrtcResult (*)(nvrtcBundledHeadersInfo*, const char**) noexcept nogil>__nvrtcGetBundledHeadersInfo)(
610-
info, errorLog)
611-
612-
613-
cdef nvrtcResult _nvrtcRemoveBundledHeaders(const char* installPath, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
614-
global __nvrtcRemoveBundledHeaders
615-
_check_or_init_nvrtc()
616-
if __nvrtcRemoveBundledHeaders == NULL:
617-
with gil:
618-
raise FunctionNotFoundError("function nvrtcRemoveBundledHeaders is not found")
619-
return (<nvrtcResult (*)(const char*, const char**) noexcept nogil>__nvrtcRemoveBundledHeaders)(
620-
installPath, errorLog)

cuda_bindings/cuda/bindings/_lib/utils.pxd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,6 @@ cdef class _HelperCUmemAllocationHandleType:
142142
cdef driver.CUmemFabricHandle _mem_fabric_handle
143143

144144

145-
cdef class _HelperCUlogicalEndpointIpcHandleType:
146-
cdef void* _cptr
147-
cdef cydriver.CUlogicalEndpointIpcHandleType_enum _type
148-
149-
# Return values
150-
cdef int _int
151-
cdef driver.CUlogicalEndpointFabricHandle _fabric_handle
152-
153-
154145
cdef class _InputVoidPtrPtrHelper:
155146
cdef object _references
156147
cdef void** _cptr

cuda_bindings/cuda/bindings/_lib/utils.pxi

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -595,45 +595,6 @@ cdef class _HelperCUmemAllocationHandleType:
595595
raise TypeError('Unsupported attribute: {}'.format(self._type))
596596

597597

598-
cdef class _HelperCUlogicalEndpointIpcHandleType:
599-
def __cinit__(self, attr):
600-
self._type = attr.value
601-
if False:
602-
pass
603-
604-
elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_NONE,):
605-
self._cptr = <void*>&self._int
606-
607-
608-
elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_FABRIC,):
609-
self._fabric_handle = _driver["CUlogicalEndpointFabricHandle"]()
610-
self._cptr = <void*><void_ptr>self._fabric_handle.getPtr()
611-
612-
else:
613-
raise TypeError('Unsupported attribute: {}'.format(attr.name))
614-
615-
def __dealloc__(self):
616-
pass
617-
618-
@property
619-
def cptr(self):
620-
return <void_ptr>self._cptr
621-
622-
def pyObj(self):
623-
if False:
624-
pass
625-
626-
elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_NONE,):
627-
return self._int
628-
629-
630-
elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_FABRIC,):
631-
return self._fabric_handle
632-
633-
else:
634-
raise TypeError('Unsupported attribute: {}'.format(self._type))
635-
636-
637598
cdef class _InputVoidPtrPtrHelper:
638599
def __cinit__(self, lst):
639600
# Hold onto references to the original buffers so they

0 commit comments

Comments
 (0)