Skip to content

Commit 45c27f2

Browse files
committed
reroute both entry point _inspect_function_pointer(name) and _inspect_function_pointers() to a single build function having the fix
1 parent ab8ac53 commit 45c27f2

2 files changed

Lines changed: 18 additions & 20 deletions

File tree

‎cuda_bindings_13/cuda/bindings/_internal/driver_linux.pyx‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# This code was automatically generated across versions from 12.9.0 to 13.5.0. Do not modify it directly.
66
# !!! WARNING: THIS FILE CONTAINS PRERELEASE APIs !!!
7-
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4cb5d4dc3795831a0f50a8ecf92dbe9b963a2cb908cb657db98e7f14d7164512
7+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bcb0306e1a5e714a98ec08dcce8b16f01459e21d6d2df027c1e7b5df0e392198
88

99

1010
# <<<< PREAMBLE CONTENT >>>>
@@ -2203,11 +2203,7 @@ cdef inline int _check_or_init_driver() except -1 nogil:
22032203
return _init_driver()
22042204

22052205

2206-
cpdef dict _inspect_function_pointers():
2207-
global _cyb_func_ptrs
2208-
if _cyb_func_ptrs is not None:
2209-
return _cyb_func_ptrs
2210-
2206+
cdef dict _build_function_pointers():
22112207
_check_or_init_driver()
22122208
cdef dict data = {}
22132209
global __cuGetErrorString
@@ -3787,17 +3783,20 @@ cpdef dict _inspect_function_pointers():
37873783

37883784
global __cuTensorMapSetAllocationClass
37893785
data["__cuTensorMapSetAllocationClass"] = <intptr_t>__cuTensorMapSetAllocationClass
3790-
_cyb_func_ptrs = data
37913786
return data
37923787

37933788

3794-
cpdef _inspect_function_pointer(str name):
3789+
cpdef dict _inspect_function_pointers():
37953790
global _cyb_func_ptrs
37963791
if _cyb_func_ptrs is None:
37973792
with _cyb_func_ptrs_lock:
37983793
if _cyb_func_ptrs is None:
3799-
_cyb_func_ptrs = _inspect_function_pointers()
3800-
return _cyb_func_ptrs[name]
3794+
_cyb_func_ptrs = _build_function_pointers()
3795+
return _cyb_func_ptrs
3796+
3797+
3798+
cpdef _inspect_function_pointer(str name):
3799+
return _inspect_function_pointers()[name]
38013800

38023801

38033802

‎cuda_bindings_13/cuda/bindings/_internal/driver_windows.pyx‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# This code was automatically generated across versions from 12.9.0 to 13.5.0. Do not modify it directly.
66
# !!! WARNING: THIS FILE CONTAINS PRERELEASE APIs !!!
7-
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=95db262e65cd453b232f6c9eb3b4574a4bc371eb384b224b3c2b6f85778bd38e
7+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8b56814f7e4876ba0386c167c8bd1f0f024f3c5c5350557b4dfc72446fe38979
88

99

1010
# <<<< PREAMBLE CONTENT >>>>
@@ -2206,11 +2206,7 @@ cdef inline int _check_or_init_driver() except -1 nogil:
22062206
return _init_driver()
22072207

22082208

2209-
cpdef dict _inspect_function_pointers():
2210-
global _cyb_func_ptrs
2211-
if _cyb_func_ptrs is not None:
2212-
return _cyb_func_ptrs
2213-
2209+
cdef dict _build_function_pointers():
22142210
_check_or_init_driver()
22152211
cdef dict data = {}
22162212
global __cuGetErrorString
@@ -3790,17 +3786,20 @@ cpdef dict _inspect_function_pointers():
37903786

37913787
global __cuTensorMapSetAllocationClass
37923788
data["__cuTensorMapSetAllocationClass"] = <intptr_t>__cuTensorMapSetAllocationClass
3793-
_cyb_func_ptrs = data
37943789
return data
37953790

37963791

3797-
cpdef _inspect_function_pointer(str name):
3792+
cpdef dict _inspect_function_pointers():
37983793
global _cyb_func_ptrs
37993794
if _cyb_func_ptrs is None:
38003795
with _cyb_func_ptrs_lock:
38013796
if _cyb_func_ptrs is None:
3802-
_cyb_func_ptrs = _inspect_function_pointers()
3803-
return _cyb_func_ptrs[name]
3797+
_cyb_func_ptrs = _build_function_pointers()
3798+
return _cyb_func_ptrs
3799+
3800+
3801+
cpdef _inspect_function_pointer(str name):
3802+
return _inspect_function_pointers()[name]
38043803

38053804

38063805

0 commit comments

Comments
 (0)