Skip to content

Commit eb9fdb4

Browse files
committed
Try to fix cast again
1 parent d240e09 commit eb9fdb4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cuda_bindings/cuda/bindings/cyruntime.pyx.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,10 +1898,14 @@ cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCa
18981898
# Load
18991899
with gil:
19001900
lib = load_nvidia_dynamic_lib("cudart")
1901+
{{if 'Windows' == platform.system()}}
1902+
handle = lib._handle_uint
1903+
{{else}}
19011904
handle = <void *><uintptr_t>lib._handle_uint
1905+
{{endif}}
19021906

19031907
{{if 'Windows' == platform.system()}}
1904-
__cudaRuntimeGetVersion = windll.GetProcAddress(<uintptr_t>handle, b'cudaRuntimeGetVersion')
1908+
__cudaRuntimeGetVersion = windll.GetProcAddress(handle, b'cudaRuntimeGetVersion')
19051909
{{else}}
19061910
__cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion')
19071911
{{endif}}

0 commit comments

Comments
 (0)