From 72607a54a3fcece0e157b4c8d91c00a247cd4922 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Fri, 19 Sep 2025 09:31:51 -0400 Subject: [PATCH] Backport #962 and #969 to 12.9.x --- .../cuda/bindings/_bindings/cydriver.pyx.in | 3926 +++++------------ .../cuda/bindings/_bindings/cynvrtc.pyx.in | 187 +- cuda_bindings/cuda/bindings/_lib/windll.pxd | 45 + cuda_bindings/cuda/bindings/cyruntime.pyx.in | 33 +- cuda_bindings/cuda/bindings/driver.pyx.in | 138 +- cuda_bindings/cuda/bindings/runtime.pyx.in | 96 +- 6 files changed, 1361 insertions(+), 3064 deletions(-) create mode 100644 cuda_bindings/cuda/bindings/_lib/windll.pxd diff --git a/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in index 89044a8fd6..e8e213de21 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in @@ -4,12 +4,11 @@ # This code was automatically generated with version 12.9.0. Do not modify it directly. {{if 'Windows' == platform.system()}} import os -import win32api -from pywintypes import error +cimport cuda.bindings._lib.windll as windll {{else}} cimport cuda.bindings._lib.dlfcn as dlfcn {{endif}} -from libc.stdint cimport intptr_t +from libc.stdint cimport intptr_t, uintptr_t import os import sys cimport cuda.bindings._bindings.loader as loader @@ -517,24 +516,19 @@ cdef int _cuPythonInit() except -1 nogil: {{endif}} {{if 'Windows' == platform.system()}} - LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 - try: - handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32) - except error as e: + handle = windll.LoadLibraryExW(path, NULL, windll.LOAD_LIBRARY_SEARCH_SYSTEM32) + if handle == 0: raise RuntimeError('Failed to LoadLibraryEx ' + path) {{else}} handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) - if (handle == NULL): + if handle == NULL: raise RuntimeError('Failed to dlopen ' + path) {{endif}} # Get latest __cuGetProcAddress_v2 global __cuGetProcAddress_v2 {{if 'Windows' == platform.system()}} - try: - __cuGetProcAddress_v2 = win32api.GetProcAddress(handle, 'cuGetProcAddress_v2') - except: - pass + __cuGetProcAddress_v2 = windll.GetProcAddress(handle, 'cuGetProcAddress_v2') {{else}} __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') {{endif}} @@ -2790,3914 +2784,2240 @@ cdef int _cuPythonInit() except -1 nogil: # Get all PTDS version of functions pass {{if 'cuMemcpy' in found_functions}} - try: - global __cuMemcpy - __cuMemcpy = win32api.GetProcAddress(handle, 'cuMemcpy_ptds') - except: - pass + global __cuMemcpy + __cuMemcpy = windll.GetProcAddress(handle, 'cuMemcpy_ptds') {{endif}} {{if 'cuMemcpyPeer' in found_functions}} - try: - global __cuMemcpyPeer - __cuMemcpyPeer = win32api.GetProcAddress(handle, 'cuMemcpyPeer_ptds') - except: - pass + global __cuMemcpyPeer + __cuMemcpyPeer = windll.GetProcAddress(handle, 'cuMemcpyPeer_ptds') {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} - try: - global __cuMemcpyHtoD_v2 - __cuMemcpyHtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2_ptds') - except: - pass + global __cuMemcpyHtoD_v2 + __cuMemcpyHtoD_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoD_v2_ptds') {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} - try: - global __cuMemcpyDtoH_v2 - __cuMemcpyDtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2_ptds') - except: - pass + global __cuMemcpyDtoH_v2 + __cuMemcpyDtoH_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoH_v2_ptds') {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} - try: - global __cuMemcpyDtoD_v2 - __cuMemcpyDtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2_ptds') - except: - pass + global __cuMemcpyDtoD_v2 + __cuMemcpyDtoD_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoD_v2_ptds') {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} - try: - global __cuMemcpyDtoA_v2 - __cuMemcpyDtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2_ptds') - except: - pass + global __cuMemcpyDtoA_v2 + __cuMemcpyDtoA_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoA_v2_ptds') {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} - try: - global __cuMemcpyAtoD_v2 - __cuMemcpyAtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2_ptds') - except: - pass + global __cuMemcpyAtoD_v2 + __cuMemcpyAtoD_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoD_v2_ptds') {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} - try: - global __cuMemcpyHtoA_v2 - __cuMemcpyHtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2_ptds') - except: - pass + global __cuMemcpyHtoA_v2 + __cuMemcpyHtoA_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoA_v2_ptds') {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} - try: - global __cuMemcpyAtoH_v2 - __cuMemcpyAtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2_ptds') - except: - pass + global __cuMemcpyAtoH_v2 + __cuMemcpyAtoH_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoH_v2_ptds') {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} - try: - global __cuMemcpyAtoA_v2 - __cuMemcpyAtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2_ptds') - except: - pass + global __cuMemcpyAtoA_v2 + __cuMemcpyAtoA_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoA_v2_ptds') {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} - try: - global __cuMemcpy2D_v2 - __cuMemcpy2D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2D_v2_ptds') - except: - pass + global __cuMemcpy2D_v2 + __cuMemcpy2D_v2 = windll.GetProcAddress(handle, 'cuMemcpy2D_v2_ptds') {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} - try: - global __cuMemcpy2DUnaligned_v2 - __cuMemcpy2DUnaligned_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2_ptds') - except: - pass + global __cuMemcpy2DUnaligned_v2 + __cuMemcpy2DUnaligned_v2 = windll.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2_ptds') {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} - try: - global __cuMemcpy3D_v2 - __cuMemcpy3D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3D_v2_ptds') - except: - pass + global __cuMemcpy3D_v2 + __cuMemcpy3D_v2 = windll.GetProcAddress(handle, 'cuMemcpy3D_v2_ptds') {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} - try: - global __cuMemcpy3DPeer - __cuMemcpy3DPeer = win32api.GetProcAddress(handle, 'cuMemcpy3DPeer_ptds') - except: - pass + global __cuMemcpy3DPeer + __cuMemcpy3DPeer = windll.GetProcAddress(handle, 'cuMemcpy3DPeer_ptds') {{endif}} {{if 'cuMemcpyAsync' in found_functions}} - try: - global __cuMemcpyAsync - __cuMemcpyAsync = win32api.GetProcAddress(handle, 'cuMemcpyAsync_ptsz') - except: - pass + global __cuMemcpyAsync + __cuMemcpyAsync = windll.GetProcAddress(handle, 'cuMemcpyAsync_ptsz') {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} - try: - global __cuMemcpyPeerAsync - __cuMemcpyPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync_ptsz') - except: - pass + global __cuMemcpyPeerAsync + __cuMemcpyPeerAsync = windll.GetProcAddress(handle, 'cuMemcpyPeerAsync_ptsz') {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} - try: - global __cuMemcpyHtoDAsync_v2 - __cuMemcpyHtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2_ptsz') - except: - pass + global __cuMemcpyHtoDAsync_v2 + __cuMemcpyHtoDAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} - try: - global __cuMemcpyDtoHAsync_v2 - __cuMemcpyDtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2_ptsz') - except: - pass + global __cuMemcpyDtoHAsync_v2 + __cuMemcpyDtoHAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} - try: - global __cuMemcpyDtoDAsync_v2 - __cuMemcpyDtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2_ptsz') - except: - pass + global __cuMemcpyDtoDAsync_v2 + __cuMemcpyDtoDAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} - try: - global __cuMemcpyHtoAAsync_v2 - __cuMemcpyHtoAAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2_ptsz') - except: - pass + global __cuMemcpyHtoAAsync_v2 + __cuMemcpyHtoAAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} - try: - global __cuMemcpyAtoHAsync_v2 - __cuMemcpyAtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2_ptsz') - except: - pass + global __cuMemcpyAtoHAsync_v2 + __cuMemcpyAtoHAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2_ptsz') {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} - try: - global __cuMemcpy2DAsync_v2 - __cuMemcpy2DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2_ptsz') - except: - pass + global __cuMemcpy2DAsync_v2 + __cuMemcpy2DAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpy2DAsync_v2_ptsz') {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} - try: - global __cuMemcpy3DAsync_v2 - __cuMemcpy3DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2_ptsz') - except: - pass + global __cuMemcpy3DAsync_v2 + __cuMemcpy3DAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpy3DAsync_v2_ptsz') {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} - try: - global __cuMemcpy3DPeerAsync - __cuMemcpy3DPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync_ptsz') - except: - pass + global __cuMemcpy3DPeerAsync + __cuMemcpy3DPeerAsync = windll.GetProcAddress(handle, 'cuMemcpy3DPeerAsync_ptsz') {{endif}} {{if 'cuMemcpyBatchAsync' in found_functions}} - try: - global __cuMemcpyBatchAsync - __cuMemcpyBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpyBatchAsync_ptsz') - except: - pass + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = windll.GetProcAddress(handle, 'cuMemcpyBatchAsync_ptsz') {{endif}} {{if 'cuMemcpy3DBatchAsync' in found_functions}} - try: - global __cuMemcpy3DBatchAsync - __cuMemcpy3DBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DBatchAsync_ptsz') - except: - pass + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = windll.GetProcAddress(handle, 'cuMemcpy3DBatchAsync_ptsz') {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} - try: - global __cuMemsetD8_v2 - __cuMemsetD8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD8_v2_ptds') - except: - pass + global __cuMemsetD8_v2 + __cuMemsetD8_v2 = windll.GetProcAddress(handle, 'cuMemsetD8_v2_ptds') {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} - try: - global __cuMemsetD16_v2 - __cuMemsetD16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD16_v2_ptds') - except: - pass + global __cuMemsetD16_v2 + __cuMemsetD16_v2 = windll.GetProcAddress(handle, 'cuMemsetD16_v2_ptds') {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} - try: - global __cuMemsetD32_v2 - __cuMemsetD32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD32_v2_ptds') - except: - pass + global __cuMemsetD32_v2 + __cuMemsetD32_v2 = windll.GetProcAddress(handle, 'cuMemsetD32_v2_ptds') {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} - try: - global __cuMemsetD2D8_v2 - __cuMemsetD2D8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2_ptds') - except: - pass + global __cuMemsetD2D8_v2 + __cuMemsetD2D8_v2 = windll.GetProcAddress(handle, 'cuMemsetD2D8_v2_ptds') {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} - try: - global __cuMemsetD2D16_v2 - __cuMemsetD2D16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2_ptds') - except: - pass + global __cuMemsetD2D16_v2 + __cuMemsetD2D16_v2 = windll.GetProcAddress(handle, 'cuMemsetD2D16_v2_ptds') {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} - try: - global __cuMemsetD2D32_v2 - __cuMemsetD2D32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2_ptds') - except: - pass + global __cuMemsetD2D32_v2 + __cuMemsetD2D32_v2 = windll.GetProcAddress(handle, 'cuMemsetD2D32_v2_ptds') {{endif}} {{if 'cuMemsetD8Async' in found_functions}} - try: - global __cuMemsetD8Async - __cuMemsetD8Async = win32api.GetProcAddress(handle, 'cuMemsetD8Async_ptsz') - except: - pass + global __cuMemsetD8Async + __cuMemsetD8Async = windll.GetProcAddress(handle, 'cuMemsetD8Async_ptsz') {{endif}} {{if 'cuMemsetD16Async' in found_functions}} - try: - global __cuMemsetD16Async - __cuMemsetD16Async = win32api.GetProcAddress(handle, 'cuMemsetD16Async_ptsz') - except: - pass + global __cuMemsetD16Async + __cuMemsetD16Async = windll.GetProcAddress(handle, 'cuMemsetD16Async_ptsz') {{endif}} {{if 'cuMemsetD32Async' in found_functions}} - try: - global __cuMemsetD32Async - __cuMemsetD32Async = win32api.GetProcAddress(handle, 'cuMemsetD32Async_ptsz') - except: - pass + global __cuMemsetD32Async + __cuMemsetD32Async = windll.GetProcAddress(handle, 'cuMemsetD32Async_ptsz') {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} - try: - global __cuMemsetD2D8Async - __cuMemsetD2D8Async = win32api.GetProcAddress(handle, 'cuMemsetD2D8Async_ptsz') - except: - pass + global __cuMemsetD2D8Async + __cuMemsetD2D8Async = windll.GetProcAddress(handle, 'cuMemsetD2D8Async_ptsz') {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} - try: - global __cuMemsetD2D16Async - __cuMemsetD2D16Async = win32api.GetProcAddress(handle, 'cuMemsetD2D16Async_ptsz') - except: - pass + global __cuMemsetD2D16Async + __cuMemsetD2D16Async = windll.GetProcAddress(handle, 'cuMemsetD2D16Async_ptsz') {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} - try: - global __cuMemsetD2D32Async - __cuMemsetD2D32Async = win32api.GetProcAddress(handle, 'cuMemsetD2D32Async_ptsz') - except: - pass + global __cuMemsetD2D32Async + __cuMemsetD2D32Async = windll.GetProcAddress(handle, 'cuMemsetD2D32Async_ptsz') {{endif}} {{if 'cuMemBatchDecompressAsync' in found_functions}} - try: - global __cuMemBatchDecompressAsync - __cuMemBatchDecompressAsync = win32api.GetProcAddress(handle, 'cuMemBatchDecompressAsync_ptsz') - except: - pass + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = windll.GetProcAddress(handle, 'cuMemBatchDecompressAsync_ptsz') {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} - try: - global __cuMemMapArrayAsync - __cuMemMapArrayAsync = win32api.GetProcAddress(handle, 'cuMemMapArrayAsync_ptsz') - except: - pass + global __cuMemMapArrayAsync + __cuMemMapArrayAsync = windll.GetProcAddress(handle, 'cuMemMapArrayAsync_ptsz') {{endif}} {{if 'cuMemFreeAsync' in found_functions}} - try: - global __cuMemFreeAsync - __cuMemFreeAsync = win32api.GetProcAddress(handle, 'cuMemFreeAsync_ptsz') - except: - pass + global __cuMemFreeAsync + __cuMemFreeAsync = windll.GetProcAddress(handle, 'cuMemFreeAsync_ptsz') {{endif}} {{if 'cuMemAllocAsync' in found_functions}} - try: - global __cuMemAllocAsync - __cuMemAllocAsync = win32api.GetProcAddress(handle, 'cuMemAllocAsync_ptsz') - except: - pass + global __cuMemAllocAsync + __cuMemAllocAsync = windll.GetProcAddress(handle, 'cuMemAllocAsync_ptsz') {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} - try: - global __cuMemAllocFromPoolAsync - __cuMemAllocFromPoolAsync = win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync_ptsz') - except: - pass + global __cuMemAllocFromPoolAsync + __cuMemAllocFromPoolAsync = windll.GetProcAddress(handle, 'cuMemAllocFromPoolAsync_ptsz') {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} - try: - global __cuMemPrefetchAsync - __cuMemPrefetchAsync = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_ptsz') - except: - pass + global __cuMemPrefetchAsync + __cuMemPrefetchAsync = windll.GetProcAddress(handle, 'cuMemPrefetchAsync_ptsz') {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} - try: - global __cuMemPrefetchAsync_v2 - __cuMemPrefetchAsync_v2 = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2_ptsz') - except: - pass + global __cuMemPrefetchAsync_v2 + __cuMemPrefetchAsync_v2 = windll.GetProcAddress(handle, 'cuMemPrefetchAsync_v2_ptsz') {{endif}} {{if 'cuStreamGetPriority' in found_functions}} - try: - global __cuStreamGetPriority - __cuStreamGetPriority = win32api.GetProcAddress(handle, 'cuStreamGetPriority_ptsz') - except: - pass + global __cuStreamGetPriority + __cuStreamGetPriority = windll.GetProcAddress(handle, 'cuStreamGetPriority_ptsz') {{endif}} {{if 'cuStreamGetDevice' in found_functions}} - try: - global __cuStreamGetDevice - __cuStreamGetDevice = win32api.GetProcAddress(handle, 'cuStreamGetDevice_ptsz') - except: - pass + global __cuStreamGetDevice + __cuStreamGetDevice = windll.GetProcAddress(handle, 'cuStreamGetDevice_ptsz') {{endif}} {{if 'cuStreamGetFlags' in found_functions}} - try: - global __cuStreamGetFlags - __cuStreamGetFlags = win32api.GetProcAddress(handle, 'cuStreamGetFlags_ptsz') - except: - pass + global __cuStreamGetFlags + __cuStreamGetFlags = windll.GetProcAddress(handle, 'cuStreamGetFlags_ptsz') {{endif}} {{if 'cuStreamGetId' in found_functions}} - try: - global __cuStreamGetId - __cuStreamGetId = win32api.GetProcAddress(handle, 'cuStreamGetId_ptsz') - except: - pass + global __cuStreamGetId + __cuStreamGetId = windll.GetProcAddress(handle, 'cuStreamGetId_ptsz') {{endif}} {{if 'cuStreamGetCtx' in found_functions}} - try: - global __cuStreamGetCtx - __cuStreamGetCtx = win32api.GetProcAddress(handle, 'cuStreamGetCtx_ptsz') - except: - pass + global __cuStreamGetCtx + __cuStreamGetCtx = windll.GetProcAddress(handle, 'cuStreamGetCtx_ptsz') {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} - try: - global __cuStreamGetCtx_v2 - __cuStreamGetCtx_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCtx_v2_ptsz') - except: - pass + global __cuStreamGetCtx_v2 + __cuStreamGetCtx_v2 = windll.GetProcAddress(handle, 'cuStreamGetCtx_v2_ptsz') {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} - try: - global __cuStreamWaitEvent - __cuStreamWaitEvent = win32api.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz') - except: - pass + global __cuStreamWaitEvent + __cuStreamWaitEvent = windll.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz') {{endif}} {{if 'cuStreamAddCallback' in found_functions}} - try: - global __cuStreamAddCallback - __cuStreamAddCallback = win32api.GetProcAddress(handle, 'cuStreamAddCallback_ptsz') - except: - pass + global __cuStreamAddCallback + __cuStreamAddCallback = windll.GetProcAddress(handle, 'cuStreamAddCallback_ptsz') {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} - try: - global __cuStreamBeginCapture_v2 - __cuStreamBeginCapture_v2 = win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz') - except: - pass + global __cuStreamBeginCapture_v2 + __cuStreamBeginCapture_v2 = windll.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz') {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} - try: - global __cuStreamBeginCaptureToGraph - __cuStreamBeginCaptureToGraph = win32api.GetProcAddress(handle, 'cuStreamBeginCaptureToGraph_ptsz') - except: - pass + global __cuStreamBeginCaptureToGraph + __cuStreamBeginCaptureToGraph = windll.GetProcAddress(handle, 'cuStreamBeginCaptureToGraph_ptsz') {{endif}} {{if 'cuStreamEndCapture' in found_functions}} - try: - global __cuStreamEndCapture - __cuStreamEndCapture = win32api.GetProcAddress(handle, 'cuStreamEndCapture_ptsz') - except: - pass + global __cuStreamEndCapture + __cuStreamEndCapture = windll.GetProcAddress(handle, 'cuStreamEndCapture_ptsz') {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} - try: - global __cuStreamIsCapturing - __cuStreamIsCapturing = win32api.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz') - except: - pass + global __cuStreamIsCapturing + __cuStreamIsCapturing = windll.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz') {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} - try: - global __cuStreamGetCaptureInfo_v2 - __cuStreamGetCaptureInfo_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz') - except: - pass + global __cuStreamGetCaptureInfo_v2 + __cuStreamGetCaptureInfo_v2 = windll.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz') {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} - try: - global __cuStreamGetCaptureInfo_v3 - __cuStreamGetCaptureInfo_v3 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v3_ptsz') - except: - pass + global __cuStreamGetCaptureInfo_v3 + __cuStreamGetCaptureInfo_v3 = windll.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v3_ptsz') {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} - try: - global __cuStreamUpdateCaptureDependencies - __cuStreamUpdateCaptureDependencies = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz') - except: - pass + global __cuStreamUpdateCaptureDependencies + __cuStreamUpdateCaptureDependencies = windll.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz') {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} - try: - global __cuStreamUpdateCaptureDependencies_v2 - __cuStreamUpdateCaptureDependencies_v2 = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') - except: - pass + global __cuStreamUpdateCaptureDependencies_v2 + __cuStreamUpdateCaptureDependencies_v2 = windll.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} - try: - global __cuStreamAttachMemAsync - __cuStreamAttachMemAsync = win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz') - except: - pass + global __cuStreamAttachMemAsync + __cuStreamAttachMemAsync = windll.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz') {{endif}} {{if 'cuStreamQuery' in found_functions}} - try: - global __cuStreamQuery - __cuStreamQuery = win32api.GetProcAddress(handle, 'cuStreamQuery_ptsz') - except: - pass + global __cuStreamQuery + __cuStreamQuery = windll.GetProcAddress(handle, 'cuStreamQuery_ptsz') {{endif}} {{if 'cuStreamSynchronize' in found_functions}} - try: - global __cuStreamSynchronize - __cuStreamSynchronize = win32api.GetProcAddress(handle, 'cuStreamSynchronize_ptsz') - except: - pass + global __cuStreamSynchronize + __cuStreamSynchronize = windll.GetProcAddress(handle, 'cuStreamSynchronize_ptsz') {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} - try: - global __cuStreamCopyAttributes - __cuStreamCopyAttributes = win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz') - except: - pass + global __cuStreamCopyAttributes + __cuStreamCopyAttributes = windll.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz') {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} - try: - global __cuStreamGetAttribute - __cuStreamGetAttribute = win32api.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz') - except: - pass + global __cuStreamGetAttribute + __cuStreamGetAttribute = windll.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz') {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} - try: - global __cuStreamSetAttribute - __cuStreamSetAttribute = win32api.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz') - except: - pass + global __cuStreamSetAttribute + __cuStreamSetAttribute = windll.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz') {{endif}} {{if 'cuEventRecord' in found_functions}} - try: - global __cuEventRecord - __cuEventRecord = win32api.GetProcAddress(handle, 'cuEventRecord_ptsz') - except: - pass + global __cuEventRecord + __cuEventRecord = windll.GetProcAddress(handle, 'cuEventRecord_ptsz') {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} - try: - global __cuEventRecordWithFlags - __cuEventRecordWithFlags = win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz') - except: - pass + global __cuEventRecordWithFlags + __cuEventRecordWithFlags = windll.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz') {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} - try: - global __cuSignalExternalSemaphoresAsync - __cuSignalExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz') - except: - pass + global __cuSignalExternalSemaphoresAsync + __cuSignalExternalSemaphoresAsync = windll.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz') {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} - try: - global __cuWaitExternalSemaphoresAsync - __cuWaitExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz') - except: - pass + global __cuWaitExternalSemaphoresAsync + __cuWaitExternalSemaphoresAsync = windll.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz') {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} - try: - global __cuStreamWaitValue32_v2 - __cuStreamWaitValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz') - except: - pass + global __cuStreamWaitValue32_v2 + __cuStreamWaitValue32_v2 = windll.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz') {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} - try: - global __cuStreamWaitValue64_v2 - __cuStreamWaitValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz') - except: - pass + global __cuStreamWaitValue64_v2 + __cuStreamWaitValue64_v2 = windll.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz') {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} - try: - global __cuStreamWriteValue32_v2 - __cuStreamWriteValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz') - except: - pass + global __cuStreamWriteValue32_v2 + __cuStreamWriteValue32_v2 = windll.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz') {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} - try: - global __cuStreamWriteValue64_v2 - __cuStreamWriteValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz') - except: - pass + global __cuStreamWriteValue64_v2 + __cuStreamWriteValue64_v2 = windll.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz') {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} - try: - global __cuStreamBatchMemOp_v2 - __cuStreamBatchMemOp_v2 = win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz') - except: - pass + global __cuStreamBatchMemOp_v2 + __cuStreamBatchMemOp_v2 = windll.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz') {{endif}} {{if 'cuLaunchKernel' in found_functions}} - try: - global __cuLaunchKernel - __cuLaunchKernel = win32api.GetProcAddress(handle, 'cuLaunchKernel_ptsz') - except: - pass + global __cuLaunchKernel + __cuLaunchKernel = windll.GetProcAddress(handle, 'cuLaunchKernel_ptsz') {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} - try: - global __cuLaunchKernelEx - __cuLaunchKernelEx = win32api.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz') - except: - pass + global __cuLaunchKernelEx + __cuLaunchKernelEx = windll.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz') {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} - try: - global __cuLaunchCooperativeKernel - __cuLaunchCooperativeKernel = win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz') - except: - pass + global __cuLaunchCooperativeKernel + __cuLaunchCooperativeKernel = windll.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz') {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} - try: - global __cuLaunchHostFunc - __cuLaunchHostFunc = win32api.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz') - except: - pass + global __cuLaunchHostFunc + __cuLaunchHostFunc = windll.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz') {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} - try: - global __cuGraphInstantiateWithParams - __cuGraphInstantiateWithParams = win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams_ptsz') - except: - pass + global __cuGraphInstantiateWithParams + __cuGraphInstantiateWithParams = windll.GetProcAddress(handle, 'cuGraphInstantiateWithParams_ptsz') {{endif}} {{if 'cuGraphUpload' in found_functions}} - try: - global __cuGraphUpload - __cuGraphUpload = win32api.GetProcAddress(handle, 'cuGraphUpload_ptsz') - except: - pass + global __cuGraphUpload + __cuGraphUpload = windll.GetProcAddress(handle, 'cuGraphUpload_ptsz') {{endif}} {{if 'cuGraphLaunch' in found_functions}} - try: - global __cuGraphLaunch - __cuGraphLaunch = win32api.GetProcAddress(handle, 'cuGraphLaunch_ptsz') - except: - pass + global __cuGraphLaunch + __cuGraphLaunch = windll.GetProcAddress(handle, 'cuGraphLaunch_ptsz') {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} - try: - global __cuGraphicsMapResources - __cuGraphicsMapResources = win32api.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz') - except: - pass + global __cuGraphicsMapResources + __cuGraphicsMapResources = windll.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz') {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} - try: - global __cuGraphicsUnmapResources - __cuGraphicsUnmapResources = win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz') - except: - pass + global __cuGraphicsUnmapResources + __cuGraphicsUnmapResources = windll.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz') {{endif}} else: # Else get the regular version pass {{if 'cuMemcpy' in found_functions}} - try: - global __cuMemcpy - __cuMemcpy = win32api.GetProcAddress(handle, 'cuMemcpy') - except: - pass + global __cuMemcpy + __cuMemcpy = windll.GetProcAddress(handle, 'cuMemcpy') {{endif}} {{if 'cuMemcpyPeer' in found_functions}} - try: - global __cuMemcpyPeer - __cuMemcpyPeer = win32api.GetProcAddress(handle, 'cuMemcpyPeer') - except: - pass + global __cuMemcpyPeer + __cuMemcpyPeer = windll.GetProcAddress(handle, 'cuMemcpyPeer') {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} - try: - global __cuMemcpyHtoD_v2 - __cuMemcpyHtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2') - except: - pass + global __cuMemcpyHtoD_v2 + __cuMemcpyHtoD_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoD_v2') {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} - try: - global __cuMemcpyDtoH_v2 - __cuMemcpyDtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2') - except: - pass + global __cuMemcpyDtoH_v2 + __cuMemcpyDtoH_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoH_v2') {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} - try: - global __cuMemcpyDtoD_v2 - __cuMemcpyDtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2') - except: - pass + global __cuMemcpyDtoD_v2 + __cuMemcpyDtoD_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoD_v2') {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} - try: - global __cuMemcpyDtoA_v2 - __cuMemcpyDtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2') - except: - pass + global __cuMemcpyDtoA_v2 + __cuMemcpyDtoA_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoA_v2') {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} - try: - global __cuMemcpyAtoD_v2 - __cuMemcpyAtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2') - except: - pass + global __cuMemcpyAtoD_v2 + __cuMemcpyAtoD_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoD_v2') {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} - try: - global __cuMemcpyHtoA_v2 - __cuMemcpyHtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2') - except: - pass + global __cuMemcpyHtoA_v2 + __cuMemcpyHtoA_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoA_v2') {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} - try: - global __cuMemcpyAtoH_v2 - __cuMemcpyAtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2') - except: - pass + global __cuMemcpyAtoH_v2 + __cuMemcpyAtoH_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoH_v2') {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} - try: - global __cuMemcpyAtoA_v2 - __cuMemcpyAtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2') - except: - pass + global __cuMemcpyAtoA_v2 + __cuMemcpyAtoA_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoA_v2') {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} - try: - global __cuMemcpy2D_v2 - __cuMemcpy2D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2D_v2') - except: - pass + global __cuMemcpy2D_v2 + __cuMemcpy2D_v2 = windll.GetProcAddress(handle, 'cuMemcpy2D_v2') {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} - try: - global __cuMemcpy2DUnaligned_v2 - __cuMemcpy2DUnaligned_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2') - except: - pass + global __cuMemcpy2DUnaligned_v2 + __cuMemcpy2DUnaligned_v2 = windll.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2') {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} - try: - global __cuMemcpy3D_v2 - __cuMemcpy3D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3D_v2') - except: - pass + global __cuMemcpy3D_v2 + __cuMemcpy3D_v2 = windll.GetProcAddress(handle, 'cuMemcpy3D_v2') {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} - try: - global __cuMemcpy3DPeer - __cuMemcpy3DPeer = win32api.GetProcAddress(handle, 'cuMemcpy3DPeer') - except: - pass + global __cuMemcpy3DPeer + __cuMemcpy3DPeer = windll.GetProcAddress(handle, 'cuMemcpy3DPeer') {{endif}} {{if 'cuMemcpyAsync' in found_functions}} - try: - global __cuMemcpyAsync - __cuMemcpyAsync = win32api.GetProcAddress(handle, 'cuMemcpyAsync') - except: - pass + global __cuMemcpyAsync + __cuMemcpyAsync = windll.GetProcAddress(handle, 'cuMemcpyAsync') {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} - try: - global __cuMemcpyPeerAsync - __cuMemcpyPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync') - except: - pass + global __cuMemcpyPeerAsync + __cuMemcpyPeerAsync = windll.GetProcAddress(handle, 'cuMemcpyPeerAsync') {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} - try: - global __cuMemcpyHtoDAsync_v2 - __cuMemcpyHtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2') - except: - pass + global __cuMemcpyHtoDAsync_v2 + __cuMemcpyHtoDAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2') {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} - try: - global __cuMemcpyDtoHAsync_v2 - __cuMemcpyDtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2') - except: - pass + global __cuMemcpyDtoHAsync_v2 + __cuMemcpyDtoHAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2') {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} - try: - global __cuMemcpyDtoDAsync_v2 - __cuMemcpyDtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2') - except: - pass + global __cuMemcpyDtoDAsync_v2 + __cuMemcpyDtoDAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2') {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} - try: - global __cuMemcpyHtoAAsync_v2 - __cuMemcpyHtoAAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2') - except: - pass + global __cuMemcpyHtoAAsync_v2 + __cuMemcpyHtoAAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2') {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} - try: - global __cuMemcpyAtoHAsync_v2 - __cuMemcpyAtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2') - except: - pass + global __cuMemcpyAtoHAsync_v2 + __cuMemcpyAtoHAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2') {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} - try: - global __cuMemcpy2DAsync_v2 - __cuMemcpy2DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2') - except: - pass + global __cuMemcpy2DAsync_v2 + __cuMemcpy2DAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpy2DAsync_v2') {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} - try: - global __cuMemcpy3DAsync_v2 - __cuMemcpy3DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2') - except: - pass + global __cuMemcpy3DAsync_v2 + __cuMemcpy3DAsync_v2 = windll.GetProcAddress(handle, 'cuMemcpy3DAsync_v2') {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} - try: - global __cuMemcpy3DPeerAsync - __cuMemcpy3DPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync') - except: - pass + global __cuMemcpy3DPeerAsync + __cuMemcpy3DPeerAsync = windll.GetProcAddress(handle, 'cuMemcpy3DPeerAsync') {{endif}} {{if 'cuMemcpyBatchAsync' in found_functions}} - try: - global __cuMemcpyBatchAsync - __cuMemcpyBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpyBatchAsync') - except: - pass + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = windll.GetProcAddress(handle, 'cuMemcpyBatchAsync') {{endif}} {{if 'cuMemcpy3DBatchAsync' in found_functions}} - try: - global __cuMemcpy3DBatchAsync - __cuMemcpy3DBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DBatchAsync') - except: - pass + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = windll.GetProcAddress(handle, 'cuMemcpy3DBatchAsync') {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} - try: - global __cuMemsetD8_v2 - __cuMemsetD8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD8_v2') - except: - pass + global __cuMemsetD8_v2 + __cuMemsetD8_v2 = windll.GetProcAddress(handle, 'cuMemsetD8_v2') {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} - try: - global __cuMemsetD16_v2 - __cuMemsetD16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD16_v2') - except: - pass + global __cuMemsetD16_v2 + __cuMemsetD16_v2 = windll.GetProcAddress(handle, 'cuMemsetD16_v2') {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} - try: - global __cuMemsetD32_v2 - __cuMemsetD32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD32_v2') - except: - pass + global __cuMemsetD32_v2 + __cuMemsetD32_v2 = windll.GetProcAddress(handle, 'cuMemsetD32_v2') {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} - try: - global __cuMemsetD2D8_v2 - __cuMemsetD2D8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2') - except: - pass + global __cuMemsetD2D8_v2 + __cuMemsetD2D8_v2 = windll.GetProcAddress(handle, 'cuMemsetD2D8_v2') {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} - try: - global __cuMemsetD2D16_v2 - __cuMemsetD2D16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2') - except: - pass + global __cuMemsetD2D16_v2 + __cuMemsetD2D16_v2 = windll.GetProcAddress(handle, 'cuMemsetD2D16_v2') {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} - try: - global __cuMemsetD2D32_v2 - __cuMemsetD2D32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2') - except: - pass + global __cuMemsetD2D32_v2 + __cuMemsetD2D32_v2 = windll.GetProcAddress(handle, 'cuMemsetD2D32_v2') {{endif}} {{if 'cuMemsetD8Async' in found_functions}} - try: - global __cuMemsetD8Async - __cuMemsetD8Async = win32api.GetProcAddress(handle, 'cuMemsetD8Async') - except: - pass + global __cuMemsetD8Async + __cuMemsetD8Async = windll.GetProcAddress(handle, 'cuMemsetD8Async') {{endif}} {{if 'cuMemsetD16Async' in found_functions}} - try: - global __cuMemsetD16Async - __cuMemsetD16Async = win32api.GetProcAddress(handle, 'cuMemsetD16Async') - except: - pass + global __cuMemsetD16Async + __cuMemsetD16Async = windll.GetProcAddress(handle, 'cuMemsetD16Async') {{endif}} {{if 'cuMemsetD32Async' in found_functions}} - try: - global __cuMemsetD32Async - __cuMemsetD32Async = win32api.GetProcAddress(handle, 'cuMemsetD32Async') - except: - pass + global __cuMemsetD32Async + __cuMemsetD32Async = windll.GetProcAddress(handle, 'cuMemsetD32Async') {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} - try: - global __cuMemsetD2D8Async - __cuMemsetD2D8Async = win32api.GetProcAddress(handle, 'cuMemsetD2D8Async') - except: - pass + global __cuMemsetD2D8Async + __cuMemsetD2D8Async = windll.GetProcAddress(handle, 'cuMemsetD2D8Async') {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} - try: - global __cuMemsetD2D16Async - __cuMemsetD2D16Async = win32api.GetProcAddress(handle, 'cuMemsetD2D16Async') - except: - pass + global __cuMemsetD2D16Async + __cuMemsetD2D16Async = windll.GetProcAddress(handle, 'cuMemsetD2D16Async') {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} - try: - global __cuMemsetD2D32Async - __cuMemsetD2D32Async = win32api.GetProcAddress(handle, 'cuMemsetD2D32Async') - except: - pass + global __cuMemsetD2D32Async + __cuMemsetD2D32Async = windll.GetProcAddress(handle, 'cuMemsetD2D32Async') {{endif}} {{if 'cuMemBatchDecompressAsync' in found_functions}} - try: - global __cuMemBatchDecompressAsync - __cuMemBatchDecompressAsync = win32api.GetProcAddress(handle, 'cuMemBatchDecompressAsync') - except: - pass + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = windll.GetProcAddress(handle, 'cuMemBatchDecompressAsync') {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} - try: - global __cuMemMapArrayAsync - __cuMemMapArrayAsync = win32api.GetProcAddress(handle, 'cuMemMapArrayAsync') - except: - pass + global __cuMemMapArrayAsync + __cuMemMapArrayAsync = windll.GetProcAddress(handle, 'cuMemMapArrayAsync') {{endif}} {{if 'cuMemFreeAsync' in found_functions}} - try: - global __cuMemFreeAsync - __cuMemFreeAsync = win32api.GetProcAddress(handle, 'cuMemFreeAsync') - except: - pass + global __cuMemFreeAsync + __cuMemFreeAsync = windll.GetProcAddress(handle, 'cuMemFreeAsync') {{endif}} {{if 'cuMemAllocAsync' in found_functions}} - try: - global __cuMemAllocAsync - __cuMemAllocAsync = win32api.GetProcAddress(handle, 'cuMemAllocAsync') - except: - pass + global __cuMemAllocAsync + __cuMemAllocAsync = windll.GetProcAddress(handle, 'cuMemAllocAsync') {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} - try: - global __cuMemAllocFromPoolAsync - __cuMemAllocFromPoolAsync = win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync') - except: - pass + global __cuMemAllocFromPoolAsync + __cuMemAllocFromPoolAsync = windll.GetProcAddress(handle, 'cuMemAllocFromPoolAsync') {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} - try: - global __cuMemPrefetchAsync - __cuMemPrefetchAsync = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync') - except: - pass + global __cuMemPrefetchAsync + __cuMemPrefetchAsync = windll.GetProcAddress(handle, 'cuMemPrefetchAsync') {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} - try: - global __cuMemPrefetchAsync_v2 - __cuMemPrefetchAsync_v2 = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2') - except: - pass + global __cuMemPrefetchAsync_v2 + __cuMemPrefetchAsync_v2 = windll.GetProcAddress(handle, 'cuMemPrefetchAsync_v2') {{endif}} {{if 'cuStreamGetPriority' in found_functions}} - try: - global __cuStreamGetPriority - __cuStreamGetPriority = win32api.GetProcAddress(handle, 'cuStreamGetPriority') - except: - pass + global __cuStreamGetPriority + __cuStreamGetPriority = windll.GetProcAddress(handle, 'cuStreamGetPriority') {{endif}} {{if 'cuStreamGetDevice' in found_functions}} - try: - global __cuStreamGetDevice - __cuStreamGetDevice = win32api.GetProcAddress(handle, 'cuStreamGetDevice') - except: - pass + global __cuStreamGetDevice + __cuStreamGetDevice = windll.GetProcAddress(handle, 'cuStreamGetDevice') {{endif}} {{if 'cuStreamGetFlags' in found_functions}} - try: - global __cuStreamGetFlags - __cuStreamGetFlags = win32api.GetProcAddress(handle, 'cuStreamGetFlags') - except: - pass + global __cuStreamGetFlags + __cuStreamGetFlags = windll.GetProcAddress(handle, 'cuStreamGetFlags') {{endif}} {{if 'cuStreamGetId' in found_functions}} - try: - global __cuStreamGetId - __cuStreamGetId = win32api.GetProcAddress(handle, 'cuStreamGetId') - except: - pass + global __cuStreamGetId + __cuStreamGetId = windll.GetProcAddress(handle, 'cuStreamGetId') {{endif}} {{if 'cuStreamGetCtx' in found_functions}} - try: - global __cuStreamGetCtx - __cuStreamGetCtx = win32api.GetProcAddress(handle, 'cuStreamGetCtx') - except: - pass + global __cuStreamGetCtx + __cuStreamGetCtx = windll.GetProcAddress(handle, 'cuStreamGetCtx') {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} - try: - global __cuStreamGetCtx_v2 - __cuStreamGetCtx_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCtx_v2') - except: - pass + global __cuStreamGetCtx_v2 + __cuStreamGetCtx_v2 = windll.GetProcAddress(handle, 'cuStreamGetCtx_v2') {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} - try: - global __cuStreamWaitEvent - __cuStreamWaitEvent = win32api.GetProcAddress(handle, 'cuStreamWaitEvent') - except: - pass + global __cuStreamWaitEvent + __cuStreamWaitEvent = windll.GetProcAddress(handle, 'cuStreamWaitEvent') {{endif}} {{if 'cuStreamAddCallback' in found_functions}} - try: - global __cuStreamAddCallback - __cuStreamAddCallback = win32api.GetProcAddress(handle, 'cuStreamAddCallback') - except: - pass + global __cuStreamAddCallback + __cuStreamAddCallback = windll.GetProcAddress(handle, 'cuStreamAddCallback') {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} - try: - global __cuStreamBeginCapture_v2 - __cuStreamBeginCapture_v2 = win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2') - except: - pass + global __cuStreamBeginCapture_v2 + __cuStreamBeginCapture_v2 = windll.GetProcAddress(handle, 'cuStreamBeginCapture_v2') {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} - try: - global __cuStreamBeginCaptureToGraph - __cuStreamBeginCaptureToGraph = win32api.GetProcAddress(handle, 'cuStreamBeginCaptureToGraph') - except: - pass + global __cuStreamBeginCaptureToGraph + __cuStreamBeginCaptureToGraph = windll.GetProcAddress(handle, 'cuStreamBeginCaptureToGraph') {{endif}} {{if 'cuStreamEndCapture' in found_functions}} - try: - global __cuStreamEndCapture - __cuStreamEndCapture = win32api.GetProcAddress(handle, 'cuStreamEndCapture') - except: - pass + global __cuStreamEndCapture + __cuStreamEndCapture = windll.GetProcAddress(handle, 'cuStreamEndCapture') {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} - try: - global __cuStreamIsCapturing - __cuStreamIsCapturing = win32api.GetProcAddress(handle, 'cuStreamIsCapturing') - except: - pass + global __cuStreamIsCapturing + __cuStreamIsCapturing = windll.GetProcAddress(handle, 'cuStreamIsCapturing') {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} - try: - global __cuStreamGetCaptureInfo_v2 - __cuStreamGetCaptureInfo_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2') - except: - pass + global __cuStreamGetCaptureInfo_v2 + __cuStreamGetCaptureInfo_v2 = windll.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2') {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} - try: - global __cuStreamGetCaptureInfo_v3 - __cuStreamGetCaptureInfo_v3 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v3') - except: - pass + global __cuStreamGetCaptureInfo_v3 + __cuStreamGetCaptureInfo_v3 = windll.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v3') {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} - try: - global __cuStreamUpdateCaptureDependencies - __cuStreamUpdateCaptureDependencies = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies') - except: - pass + global __cuStreamUpdateCaptureDependencies + __cuStreamUpdateCaptureDependencies = windll.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies') {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} - try: - global __cuStreamUpdateCaptureDependencies_v2 - __cuStreamUpdateCaptureDependencies_v2 = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_v2') - except: - pass + global __cuStreamUpdateCaptureDependencies_v2 + __cuStreamUpdateCaptureDependencies_v2 = windll.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_v2') {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} - try: - global __cuStreamAttachMemAsync - __cuStreamAttachMemAsync = win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync') - except: - pass + global __cuStreamAttachMemAsync + __cuStreamAttachMemAsync = windll.GetProcAddress(handle, 'cuStreamAttachMemAsync') {{endif}} {{if 'cuStreamQuery' in found_functions}} - try: - global __cuStreamQuery - __cuStreamQuery = win32api.GetProcAddress(handle, 'cuStreamQuery') - except: - pass + global __cuStreamQuery + __cuStreamQuery = windll.GetProcAddress(handle, 'cuStreamQuery') {{endif}} {{if 'cuStreamSynchronize' in found_functions}} - try: - global __cuStreamSynchronize - __cuStreamSynchronize = win32api.GetProcAddress(handle, 'cuStreamSynchronize') - except: - pass + global __cuStreamSynchronize + __cuStreamSynchronize = windll.GetProcAddress(handle, 'cuStreamSynchronize') {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} - try: - global __cuStreamCopyAttributes - __cuStreamCopyAttributes = win32api.GetProcAddress(handle, 'cuStreamCopyAttributes') - except: - pass + global __cuStreamCopyAttributes + __cuStreamCopyAttributes = windll.GetProcAddress(handle, 'cuStreamCopyAttributes') {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} - try: - global __cuStreamGetAttribute - __cuStreamGetAttribute = win32api.GetProcAddress(handle, 'cuStreamGetAttribute') - except: - pass + global __cuStreamGetAttribute + __cuStreamGetAttribute = windll.GetProcAddress(handle, 'cuStreamGetAttribute') {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} - try: - global __cuStreamSetAttribute - __cuStreamSetAttribute = win32api.GetProcAddress(handle, 'cuStreamSetAttribute') - except: - pass + global __cuStreamSetAttribute + __cuStreamSetAttribute = windll.GetProcAddress(handle, 'cuStreamSetAttribute') {{endif}} {{if 'cuEventRecord' in found_functions}} - try: - global __cuEventRecord - __cuEventRecord = win32api.GetProcAddress(handle, 'cuEventRecord') - except: - pass + global __cuEventRecord + __cuEventRecord = windll.GetProcAddress(handle, 'cuEventRecord') {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} - try: - global __cuEventRecordWithFlags - __cuEventRecordWithFlags = win32api.GetProcAddress(handle, 'cuEventRecordWithFlags') - except: - pass + global __cuEventRecordWithFlags + __cuEventRecordWithFlags = windll.GetProcAddress(handle, 'cuEventRecordWithFlags') {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} - try: - global __cuSignalExternalSemaphoresAsync - __cuSignalExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync') - except: - pass + global __cuSignalExternalSemaphoresAsync + __cuSignalExternalSemaphoresAsync = windll.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync') {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} - try: - global __cuWaitExternalSemaphoresAsync - __cuWaitExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync') - except: - pass + global __cuWaitExternalSemaphoresAsync + __cuWaitExternalSemaphoresAsync = windll.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync') {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} - try: - global __cuStreamWaitValue32_v2 - __cuStreamWaitValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2') - except: - pass + global __cuStreamWaitValue32_v2 + __cuStreamWaitValue32_v2 = windll.GetProcAddress(handle, 'cuStreamWaitValue32_v2') {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} - try: - global __cuStreamWaitValue64_v2 - __cuStreamWaitValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2') - except: - pass + global __cuStreamWaitValue64_v2 + __cuStreamWaitValue64_v2 = windll.GetProcAddress(handle, 'cuStreamWaitValue64_v2') {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} - try: - global __cuStreamWriteValue32_v2 - __cuStreamWriteValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2') - except: - pass + global __cuStreamWriteValue32_v2 + __cuStreamWriteValue32_v2 = windll.GetProcAddress(handle, 'cuStreamWriteValue32_v2') {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} - try: - global __cuStreamWriteValue64_v2 - __cuStreamWriteValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2') - except: - pass + global __cuStreamWriteValue64_v2 + __cuStreamWriteValue64_v2 = windll.GetProcAddress(handle, 'cuStreamWriteValue64_v2') {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} - try: - global __cuStreamBatchMemOp_v2 - __cuStreamBatchMemOp_v2 = win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2') - except: - pass + global __cuStreamBatchMemOp_v2 + __cuStreamBatchMemOp_v2 = windll.GetProcAddress(handle, 'cuStreamBatchMemOp_v2') {{endif}} {{if 'cuLaunchKernel' in found_functions}} - try: - global __cuLaunchKernel - __cuLaunchKernel = win32api.GetProcAddress(handle, 'cuLaunchKernel') - except: - pass + global __cuLaunchKernel + __cuLaunchKernel = windll.GetProcAddress(handle, 'cuLaunchKernel') {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} - try: - global __cuLaunchKernelEx - __cuLaunchKernelEx = win32api.GetProcAddress(handle, 'cuLaunchKernelEx') - except: - pass + global __cuLaunchKernelEx + __cuLaunchKernelEx = windll.GetProcAddress(handle, 'cuLaunchKernelEx') {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} - try: - global __cuLaunchCooperativeKernel - __cuLaunchCooperativeKernel = win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel') - except: - pass + global __cuLaunchCooperativeKernel + __cuLaunchCooperativeKernel = windll.GetProcAddress(handle, 'cuLaunchCooperativeKernel') {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} - try: - global __cuLaunchHostFunc - __cuLaunchHostFunc = win32api.GetProcAddress(handle, 'cuLaunchHostFunc') - except: - pass + global __cuLaunchHostFunc + __cuLaunchHostFunc = windll.GetProcAddress(handle, 'cuLaunchHostFunc') {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} - try: - global __cuGraphInstantiateWithParams - __cuGraphInstantiateWithParams = win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams') - except: - pass + global __cuGraphInstantiateWithParams + __cuGraphInstantiateWithParams = windll.GetProcAddress(handle, 'cuGraphInstantiateWithParams') {{endif}} {{if 'cuGraphUpload' in found_functions}} - try: - global __cuGraphUpload - __cuGraphUpload = win32api.GetProcAddress(handle, 'cuGraphUpload') - except: - pass + global __cuGraphUpload + __cuGraphUpload = windll.GetProcAddress(handle, 'cuGraphUpload') {{endif}} {{if 'cuGraphLaunch' in found_functions}} - try: - global __cuGraphLaunch - __cuGraphLaunch = win32api.GetProcAddress(handle, 'cuGraphLaunch') - except: - pass + global __cuGraphLaunch + __cuGraphLaunch = windll.GetProcAddress(handle, 'cuGraphLaunch') {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} - try: - global __cuGraphicsMapResources - __cuGraphicsMapResources = win32api.GetProcAddress(handle, 'cuGraphicsMapResources') - except: - pass + global __cuGraphicsMapResources + __cuGraphicsMapResources = windll.GetProcAddress(handle, 'cuGraphicsMapResources') {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} - try: - global __cuGraphicsUnmapResources - __cuGraphicsUnmapResources = win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources') - except: - pass + global __cuGraphicsUnmapResources + __cuGraphicsUnmapResources = windll.GetProcAddress(handle, 'cuGraphicsUnmapResources') {{endif}} # Get remaining functions {{if 'cuGetErrorString' in found_functions}} - try: - global __cuGetErrorString - __cuGetErrorString = win32api.GetProcAddress(handle, 'cuGetErrorString') - except: - pass + global __cuGetErrorString + __cuGetErrorString = windll.GetProcAddress(handle, 'cuGetErrorString') {{endif}} {{if 'cuGetErrorName' in found_functions}} - try: - global __cuGetErrorName - __cuGetErrorName = win32api.GetProcAddress(handle, 'cuGetErrorName') - except: - pass + global __cuGetErrorName + __cuGetErrorName = windll.GetProcAddress(handle, 'cuGetErrorName') {{endif}} {{if 'cuInit' in found_functions}} - try: - global __cuInit - __cuInit = win32api.GetProcAddress(handle, 'cuInit') - except: - pass + global __cuInit + __cuInit = windll.GetProcAddress(handle, 'cuInit') {{endif}} {{if 'cuDriverGetVersion' in found_functions}} - try: - global __cuDriverGetVersion - __cuDriverGetVersion = win32api.GetProcAddress(handle, 'cuDriverGetVersion') - except: - pass + global __cuDriverGetVersion + __cuDriverGetVersion = windll.GetProcAddress(handle, 'cuDriverGetVersion') {{endif}} {{if 'cuDeviceGet' in found_functions}} - try: - global __cuDeviceGet - __cuDeviceGet = win32api.GetProcAddress(handle, 'cuDeviceGet') - except: - pass + global __cuDeviceGet + __cuDeviceGet = windll.GetProcAddress(handle, 'cuDeviceGet') {{endif}} {{if 'cuDeviceGetCount' in found_functions}} - try: - global __cuDeviceGetCount - __cuDeviceGetCount = win32api.GetProcAddress(handle, 'cuDeviceGetCount') - except: - pass + global __cuDeviceGetCount + __cuDeviceGetCount = windll.GetProcAddress(handle, 'cuDeviceGetCount') {{endif}} {{if 'cuDeviceGetName' in found_functions}} - try: - global __cuDeviceGetName - __cuDeviceGetName = win32api.GetProcAddress(handle, 'cuDeviceGetName') - except: - pass + global __cuDeviceGetName + __cuDeviceGetName = windll.GetProcAddress(handle, 'cuDeviceGetName') {{endif}} {{if 'cuDeviceGetUuid' in found_functions}} - try: - global __cuDeviceGetUuid - __cuDeviceGetUuid = win32api.GetProcAddress(handle, 'cuDeviceGetUuid') - except: - pass + global __cuDeviceGetUuid + __cuDeviceGetUuid = windll.GetProcAddress(handle, 'cuDeviceGetUuid') {{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}} - try: - global __cuDeviceGetUuid_v2 - __cuDeviceGetUuid_v2 = win32api.GetProcAddress(handle, 'cuDeviceGetUuid_v2') - except: - pass + global __cuDeviceGetUuid_v2 + __cuDeviceGetUuid_v2 = windll.GetProcAddress(handle, 'cuDeviceGetUuid_v2') {{endif}} {{if 'cuDeviceGetLuid' in found_functions}} - try: - global __cuDeviceGetLuid - __cuDeviceGetLuid = win32api.GetProcAddress(handle, 'cuDeviceGetLuid') - except: - pass + global __cuDeviceGetLuid + __cuDeviceGetLuid = windll.GetProcAddress(handle, 'cuDeviceGetLuid') {{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}} - try: - global __cuDeviceTotalMem_v2 - __cuDeviceTotalMem_v2 = win32api.GetProcAddress(handle, 'cuDeviceTotalMem_v2') - except: - pass + global __cuDeviceTotalMem_v2 + __cuDeviceTotalMem_v2 = windll.GetProcAddress(handle, 'cuDeviceTotalMem_v2') {{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}} - try: - global __cuDeviceGetTexture1DLinearMaxWidth - __cuDeviceGetTexture1DLinearMaxWidth = win32api.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth') - except: - pass + global __cuDeviceGetTexture1DLinearMaxWidth + __cuDeviceGetTexture1DLinearMaxWidth = windll.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth') {{endif}} {{if 'cuDeviceGetAttribute' in found_functions}} - try: - global __cuDeviceGetAttribute - __cuDeviceGetAttribute = win32api.GetProcAddress(handle, 'cuDeviceGetAttribute') - except: - pass + global __cuDeviceGetAttribute + __cuDeviceGetAttribute = windll.GetProcAddress(handle, 'cuDeviceGetAttribute') {{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}} - try: - global __cuDeviceGetNvSciSyncAttributes - __cuDeviceGetNvSciSyncAttributes = win32api.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes') - except: - pass + global __cuDeviceGetNvSciSyncAttributes + __cuDeviceGetNvSciSyncAttributes = windll.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes') {{endif}} {{if 'cuDeviceSetMemPool' in found_functions}} - try: - global __cuDeviceSetMemPool - __cuDeviceSetMemPool = win32api.GetProcAddress(handle, 'cuDeviceSetMemPool') - except: - pass + global __cuDeviceSetMemPool + __cuDeviceSetMemPool = windll.GetProcAddress(handle, 'cuDeviceSetMemPool') {{endif}} {{if 'cuDeviceGetMemPool' in found_functions}} - try: - global __cuDeviceGetMemPool - __cuDeviceGetMemPool = win32api.GetProcAddress(handle, 'cuDeviceGetMemPool') - except: - pass + global __cuDeviceGetMemPool + __cuDeviceGetMemPool = windll.GetProcAddress(handle, 'cuDeviceGetMemPool') {{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}} - try: - global __cuDeviceGetDefaultMemPool - __cuDeviceGetDefaultMemPool = win32api.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool') - except: - pass + global __cuDeviceGetDefaultMemPool + __cuDeviceGetDefaultMemPool = windll.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool') {{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}} - try: - global __cuDeviceGetExecAffinitySupport - __cuDeviceGetExecAffinitySupport = win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport') - except: - pass + global __cuDeviceGetExecAffinitySupport + __cuDeviceGetExecAffinitySupport = windll.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport') {{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}} - try: - global __cuFlushGPUDirectRDMAWrites - __cuFlushGPUDirectRDMAWrites = win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites') - except: - pass + global __cuFlushGPUDirectRDMAWrites + __cuFlushGPUDirectRDMAWrites = windll.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites') {{endif}} {{if 'cuDeviceGetProperties' in found_functions}} - try: - global __cuDeviceGetProperties - __cuDeviceGetProperties = win32api.GetProcAddress(handle, 'cuDeviceGetProperties') - except: - pass + global __cuDeviceGetProperties + __cuDeviceGetProperties = windll.GetProcAddress(handle, 'cuDeviceGetProperties') {{endif}} {{if 'cuDeviceComputeCapability' in found_functions}} - try: - global __cuDeviceComputeCapability - __cuDeviceComputeCapability = win32api.GetProcAddress(handle, 'cuDeviceComputeCapability') - except: - pass + global __cuDeviceComputeCapability + __cuDeviceComputeCapability = windll.GetProcAddress(handle, 'cuDeviceComputeCapability') {{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}} - try: - global __cuDevicePrimaryCtxRetain - __cuDevicePrimaryCtxRetain = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain') - except: - pass + global __cuDevicePrimaryCtxRetain + __cuDevicePrimaryCtxRetain = windll.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain') {{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}} - try: - global __cuDevicePrimaryCtxRelease_v2 - __cuDevicePrimaryCtxRelease_v2 = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2') - except: - pass + global __cuDevicePrimaryCtxRelease_v2 + __cuDevicePrimaryCtxRelease_v2 = windll.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2') {{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}} - try: - global __cuDevicePrimaryCtxSetFlags_v2 - __cuDevicePrimaryCtxSetFlags_v2 = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2') - except: - pass + global __cuDevicePrimaryCtxSetFlags_v2 + __cuDevicePrimaryCtxSetFlags_v2 = windll.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2') {{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}} - try: - global __cuDevicePrimaryCtxGetState - __cuDevicePrimaryCtxGetState = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState') - except: - pass + global __cuDevicePrimaryCtxGetState + __cuDevicePrimaryCtxGetState = windll.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState') {{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}} - try: - global __cuDevicePrimaryCtxReset_v2 - __cuDevicePrimaryCtxReset_v2 = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2') - except: - pass + global __cuDevicePrimaryCtxReset_v2 + __cuDevicePrimaryCtxReset_v2 = windll.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2') {{endif}} {{if 'cuCtxCreate_v2' in found_functions}} - try: - global __cuCtxCreate_v2 - __cuCtxCreate_v2 = win32api.GetProcAddress(handle, 'cuCtxCreate_v2') - except: - pass + global __cuCtxCreate_v2 + __cuCtxCreate_v2 = windll.GetProcAddress(handle, 'cuCtxCreate_v2') {{endif}} {{if 'cuCtxCreate_v3' in found_functions}} - try: - global __cuCtxCreate_v3 - __cuCtxCreate_v3 = win32api.GetProcAddress(handle, 'cuCtxCreate_v3') - except: - pass + global __cuCtxCreate_v3 + __cuCtxCreate_v3 = windll.GetProcAddress(handle, 'cuCtxCreate_v3') {{endif}} {{if 'cuCtxCreate_v4' in found_functions}} - try: - global __cuCtxCreate_v4 - __cuCtxCreate_v4 = win32api.GetProcAddress(handle, 'cuCtxCreate_v4') - except: - pass + global __cuCtxCreate_v4 + __cuCtxCreate_v4 = windll.GetProcAddress(handle, 'cuCtxCreate_v4') {{endif}} {{if 'cuCtxDestroy_v2' in found_functions}} - try: - global __cuCtxDestroy_v2 - __cuCtxDestroy_v2 = win32api.GetProcAddress(handle, 'cuCtxDestroy_v2') - except: - pass + global __cuCtxDestroy_v2 + __cuCtxDestroy_v2 = windll.GetProcAddress(handle, 'cuCtxDestroy_v2') {{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}} - try: - global __cuCtxPushCurrent_v2 - __cuCtxPushCurrent_v2 = win32api.GetProcAddress(handle, 'cuCtxPushCurrent_v2') - except: - pass + global __cuCtxPushCurrent_v2 + __cuCtxPushCurrent_v2 = windll.GetProcAddress(handle, 'cuCtxPushCurrent_v2') {{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}} - try: - global __cuCtxPopCurrent_v2 - __cuCtxPopCurrent_v2 = win32api.GetProcAddress(handle, 'cuCtxPopCurrent_v2') - except: - pass + global __cuCtxPopCurrent_v2 + __cuCtxPopCurrent_v2 = windll.GetProcAddress(handle, 'cuCtxPopCurrent_v2') {{endif}} {{if 'cuCtxSetCurrent' in found_functions}} - try: - global __cuCtxSetCurrent - __cuCtxSetCurrent = win32api.GetProcAddress(handle, 'cuCtxSetCurrent') - except: - pass + global __cuCtxSetCurrent + __cuCtxSetCurrent = windll.GetProcAddress(handle, 'cuCtxSetCurrent') {{endif}} {{if 'cuCtxGetCurrent' in found_functions}} - try: - global __cuCtxGetCurrent - __cuCtxGetCurrent = win32api.GetProcAddress(handle, 'cuCtxGetCurrent') - except: - pass + global __cuCtxGetCurrent + __cuCtxGetCurrent = windll.GetProcAddress(handle, 'cuCtxGetCurrent') {{endif}} {{if 'cuCtxGetDevice' in found_functions}} - try: - global __cuCtxGetDevice - __cuCtxGetDevice = win32api.GetProcAddress(handle, 'cuCtxGetDevice') - except: - pass + global __cuCtxGetDevice + __cuCtxGetDevice = windll.GetProcAddress(handle, 'cuCtxGetDevice') {{endif}} {{if 'cuCtxGetFlags' in found_functions}} - try: - global __cuCtxGetFlags - __cuCtxGetFlags = win32api.GetProcAddress(handle, 'cuCtxGetFlags') - except: - pass + global __cuCtxGetFlags + __cuCtxGetFlags = windll.GetProcAddress(handle, 'cuCtxGetFlags') {{endif}} {{if 'cuCtxSetFlags' in found_functions}} - try: - global __cuCtxSetFlags - __cuCtxSetFlags = win32api.GetProcAddress(handle, 'cuCtxSetFlags') - except: - pass + global __cuCtxSetFlags + __cuCtxSetFlags = windll.GetProcAddress(handle, 'cuCtxSetFlags') {{endif}} {{if 'cuCtxGetId' in found_functions}} - try: - global __cuCtxGetId - __cuCtxGetId = win32api.GetProcAddress(handle, 'cuCtxGetId') - except: - pass + global __cuCtxGetId + __cuCtxGetId = windll.GetProcAddress(handle, 'cuCtxGetId') {{endif}} {{if 'cuCtxSynchronize' in found_functions}} - try: - global __cuCtxSynchronize - __cuCtxSynchronize = win32api.GetProcAddress(handle, 'cuCtxSynchronize') - except: - pass + global __cuCtxSynchronize + __cuCtxSynchronize = windll.GetProcAddress(handle, 'cuCtxSynchronize') {{endif}} {{if 'cuCtxSetLimit' in found_functions}} - try: - global __cuCtxSetLimit - __cuCtxSetLimit = win32api.GetProcAddress(handle, 'cuCtxSetLimit') - except: - pass + global __cuCtxSetLimit + __cuCtxSetLimit = windll.GetProcAddress(handle, 'cuCtxSetLimit') {{endif}} {{if 'cuCtxGetLimit' in found_functions}} - try: - global __cuCtxGetLimit - __cuCtxGetLimit = win32api.GetProcAddress(handle, 'cuCtxGetLimit') - except: - pass + global __cuCtxGetLimit + __cuCtxGetLimit = windll.GetProcAddress(handle, 'cuCtxGetLimit') {{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}} - try: - global __cuCtxGetCacheConfig - __cuCtxGetCacheConfig = win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig') - except: - pass + global __cuCtxGetCacheConfig + __cuCtxGetCacheConfig = windll.GetProcAddress(handle, 'cuCtxGetCacheConfig') {{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}} - try: - global __cuCtxSetCacheConfig - __cuCtxSetCacheConfig = win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig') - except: - pass + global __cuCtxSetCacheConfig + __cuCtxSetCacheConfig = windll.GetProcAddress(handle, 'cuCtxSetCacheConfig') {{endif}} {{if 'cuCtxGetApiVersion' in found_functions}} - try: - global __cuCtxGetApiVersion - __cuCtxGetApiVersion = win32api.GetProcAddress(handle, 'cuCtxGetApiVersion') - except: - pass + global __cuCtxGetApiVersion + __cuCtxGetApiVersion = windll.GetProcAddress(handle, 'cuCtxGetApiVersion') {{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}} - try: - global __cuCtxGetStreamPriorityRange - __cuCtxGetStreamPriorityRange = win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange') - except: - pass + global __cuCtxGetStreamPriorityRange + __cuCtxGetStreamPriorityRange = windll.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange') {{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}} - try: - global __cuCtxResetPersistingL2Cache - __cuCtxResetPersistingL2Cache = win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache') - except: - pass + global __cuCtxResetPersistingL2Cache + __cuCtxResetPersistingL2Cache = windll.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache') {{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}} - try: - global __cuCtxGetExecAffinity - __cuCtxGetExecAffinity = win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity') - except: - pass + global __cuCtxGetExecAffinity + __cuCtxGetExecAffinity = windll.GetProcAddress(handle, 'cuCtxGetExecAffinity') {{endif}} {{if 'cuCtxRecordEvent' in found_functions}} - try: - global __cuCtxRecordEvent - __cuCtxRecordEvent = win32api.GetProcAddress(handle, 'cuCtxRecordEvent') - except: - pass + global __cuCtxRecordEvent + __cuCtxRecordEvent = windll.GetProcAddress(handle, 'cuCtxRecordEvent') {{endif}} {{if 'cuCtxWaitEvent' in found_functions}} - try: - global __cuCtxWaitEvent - __cuCtxWaitEvent = win32api.GetProcAddress(handle, 'cuCtxWaitEvent') - except: - pass + global __cuCtxWaitEvent + __cuCtxWaitEvent = windll.GetProcAddress(handle, 'cuCtxWaitEvent') {{endif}} {{if 'cuCtxAttach' in found_functions}} - try: - global __cuCtxAttach - __cuCtxAttach = win32api.GetProcAddress(handle, 'cuCtxAttach') - except: - pass + global __cuCtxAttach + __cuCtxAttach = windll.GetProcAddress(handle, 'cuCtxAttach') {{endif}} {{if 'cuCtxDetach' in found_functions}} - try: - global __cuCtxDetach - __cuCtxDetach = win32api.GetProcAddress(handle, 'cuCtxDetach') - except: - pass + global __cuCtxDetach + __cuCtxDetach = windll.GetProcAddress(handle, 'cuCtxDetach') {{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}} - try: - global __cuCtxGetSharedMemConfig - __cuCtxGetSharedMemConfig = win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig') - except: - pass + global __cuCtxGetSharedMemConfig + __cuCtxGetSharedMemConfig = windll.GetProcAddress(handle, 'cuCtxGetSharedMemConfig') {{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}} - try: - global __cuCtxSetSharedMemConfig - __cuCtxSetSharedMemConfig = win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig') - except: - pass + global __cuCtxSetSharedMemConfig + __cuCtxSetSharedMemConfig = windll.GetProcAddress(handle, 'cuCtxSetSharedMemConfig') {{endif}} {{if 'cuModuleLoad' in found_functions}} - try: - global __cuModuleLoad - __cuModuleLoad = win32api.GetProcAddress(handle, 'cuModuleLoad') - except: - pass + global __cuModuleLoad + __cuModuleLoad = windll.GetProcAddress(handle, 'cuModuleLoad') {{endif}} {{if 'cuModuleLoadData' in found_functions}} - try: - global __cuModuleLoadData - __cuModuleLoadData = win32api.GetProcAddress(handle, 'cuModuleLoadData') - except: - pass + global __cuModuleLoadData + __cuModuleLoadData = windll.GetProcAddress(handle, 'cuModuleLoadData') {{endif}} {{if 'cuModuleLoadDataEx' in found_functions}} - try: - global __cuModuleLoadDataEx - __cuModuleLoadDataEx = win32api.GetProcAddress(handle, 'cuModuleLoadDataEx') - except: - pass + global __cuModuleLoadDataEx + __cuModuleLoadDataEx = windll.GetProcAddress(handle, 'cuModuleLoadDataEx') {{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}} - try: - global __cuModuleLoadFatBinary - __cuModuleLoadFatBinary = win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary') - except: - pass + global __cuModuleLoadFatBinary + __cuModuleLoadFatBinary = windll.GetProcAddress(handle, 'cuModuleLoadFatBinary') {{endif}} {{if 'cuModuleUnload' in found_functions}} - try: - global __cuModuleUnload - __cuModuleUnload = win32api.GetProcAddress(handle, 'cuModuleUnload') - except: - pass + global __cuModuleUnload + __cuModuleUnload = windll.GetProcAddress(handle, 'cuModuleUnload') {{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}} - try: - global __cuModuleGetLoadingMode - __cuModuleGetLoadingMode = win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode') - except: - pass + global __cuModuleGetLoadingMode + __cuModuleGetLoadingMode = windll.GetProcAddress(handle, 'cuModuleGetLoadingMode') {{endif}} {{if 'cuModuleGetFunction' in found_functions}} - try: - global __cuModuleGetFunction - __cuModuleGetFunction = win32api.GetProcAddress(handle, 'cuModuleGetFunction') - except: - pass + global __cuModuleGetFunction + __cuModuleGetFunction = windll.GetProcAddress(handle, 'cuModuleGetFunction') {{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}} - try: - global __cuModuleGetFunctionCount - __cuModuleGetFunctionCount = win32api.GetProcAddress(handle, 'cuModuleGetFunctionCount') - except: - pass + global __cuModuleGetFunctionCount + __cuModuleGetFunctionCount = windll.GetProcAddress(handle, 'cuModuleGetFunctionCount') {{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}} - try: - global __cuModuleEnumerateFunctions - __cuModuleEnumerateFunctions = win32api.GetProcAddress(handle, 'cuModuleEnumerateFunctions') - except: - pass + global __cuModuleEnumerateFunctions + __cuModuleEnumerateFunctions = windll.GetProcAddress(handle, 'cuModuleEnumerateFunctions') {{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}} - try: - global __cuModuleGetGlobal_v2 - __cuModuleGetGlobal_v2 = win32api.GetProcAddress(handle, 'cuModuleGetGlobal_v2') - except: - pass + global __cuModuleGetGlobal_v2 + __cuModuleGetGlobal_v2 = windll.GetProcAddress(handle, 'cuModuleGetGlobal_v2') {{endif}} {{if 'cuLinkCreate_v2' in found_functions}} - try: - global __cuLinkCreate_v2 - __cuLinkCreate_v2 = win32api.GetProcAddress(handle, 'cuLinkCreate_v2') - except: - pass + global __cuLinkCreate_v2 + __cuLinkCreate_v2 = windll.GetProcAddress(handle, 'cuLinkCreate_v2') {{endif}} {{if 'cuLinkAddData_v2' in found_functions}} - try: - global __cuLinkAddData_v2 - __cuLinkAddData_v2 = win32api.GetProcAddress(handle, 'cuLinkAddData_v2') - except: - pass + global __cuLinkAddData_v2 + __cuLinkAddData_v2 = windll.GetProcAddress(handle, 'cuLinkAddData_v2') {{endif}} {{if 'cuLinkAddFile_v2' in found_functions}} - try: - global __cuLinkAddFile_v2 - __cuLinkAddFile_v2 = win32api.GetProcAddress(handle, 'cuLinkAddFile_v2') - except: - pass + global __cuLinkAddFile_v2 + __cuLinkAddFile_v2 = windll.GetProcAddress(handle, 'cuLinkAddFile_v2') {{endif}} {{if 'cuLinkComplete' in found_functions}} - try: - global __cuLinkComplete - __cuLinkComplete = win32api.GetProcAddress(handle, 'cuLinkComplete') - except: - pass + global __cuLinkComplete + __cuLinkComplete = windll.GetProcAddress(handle, 'cuLinkComplete') {{endif}} {{if 'cuLinkDestroy' in found_functions}} - try: - global __cuLinkDestroy - __cuLinkDestroy = win32api.GetProcAddress(handle, 'cuLinkDestroy') - except: - pass + global __cuLinkDestroy + __cuLinkDestroy = windll.GetProcAddress(handle, 'cuLinkDestroy') {{endif}} {{if 'cuModuleGetTexRef' in found_functions}} - try: - global __cuModuleGetTexRef - __cuModuleGetTexRef = win32api.GetProcAddress(handle, 'cuModuleGetTexRef') - except: - pass + global __cuModuleGetTexRef + __cuModuleGetTexRef = windll.GetProcAddress(handle, 'cuModuleGetTexRef') {{endif}} {{if 'cuModuleGetSurfRef' in found_functions}} - try: - global __cuModuleGetSurfRef - __cuModuleGetSurfRef = win32api.GetProcAddress(handle, 'cuModuleGetSurfRef') - except: - pass + global __cuModuleGetSurfRef + __cuModuleGetSurfRef = windll.GetProcAddress(handle, 'cuModuleGetSurfRef') {{endif}} {{if 'cuLibraryLoadData' in found_functions}} - try: - global __cuLibraryLoadData - __cuLibraryLoadData = win32api.GetProcAddress(handle, 'cuLibraryLoadData') - except: - pass + global __cuLibraryLoadData + __cuLibraryLoadData = windll.GetProcAddress(handle, 'cuLibraryLoadData') {{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}} - try: - global __cuLibraryLoadFromFile - __cuLibraryLoadFromFile = win32api.GetProcAddress(handle, 'cuLibraryLoadFromFile') - except: - pass + global __cuLibraryLoadFromFile + __cuLibraryLoadFromFile = windll.GetProcAddress(handle, 'cuLibraryLoadFromFile') {{endif}} {{if 'cuLibraryUnload' in found_functions}} - try: - global __cuLibraryUnload - __cuLibraryUnload = win32api.GetProcAddress(handle, 'cuLibraryUnload') - except: - pass + global __cuLibraryUnload + __cuLibraryUnload = windll.GetProcAddress(handle, 'cuLibraryUnload') {{endif}} {{if 'cuLibraryGetKernel' in found_functions}} - try: - global __cuLibraryGetKernel - __cuLibraryGetKernel = win32api.GetProcAddress(handle, 'cuLibraryGetKernel') - except: - pass + global __cuLibraryGetKernel + __cuLibraryGetKernel = windll.GetProcAddress(handle, 'cuLibraryGetKernel') {{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}} - try: - global __cuLibraryGetKernelCount - __cuLibraryGetKernelCount = win32api.GetProcAddress(handle, 'cuLibraryGetKernelCount') - except: - pass + global __cuLibraryGetKernelCount + __cuLibraryGetKernelCount = windll.GetProcAddress(handle, 'cuLibraryGetKernelCount') {{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}} - try: - global __cuLibraryEnumerateKernels - __cuLibraryEnumerateKernels = win32api.GetProcAddress(handle, 'cuLibraryEnumerateKernels') - except: - pass + global __cuLibraryEnumerateKernels + __cuLibraryEnumerateKernels = windll.GetProcAddress(handle, 'cuLibraryEnumerateKernels') {{endif}} {{if 'cuLibraryGetModule' in found_functions}} - try: - global __cuLibraryGetModule - __cuLibraryGetModule = win32api.GetProcAddress(handle, 'cuLibraryGetModule') - except: - pass + global __cuLibraryGetModule + __cuLibraryGetModule = windll.GetProcAddress(handle, 'cuLibraryGetModule') {{endif}} {{if 'cuKernelGetFunction' in found_functions}} - try: - global __cuKernelGetFunction - __cuKernelGetFunction = win32api.GetProcAddress(handle, 'cuKernelGetFunction') - except: - pass + global __cuKernelGetFunction + __cuKernelGetFunction = windll.GetProcAddress(handle, 'cuKernelGetFunction') {{endif}} {{if 'cuKernelGetLibrary' in found_functions}} - try: - global __cuKernelGetLibrary - __cuKernelGetLibrary = win32api.GetProcAddress(handle, 'cuKernelGetLibrary') - except: - pass + global __cuKernelGetLibrary + __cuKernelGetLibrary = windll.GetProcAddress(handle, 'cuKernelGetLibrary') {{endif}} {{if 'cuLibraryGetGlobal' in found_functions}} - try: - global __cuLibraryGetGlobal - __cuLibraryGetGlobal = win32api.GetProcAddress(handle, 'cuLibraryGetGlobal') - except: - pass + global __cuLibraryGetGlobal + __cuLibraryGetGlobal = windll.GetProcAddress(handle, 'cuLibraryGetGlobal') {{endif}} {{if 'cuLibraryGetManaged' in found_functions}} - try: - global __cuLibraryGetManaged - __cuLibraryGetManaged = win32api.GetProcAddress(handle, 'cuLibraryGetManaged') - except: - pass + global __cuLibraryGetManaged + __cuLibraryGetManaged = windll.GetProcAddress(handle, 'cuLibraryGetManaged') {{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}} - try: - global __cuLibraryGetUnifiedFunction - __cuLibraryGetUnifiedFunction = win32api.GetProcAddress(handle, 'cuLibraryGetUnifiedFunction') - except: - pass + global __cuLibraryGetUnifiedFunction + __cuLibraryGetUnifiedFunction = windll.GetProcAddress(handle, 'cuLibraryGetUnifiedFunction') {{endif}} {{if 'cuKernelGetAttribute' in found_functions}} - try: - global __cuKernelGetAttribute - __cuKernelGetAttribute = win32api.GetProcAddress(handle, 'cuKernelGetAttribute') - except: - pass + global __cuKernelGetAttribute + __cuKernelGetAttribute = windll.GetProcAddress(handle, 'cuKernelGetAttribute') {{endif}} {{if 'cuKernelSetAttribute' in found_functions}} - try: - global __cuKernelSetAttribute - __cuKernelSetAttribute = win32api.GetProcAddress(handle, 'cuKernelSetAttribute') - except: - pass + global __cuKernelSetAttribute + __cuKernelSetAttribute = windll.GetProcAddress(handle, 'cuKernelSetAttribute') {{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}} - try: - global __cuKernelSetCacheConfig - __cuKernelSetCacheConfig = win32api.GetProcAddress(handle, 'cuKernelSetCacheConfig') - except: - pass + global __cuKernelSetCacheConfig + __cuKernelSetCacheConfig = windll.GetProcAddress(handle, 'cuKernelSetCacheConfig') {{endif}} {{if 'cuKernelGetName' in found_functions}} - try: - global __cuKernelGetName - __cuKernelGetName = win32api.GetProcAddress(handle, 'cuKernelGetName') - except: - pass + global __cuKernelGetName + __cuKernelGetName = windll.GetProcAddress(handle, 'cuKernelGetName') {{endif}} {{if 'cuKernelGetParamInfo' in found_functions}} - try: - global __cuKernelGetParamInfo - __cuKernelGetParamInfo = win32api.GetProcAddress(handle, 'cuKernelGetParamInfo') - except: - pass + global __cuKernelGetParamInfo + __cuKernelGetParamInfo = windll.GetProcAddress(handle, 'cuKernelGetParamInfo') {{endif}} {{if 'cuMemGetInfo_v2' in found_functions}} - try: - global __cuMemGetInfo_v2 - __cuMemGetInfo_v2 = win32api.GetProcAddress(handle, 'cuMemGetInfo_v2') - except: - pass + global __cuMemGetInfo_v2 + __cuMemGetInfo_v2 = windll.GetProcAddress(handle, 'cuMemGetInfo_v2') {{endif}} {{if 'cuMemAlloc_v2' in found_functions}} - try: - global __cuMemAlloc_v2 - __cuMemAlloc_v2 = win32api.GetProcAddress(handle, 'cuMemAlloc_v2') - except: - pass + global __cuMemAlloc_v2 + __cuMemAlloc_v2 = windll.GetProcAddress(handle, 'cuMemAlloc_v2') {{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}} - try: - global __cuMemAllocPitch_v2 - __cuMemAllocPitch_v2 = win32api.GetProcAddress(handle, 'cuMemAllocPitch_v2') - except: - pass + global __cuMemAllocPitch_v2 + __cuMemAllocPitch_v2 = windll.GetProcAddress(handle, 'cuMemAllocPitch_v2') {{endif}} {{if 'cuMemFree_v2' in found_functions}} - try: - global __cuMemFree_v2 - __cuMemFree_v2 = win32api.GetProcAddress(handle, 'cuMemFree_v2') - except: - pass + global __cuMemFree_v2 + __cuMemFree_v2 = windll.GetProcAddress(handle, 'cuMemFree_v2') {{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}} - try: - global __cuMemGetAddressRange_v2 - __cuMemGetAddressRange_v2 = win32api.GetProcAddress(handle, 'cuMemGetAddressRange_v2') - except: - pass + global __cuMemGetAddressRange_v2 + __cuMemGetAddressRange_v2 = windll.GetProcAddress(handle, 'cuMemGetAddressRange_v2') {{endif}} {{if 'cuMemAllocHost_v2' in found_functions}} - try: - global __cuMemAllocHost_v2 - __cuMemAllocHost_v2 = win32api.GetProcAddress(handle, 'cuMemAllocHost_v2') - except: - pass + global __cuMemAllocHost_v2 + __cuMemAllocHost_v2 = windll.GetProcAddress(handle, 'cuMemAllocHost_v2') {{endif}} {{if 'cuMemFreeHost' in found_functions}} - try: - global __cuMemFreeHost - __cuMemFreeHost = win32api.GetProcAddress(handle, 'cuMemFreeHost') - except: - pass + global __cuMemFreeHost + __cuMemFreeHost = windll.GetProcAddress(handle, 'cuMemFreeHost') {{endif}} {{if 'cuMemHostAlloc' in found_functions}} - try: - global __cuMemHostAlloc - __cuMemHostAlloc = win32api.GetProcAddress(handle, 'cuMemHostAlloc') - except: - pass + global __cuMemHostAlloc + __cuMemHostAlloc = windll.GetProcAddress(handle, 'cuMemHostAlloc') {{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}} - try: - global __cuMemHostGetDevicePointer_v2 - __cuMemHostGetDevicePointer_v2 = win32api.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2') - except: - pass + global __cuMemHostGetDevicePointer_v2 + __cuMemHostGetDevicePointer_v2 = windll.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2') {{endif}} {{if 'cuMemHostGetFlags' in found_functions}} - try: - global __cuMemHostGetFlags - __cuMemHostGetFlags = win32api.GetProcAddress(handle, 'cuMemHostGetFlags') - except: - pass + global __cuMemHostGetFlags + __cuMemHostGetFlags = windll.GetProcAddress(handle, 'cuMemHostGetFlags') {{endif}} {{if 'cuMemAllocManaged' in found_functions}} - try: - global __cuMemAllocManaged - __cuMemAllocManaged = win32api.GetProcAddress(handle, 'cuMemAllocManaged') - except: - pass + global __cuMemAllocManaged + __cuMemAllocManaged = windll.GetProcAddress(handle, 'cuMemAllocManaged') {{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}} - try: - global __cuDeviceRegisterAsyncNotification - __cuDeviceRegisterAsyncNotification = win32api.GetProcAddress(handle, 'cuDeviceRegisterAsyncNotification') - except: - pass + global __cuDeviceRegisterAsyncNotification + __cuDeviceRegisterAsyncNotification = windll.GetProcAddress(handle, 'cuDeviceRegisterAsyncNotification') {{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}} - try: - global __cuDeviceUnregisterAsyncNotification - __cuDeviceUnregisterAsyncNotification = win32api.GetProcAddress(handle, 'cuDeviceUnregisterAsyncNotification') - except: - pass + global __cuDeviceUnregisterAsyncNotification + __cuDeviceUnregisterAsyncNotification = windll.GetProcAddress(handle, 'cuDeviceUnregisterAsyncNotification') {{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}} - try: - global __cuDeviceGetByPCIBusId - __cuDeviceGetByPCIBusId = win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId') - except: - pass + global __cuDeviceGetByPCIBusId + __cuDeviceGetByPCIBusId = windll.GetProcAddress(handle, 'cuDeviceGetByPCIBusId') {{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}} - try: - global __cuDeviceGetPCIBusId - __cuDeviceGetPCIBusId = win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId') - except: - pass + global __cuDeviceGetPCIBusId + __cuDeviceGetPCIBusId = windll.GetProcAddress(handle, 'cuDeviceGetPCIBusId') {{endif}} {{if 'cuIpcGetEventHandle' in found_functions}} - try: - global __cuIpcGetEventHandle - __cuIpcGetEventHandle = win32api.GetProcAddress(handle, 'cuIpcGetEventHandle') - except: - pass + global __cuIpcGetEventHandle + __cuIpcGetEventHandle = windll.GetProcAddress(handle, 'cuIpcGetEventHandle') {{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}} - try: - global __cuIpcOpenEventHandle - __cuIpcOpenEventHandle = win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle') - except: - pass + global __cuIpcOpenEventHandle + __cuIpcOpenEventHandle = windll.GetProcAddress(handle, 'cuIpcOpenEventHandle') {{endif}} {{if 'cuIpcGetMemHandle' in found_functions}} - try: - global __cuIpcGetMemHandle - __cuIpcGetMemHandle = win32api.GetProcAddress(handle, 'cuIpcGetMemHandle') - except: - pass + global __cuIpcGetMemHandle + __cuIpcGetMemHandle = windll.GetProcAddress(handle, 'cuIpcGetMemHandle') {{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}} - try: - global __cuIpcOpenMemHandle_v2 - __cuIpcOpenMemHandle_v2 = win32api.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2') - except: - pass + global __cuIpcOpenMemHandle_v2 + __cuIpcOpenMemHandle_v2 = windll.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2') {{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}} - try: - global __cuIpcCloseMemHandle - __cuIpcCloseMemHandle = win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle') - except: - pass + global __cuIpcCloseMemHandle + __cuIpcCloseMemHandle = windll.GetProcAddress(handle, 'cuIpcCloseMemHandle') {{endif}} {{if 'cuMemHostRegister_v2' in found_functions}} - try: - global __cuMemHostRegister_v2 - __cuMemHostRegister_v2 = win32api.GetProcAddress(handle, 'cuMemHostRegister_v2') - except: - pass + global __cuMemHostRegister_v2 + __cuMemHostRegister_v2 = windll.GetProcAddress(handle, 'cuMemHostRegister_v2') {{endif}} {{if 'cuMemHostUnregister' in found_functions}} - try: - global __cuMemHostUnregister - __cuMemHostUnregister = win32api.GetProcAddress(handle, 'cuMemHostUnregister') - except: - pass + global __cuMemHostUnregister + __cuMemHostUnregister = windll.GetProcAddress(handle, 'cuMemHostUnregister') {{endif}} {{if 'cuArrayCreate_v2' in found_functions}} - try: - global __cuArrayCreate_v2 - __cuArrayCreate_v2 = win32api.GetProcAddress(handle, 'cuArrayCreate_v2') - except: - pass + global __cuArrayCreate_v2 + __cuArrayCreate_v2 = windll.GetProcAddress(handle, 'cuArrayCreate_v2') {{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}} - try: - global __cuArrayGetDescriptor_v2 - __cuArrayGetDescriptor_v2 = win32api.GetProcAddress(handle, 'cuArrayGetDescriptor_v2') - except: - pass + global __cuArrayGetDescriptor_v2 + __cuArrayGetDescriptor_v2 = windll.GetProcAddress(handle, 'cuArrayGetDescriptor_v2') {{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}} - try: - global __cuArrayGetSparseProperties - __cuArrayGetSparseProperties = win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties') - except: - pass + global __cuArrayGetSparseProperties + __cuArrayGetSparseProperties = windll.GetProcAddress(handle, 'cuArrayGetSparseProperties') {{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}} - try: - global __cuMipmappedArrayGetSparseProperties - __cuMipmappedArrayGetSparseProperties = win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties') - except: - pass + global __cuMipmappedArrayGetSparseProperties + __cuMipmappedArrayGetSparseProperties = windll.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties') {{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}} - try: - global __cuArrayGetMemoryRequirements - __cuArrayGetMemoryRequirements = win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements') - except: - pass + global __cuArrayGetMemoryRequirements + __cuArrayGetMemoryRequirements = windll.GetProcAddress(handle, 'cuArrayGetMemoryRequirements') {{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}} - try: - global __cuMipmappedArrayGetMemoryRequirements - __cuMipmappedArrayGetMemoryRequirements = win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements') - except: - pass + global __cuMipmappedArrayGetMemoryRequirements + __cuMipmappedArrayGetMemoryRequirements = windll.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements') {{endif}} {{if 'cuArrayGetPlane' in found_functions}} - try: - global __cuArrayGetPlane - __cuArrayGetPlane = win32api.GetProcAddress(handle, 'cuArrayGetPlane') - except: - pass + global __cuArrayGetPlane + __cuArrayGetPlane = windll.GetProcAddress(handle, 'cuArrayGetPlane') {{endif}} {{if 'cuArrayDestroy' in found_functions}} - try: - global __cuArrayDestroy - __cuArrayDestroy = win32api.GetProcAddress(handle, 'cuArrayDestroy') - except: - pass + global __cuArrayDestroy + __cuArrayDestroy = windll.GetProcAddress(handle, 'cuArrayDestroy') {{endif}} {{if 'cuArray3DCreate_v2' in found_functions}} - try: - global __cuArray3DCreate_v2 - __cuArray3DCreate_v2 = win32api.GetProcAddress(handle, 'cuArray3DCreate_v2') - except: - pass + global __cuArray3DCreate_v2 + __cuArray3DCreate_v2 = windll.GetProcAddress(handle, 'cuArray3DCreate_v2') {{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}} - try: - global __cuArray3DGetDescriptor_v2 - __cuArray3DGetDescriptor_v2 = win32api.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2') - except: - pass + global __cuArray3DGetDescriptor_v2 + __cuArray3DGetDescriptor_v2 = windll.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2') {{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}} - try: - global __cuMipmappedArrayCreate - __cuMipmappedArrayCreate = win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate') - except: - pass + global __cuMipmappedArrayCreate + __cuMipmappedArrayCreate = windll.GetProcAddress(handle, 'cuMipmappedArrayCreate') {{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}} - try: - global __cuMipmappedArrayGetLevel - __cuMipmappedArrayGetLevel = win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel') - except: - pass + global __cuMipmappedArrayGetLevel + __cuMipmappedArrayGetLevel = windll.GetProcAddress(handle, 'cuMipmappedArrayGetLevel') {{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}} - try: - global __cuMipmappedArrayDestroy - __cuMipmappedArrayDestroy = win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy') - except: - pass + global __cuMipmappedArrayDestroy + __cuMipmappedArrayDestroy = windll.GetProcAddress(handle, 'cuMipmappedArrayDestroy') {{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}} - try: - global __cuMemGetHandleForAddressRange - __cuMemGetHandleForAddressRange = win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange') - except: - pass + global __cuMemGetHandleForAddressRange + __cuMemGetHandleForAddressRange = windll.GetProcAddress(handle, 'cuMemGetHandleForAddressRange') {{endif}} {{if 'cuMemAddressReserve' in found_functions}} - try: - global __cuMemAddressReserve - __cuMemAddressReserve = win32api.GetProcAddress(handle, 'cuMemAddressReserve') - except: - pass + global __cuMemAddressReserve + __cuMemAddressReserve = windll.GetProcAddress(handle, 'cuMemAddressReserve') {{endif}} {{if 'cuMemAddressFree' in found_functions}} - try: - global __cuMemAddressFree - __cuMemAddressFree = win32api.GetProcAddress(handle, 'cuMemAddressFree') - except: - pass + global __cuMemAddressFree + __cuMemAddressFree = windll.GetProcAddress(handle, 'cuMemAddressFree') {{endif}} {{if 'cuMemCreate' in found_functions}} - try: - global __cuMemCreate - __cuMemCreate = win32api.GetProcAddress(handle, 'cuMemCreate') - except: - pass + global __cuMemCreate + __cuMemCreate = windll.GetProcAddress(handle, 'cuMemCreate') {{endif}} {{if 'cuMemRelease' in found_functions}} - try: - global __cuMemRelease - __cuMemRelease = win32api.GetProcAddress(handle, 'cuMemRelease') - except: - pass + global __cuMemRelease + __cuMemRelease = windll.GetProcAddress(handle, 'cuMemRelease') {{endif}} {{if 'cuMemMap' in found_functions}} - try: - global __cuMemMap - __cuMemMap = win32api.GetProcAddress(handle, 'cuMemMap') - except: - pass + global __cuMemMap + __cuMemMap = windll.GetProcAddress(handle, 'cuMemMap') {{endif}} {{if 'cuMemUnmap' in found_functions}} - try: - global __cuMemUnmap - __cuMemUnmap = win32api.GetProcAddress(handle, 'cuMemUnmap') - except: - pass + global __cuMemUnmap + __cuMemUnmap = windll.GetProcAddress(handle, 'cuMemUnmap') {{endif}} {{if 'cuMemSetAccess' in found_functions}} - try: - global __cuMemSetAccess - __cuMemSetAccess = win32api.GetProcAddress(handle, 'cuMemSetAccess') - except: - pass + global __cuMemSetAccess + __cuMemSetAccess = windll.GetProcAddress(handle, 'cuMemSetAccess') {{endif}} {{if 'cuMemGetAccess' in found_functions}} - try: - global __cuMemGetAccess - __cuMemGetAccess = win32api.GetProcAddress(handle, 'cuMemGetAccess') - except: - pass + global __cuMemGetAccess + __cuMemGetAccess = windll.GetProcAddress(handle, 'cuMemGetAccess') {{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}} - try: - global __cuMemExportToShareableHandle - __cuMemExportToShareableHandle = win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle') - except: - pass + global __cuMemExportToShareableHandle + __cuMemExportToShareableHandle = windll.GetProcAddress(handle, 'cuMemExportToShareableHandle') {{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}} - try: - global __cuMemImportFromShareableHandle - __cuMemImportFromShareableHandle = win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle') - except: - pass + global __cuMemImportFromShareableHandle + __cuMemImportFromShareableHandle = windll.GetProcAddress(handle, 'cuMemImportFromShareableHandle') {{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}} - try: - global __cuMemGetAllocationGranularity - __cuMemGetAllocationGranularity = win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity') - except: - pass + global __cuMemGetAllocationGranularity + __cuMemGetAllocationGranularity = windll.GetProcAddress(handle, 'cuMemGetAllocationGranularity') {{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}} - try: - global __cuMemGetAllocationPropertiesFromHandle - __cuMemGetAllocationPropertiesFromHandle = win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle') - except: - pass + global __cuMemGetAllocationPropertiesFromHandle + __cuMemGetAllocationPropertiesFromHandle = windll.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle') {{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}} - try: - global __cuMemRetainAllocationHandle - __cuMemRetainAllocationHandle = win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle') - except: - pass + global __cuMemRetainAllocationHandle + __cuMemRetainAllocationHandle = windll.GetProcAddress(handle, 'cuMemRetainAllocationHandle') {{endif}} {{if 'cuMemPoolTrimTo' in found_functions}} - try: - global __cuMemPoolTrimTo - __cuMemPoolTrimTo = win32api.GetProcAddress(handle, 'cuMemPoolTrimTo') - except: - pass + global __cuMemPoolTrimTo + __cuMemPoolTrimTo = windll.GetProcAddress(handle, 'cuMemPoolTrimTo') {{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}} - try: - global __cuMemPoolSetAttribute - __cuMemPoolSetAttribute = win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute') - except: - pass + global __cuMemPoolSetAttribute + __cuMemPoolSetAttribute = windll.GetProcAddress(handle, 'cuMemPoolSetAttribute') {{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}} - try: - global __cuMemPoolGetAttribute - __cuMemPoolGetAttribute = win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute') - except: - pass + global __cuMemPoolGetAttribute + __cuMemPoolGetAttribute = windll.GetProcAddress(handle, 'cuMemPoolGetAttribute') {{endif}} {{if 'cuMemPoolSetAccess' in found_functions}} - try: - global __cuMemPoolSetAccess - __cuMemPoolSetAccess = win32api.GetProcAddress(handle, 'cuMemPoolSetAccess') - except: - pass + global __cuMemPoolSetAccess + __cuMemPoolSetAccess = windll.GetProcAddress(handle, 'cuMemPoolSetAccess') {{endif}} {{if 'cuMemPoolGetAccess' in found_functions}} - try: - global __cuMemPoolGetAccess - __cuMemPoolGetAccess = win32api.GetProcAddress(handle, 'cuMemPoolGetAccess') - except: - pass + global __cuMemPoolGetAccess + __cuMemPoolGetAccess = windll.GetProcAddress(handle, 'cuMemPoolGetAccess') {{endif}} {{if 'cuMemPoolCreate' in found_functions}} - try: - global __cuMemPoolCreate - __cuMemPoolCreate = win32api.GetProcAddress(handle, 'cuMemPoolCreate') - except: - pass + global __cuMemPoolCreate + __cuMemPoolCreate = windll.GetProcAddress(handle, 'cuMemPoolCreate') {{endif}} {{if 'cuMemPoolDestroy' in found_functions}} - try: - global __cuMemPoolDestroy - __cuMemPoolDestroy = win32api.GetProcAddress(handle, 'cuMemPoolDestroy') - except: - pass + global __cuMemPoolDestroy + __cuMemPoolDestroy = windll.GetProcAddress(handle, 'cuMemPoolDestroy') {{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}} - try: - global __cuMemPoolExportToShareableHandle - __cuMemPoolExportToShareableHandle = win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle') - except: - pass + global __cuMemPoolExportToShareableHandle + __cuMemPoolExportToShareableHandle = windll.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle') {{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}} - try: - global __cuMemPoolImportFromShareableHandle - __cuMemPoolImportFromShareableHandle = win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle') - except: - pass + global __cuMemPoolImportFromShareableHandle + __cuMemPoolImportFromShareableHandle = windll.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle') {{endif}} {{if 'cuMemPoolExportPointer' in found_functions}} - try: - global __cuMemPoolExportPointer - __cuMemPoolExportPointer = win32api.GetProcAddress(handle, 'cuMemPoolExportPointer') - except: - pass + global __cuMemPoolExportPointer + __cuMemPoolExportPointer = windll.GetProcAddress(handle, 'cuMemPoolExportPointer') {{endif}} {{if 'cuMemPoolImportPointer' in found_functions}} - try: - global __cuMemPoolImportPointer - __cuMemPoolImportPointer = win32api.GetProcAddress(handle, 'cuMemPoolImportPointer') - except: - pass + global __cuMemPoolImportPointer + __cuMemPoolImportPointer = windll.GetProcAddress(handle, 'cuMemPoolImportPointer') {{endif}} {{if 'cuMulticastCreate' in found_functions}} - try: - global __cuMulticastCreate - __cuMulticastCreate = win32api.GetProcAddress(handle, 'cuMulticastCreate') - except: - pass + global __cuMulticastCreate + __cuMulticastCreate = windll.GetProcAddress(handle, 'cuMulticastCreate') {{endif}} {{if 'cuMulticastAddDevice' in found_functions}} - try: - global __cuMulticastAddDevice - __cuMulticastAddDevice = win32api.GetProcAddress(handle, 'cuMulticastAddDevice') - except: - pass + global __cuMulticastAddDevice + __cuMulticastAddDevice = windll.GetProcAddress(handle, 'cuMulticastAddDevice') {{endif}} {{if 'cuMulticastBindMem' in found_functions}} - try: - global __cuMulticastBindMem - __cuMulticastBindMem = win32api.GetProcAddress(handle, 'cuMulticastBindMem') - except: - pass + global __cuMulticastBindMem + __cuMulticastBindMem = windll.GetProcAddress(handle, 'cuMulticastBindMem') {{endif}} {{if 'cuMulticastBindAddr' in found_functions}} - try: - global __cuMulticastBindAddr - __cuMulticastBindAddr = win32api.GetProcAddress(handle, 'cuMulticastBindAddr') - except: - pass + global __cuMulticastBindAddr + __cuMulticastBindAddr = windll.GetProcAddress(handle, 'cuMulticastBindAddr') {{endif}} {{if 'cuMulticastUnbind' in found_functions}} - try: - global __cuMulticastUnbind - __cuMulticastUnbind = win32api.GetProcAddress(handle, 'cuMulticastUnbind') - except: - pass + global __cuMulticastUnbind + __cuMulticastUnbind = windll.GetProcAddress(handle, 'cuMulticastUnbind') {{endif}} {{if 'cuMulticastGetGranularity' in found_functions}} - try: - global __cuMulticastGetGranularity - __cuMulticastGetGranularity = win32api.GetProcAddress(handle, 'cuMulticastGetGranularity') - except: - pass + global __cuMulticastGetGranularity + __cuMulticastGetGranularity = windll.GetProcAddress(handle, 'cuMulticastGetGranularity') {{endif}} {{if 'cuPointerGetAttribute' in found_functions}} - try: - global __cuPointerGetAttribute - __cuPointerGetAttribute = win32api.GetProcAddress(handle, 'cuPointerGetAttribute') - except: - pass + global __cuPointerGetAttribute + __cuPointerGetAttribute = windll.GetProcAddress(handle, 'cuPointerGetAttribute') {{endif}} {{if 'cuMemAdvise' in found_functions}} - try: - global __cuMemAdvise - __cuMemAdvise = win32api.GetProcAddress(handle, 'cuMemAdvise') - except: - pass + global __cuMemAdvise + __cuMemAdvise = windll.GetProcAddress(handle, 'cuMemAdvise') {{endif}} {{if 'cuMemAdvise_v2' in found_functions}} - try: - global __cuMemAdvise_v2 - __cuMemAdvise_v2 = win32api.GetProcAddress(handle, 'cuMemAdvise_v2') - except: - pass + global __cuMemAdvise_v2 + __cuMemAdvise_v2 = windll.GetProcAddress(handle, 'cuMemAdvise_v2') {{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}} - try: - global __cuMemRangeGetAttribute - __cuMemRangeGetAttribute = win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute') - except: - pass + global __cuMemRangeGetAttribute + __cuMemRangeGetAttribute = windll.GetProcAddress(handle, 'cuMemRangeGetAttribute') {{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}} - try: - global __cuMemRangeGetAttributes - __cuMemRangeGetAttributes = win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes') - except: - pass + global __cuMemRangeGetAttributes + __cuMemRangeGetAttributes = windll.GetProcAddress(handle, 'cuMemRangeGetAttributes') {{endif}} {{if 'cuPointerSetAttribute' in found_functions}} - try: - global __cuPointerSetAttribute - __cuPointerSetAttribute = win32api.GetProcAddress(handle, 'cuPointerSetAttribute') - except: - pass + global __cuPointerSetAttribute + __cuPointerSetAttribute = windll.GetProcAddress(handle, 'cuPointerSetAttribute') {{endif}} {{if 'cuPointerGetAttributes' in found_functions}} - try: - global __cuPointerGetAttributes - __cuPointerGetAttributes = win32api.GetProcAddress(handle, 'cuPointerGetAttributes') - except: - pass + global __cuPointerGetAttributes + __cuPointerGetAttributes = windll.GetProcAddress(handle, 'cuPointerGetAttributes') {{endif}} {{if 'cuStreamCreate' in found_functions}} - try: - global __cuStreamCreate - __cuStreamCreate = win32api.GetProcAddress(handle, 'cuStreamCreate') - except: - pass + global __cuStreamCreate + __cuStreamCreate = windll.GetProcAddress(handle, 'cuStreamCreate') {{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}} - try: - global __cuStreamCreateWithPriority - __cuStreamCreateWithPriority = win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority') - except: - pass + global __cuStreamCreateWithPriority + __cuStreamCreateWithPriority = windll.GetProcAddress(handle, 'cuStreamCreateWithPriority') {{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}} - try: - global __cuThreadExchangeStreamCaptureMode - __cuThreadExchangeStreamCaptureMode = win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode') - except: - pass + global __cuThreadExchangeStreamCaptureMode + __cuThreadExchangeStreamCaptureMode = windll.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode') {{endif}} {{if 'cuStreamDestroy_v2' in found_functions}} - try: - global __cuStreamDestroy_v2 - __cuStreamDestroy_v2 = win32api.GetProcAddress(handle, 'cuStreamDestroy_v2') - except: - pass + global __cuStreamDestroy_v2 + __cuStreamDestroy_v2 = windll.GetProcAddress(handle, 'cuStreamDestroy_v2') {{endif}} {{if 'cuEventCreate' in found_functions}} - try: - global __cuEventCreate - __cuEventCreate = win32api.GetProcAddress(handle, 'cuEventCreate') - except: - pass + global __cuEventCreate + __cuEventCreate = windll.GetProcAddress(handle, 'cuEventCreate') {{endif}} {{if 'cuEventQuery' in found_functions}} - try: - global __cuEventQuery - __cuEventQuery = win32api.GetProcAddress(handle, 'cuEventQuery') - except: - pass + global __cuEventQuery + __cuEventQuery = windll.GetProcAddress(handle, 'cuEventQuery') {{endif}} {{if 'cuEventSynchronize' in found_functions}} - try: - global __cuEventSynchronize - __cuEventSynchronize = win32api.GetProcAddress(handle, 'cuEventSynchronize') - except: - pass + global __cuEventSynchronize + __cuEventSynchronize = windll.GetProcAddress(handle, 'cuEventSynchronize') {{endif}} {{if 'cuEventDestroy_v2' in found_functions}} - try: - global __cuEventDestroy_v2 - __cuEventDestroy_v2 = win32api.GetProcAddress(handle, 'cuEventDestroy_v2') - except: - pass + global __cuEventDestroy_v2 + __cuEventDestroy_v2 = windll.GetProcAddress(handle, 'cuEventDestroy_v2') {{endif}} {{if 'cuEventElapsedTime' in found_functions}} - try: - global __cuEventElapsedTime - __cuEventElapsedTime = win32api.GetProcAddress(handle, 'cuEventElapsedTime') - except: - pass + global __cuEventElapsedTime + __cuEventElapsedTime = windll.GetProcAddress(handle, 'cuEventElapsedTime') {{endif}} {{if 'cuEventElapsedTime_v2' in found_functions}} - try: - global __cuEventElapsedTime_v2 - __cuEventElapsedTime_v2 = win32api.GetProcAddress(handle, 'cuEventElapsedTime_v2') - except: - pass + global __cuEventElapsedTime_v2 + __cuEventElapsedTime_v2 = windll.GetProcAddress(handle, 'cuEventElapsedTime_v2') {{endif}} {{if 'cuImportExternalMemory' in found_functions}} - try: - global __cuImportExternalMemory - __cuImportExternalMemory = win32api.GetProcAddress(handle, 'cuImportExternalMemory') - except: - pass + global __cuImportExternalMemory + __cuImportExternalMemory = windll.GetProcAddress(handle, 'cuImportExternalMemory') {{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}} - try: - global __cuExternalMemoryGetMappedBuffer - __cuExternalMemoryGetMappedBuffer = win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer') - except: - pass + global __cuExternalMemoryGetMappedBuffer + __cuExternalMemoryGetMappedBuffer = windll.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer') {{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}} - try: - global __cuExternalMemoryGetMappedMipmappedArray - __cuExternalMemoryGetMappedMipmappedArray = win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray') - except: - pass + global __cuExternalMemoryGetMappedMipmappedArray + __cuExternalMemoryGetMappedMipmappedArray = windll.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray') {{endif}} {{if 'cuDestroyExternalMemory' in found_functions}} - try: - global __cuDestroyExternalMemory - __cuDestroyExternalMemory = win32api.GetProcAddress(handle, 'cuDestroyExternalMemory') - except: - pass + global __cuDestroyExternalMemory + __cuDestroyExternalMemory = windll.GetProcAddress(handle, 'cuDestroyExternalMemory') {{endif}} {{if 'cuImportExternalSemaphore' in found_functions}} - try: - global __cuImportExternalSemaphore - __cuImportExternalSemaphore = win32api.GetProcAddress(handle, 'cuImportExternalSemaphore') - except: - pass + global __cuImportExternalSemaphore + __cuImportExternalSemaphore = windll.GetProcAddress(handle, 'cuImportExternalSemaphore') {{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}} - try: - global __cuDestroyExternalSemaphore - __cuDestroyExternalSemaphore = win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore') - except: - pass + global __cuDestroyExternalSemaphore + __cuDestroyExternalSemaphore = windll.GetProcAddress(handle, 'cuDestroyExternalSemaphore') {{endif}} {{if 'cuFuncGetAttribute' in found_functions}} - try: - global __cuFuncGetAttribute - __cuFuncGetAttribute = win32api.GetProcAddress(handle, 'cuFuncGetAttribute') - except: - pass + global __cuFuncGetAttribute + __cuFuncGetAttribute = windll.GetProcAddress(handle, 'cuFuncGetAttribute') {{endif}} {{if 'cuFuncSetAttribute' in found_functions}} - try: - global __cuFuncSetAttribute - __cuFuncSetAttribute = win32api.GetProcAddress(handle, 'cuFuncSetAttribute') - except: - pass + global __cuFuncSetAttribute + __cuFuncSetAttribute = windll.GetProcAddress(handle, 'cuFuncSetAttribute') {{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}} - try: - global __cuFuncSetCacheConfig - __cuFuncSetCacheConfig = win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig') - except: - pass + global __cuFuncSetCacheConfig + __cuFuncSetCacheConfig = windll.GetProcAddress(handle, 'cuFuncSetCacheConfig') {{endif}} {{if 'cuFuncGetModule' in found_functions}} - try: - global __cuFuncGetModule - __cuFuncGetModule = win32api.GetProcAddress(handle, 'cuFuncGetModule') - except: - pass + global __cuFuncGetModule + __cuFuncGetModule = windll.GetProcAddress(handle, 'cuFuncGetModule') {{endif}} {{if 'cuFuncGetName' in found_functions}} - try: - global __cuFuncGetName - __cuFuncGetName = win32api.GetProcAddress(handle, 'cuFuncGetName') - except: - pass + global __cuFuncGetName + __cuFuncGetName = windll.GetProcAddress(handle, 'cuFuncGetName') {{endif}} {{if 'cuFuncGetParamInfo' in found_functions}} - try: - global __cuFuncGetParamInfo - __cuFuncGetParamInfo = win32api.GetProcAddress(handle, 'cuFuncGetParamInfo') - except: - pass + global __cuFuncGetParamInfo + __cuFuncGetParamInfo = windll.GetProcAddress(handle, 'cuFuncGetParamInfo') {{endif}} {{if 'cuFuncIsLoaded' in found_functions}} - try: - global __cuFuncIsLoaded - __cuFuncIsLoaded = win32api.GetProcAddress(handle, 'cuFuncIsLoaded') - except: - pass + global __cuFuncIsLoaded + __cuFuncIsLoaded = windll.GetProcAddress(handle, 'cuFuncIsLoaded') {{endif}} {{if 'cuFuncLoad' in found_functions}} - try: - global __cuFuncLoad - __cuFuncLoad = win32api.GetProcAddress(handle, 'cuFuncLoad') - except: - pass + global __cuFuncLoad + __cuFuncLoad = windll.GetProcAddress(handle, 'cuFuncLoad') {{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}} - try: - global __cuLaunchCooperativeKernelMultiDevice - __cuLaunchCooperativeKernelMultiDevice = win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice') - except: - pass + global __cuLaunchCooperativeKernelMultiDevice + __cuLaunchCooperativeKernelMultiDevice = windll.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice') {{endif}} {{if 'cuFuncSetBlockShape' in found_functions}} - try: - global __cuFuncSetBlockShape - __cuFuncSetBlockShape = win32api.GetProcAddress(handle, 'cuFuncSetBlockShape') - except: - pass + global __cuFuncSetBlockShape + __cuFuncSetBlockShape = windll.GetProcAddress(handle, 'cuFuncSetBlockShape') {{endif}} {{if 'cuFuncSetSharedSize' in found_functions}} - try: - global __cuFuncSetSharedSize - __cuFuncSetSharedSize = win32api.GetProcAddress(handle, 'cuFuncSetSharedSize') - except: - pass + global __cuFuncSetSharedSize + __cuFuncSetSharedSize = windll.GetProcAddress(handle, 'cuFuncSetSharedSize') {{endif}} {{if 'cuParamSetSize' in found_functions}} - try: - global __cuParamSetSize - __cuParamSetSize = win32api.GetProcAddress(handle, 'cuParamSetSize') - except: - pass + global __cuParamSetSize + __cuParamSetSize = windll.GetProcAddress(handle, 'cuParamSetSize') {{endif}} {{if 'cuParamSeti' in found_functions}} - try: - global __cuParamSeti - __cuParamSeti = win32api.GetProcAddress(handle, 'cuParamSeti') - except: - pass + global __cuParamSeti + __cuParamSeti = windll.GetProcAddress(handle, 'cuParamSeti') {{endif}} {{if 'cuParamSetf' in found_functions}} - try: - global __cuParamSetf - __cuParamSetf = win32api.GetProcAddress(handle, 'cuParamSetf') - except: - pass + global __cuParamSetf + __cuParamSetf = windll.GetProcAddress(handle, 'cuParamSetf') {{endif}} {{if 'cuParamSetv' in found_functions}} - try: - global __cuParamSetv - __cuParamSetv = win32api.GetProcAddress(handle, 'cuParamSetv') - except: - pass + global __cuParamSetv + __cuParamSetv = windll.GetProcAddress(handle, 'cuParamSetv') {{endif}} {{if 'cuLaunch' in found_functions}} - try: - global __cuLaunch - __cuLaunch = win32api.GetProcAddress(handle, 'cuLaunch') - except: - pass + global __cuLaunch + __cuLaunch = windll.GetProcAddress(handle, 'cuLaunch') {{endif}} {{if 'cuLaunchGrid' in found_functions}} - try: - global __cuLaunchGrid - __cuLaunchGrid = win32api.GetProcAddress(handle, 'cuLaunchGrid') - except: - pass + global __cuLaunchGrid + __cuLaunchGrid = windll.GetProcAddress(handle, 'cuLaunchGrid') {{endif}} {{if 'cuLaunchGridAsync' in found_functions}} - try: - global __cuLaunchGridAsync - __cuLaunchGridAsync = win32api.GetProcAddress(handle, 'cuLaunchGridAsync') - except: - pass + global __cuLaunchGridAsync + __cuLaunchGridAsync = windll.GetProcAddress(handle, 'cuLaunchGridAsync') {{endif}} {{if 'cuParamSetTexRef' in found_functions}} - try: - global __cuParamSetTexRef - __cuParamSetTexRef = win32api.GetProcAddress(handle, 'cuParamSetTexRef') - except: - pass + global __cuParamSetTexRef + __cuParamSetTexRef = windll.GetProcAddress(handle, 'cuParamSetTexRef') {{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}} - try: - global __cuFuncSetSharedMemConfig - __cuFuncSetSharedMemConfig = win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig') - except: - pass + global __cuFuncSetSharedMemConfig + __cuFuncSetSharedMemConfig = windll.GetProcAddress(handle, 'cuFuncSetSharedMemConfig') {{endif}} {{if 'cuGraphCreate' in found_functions}} - try: - global __cuGraphCreate - __cuGraphCreate = win32api.GetProcAddress(handle, 'cuGraphCreate') - except: - pass + global __cuGraphCreate + __cuGraphCreate = windll.GetProcAddress(handle, 'cuGraphCreate') {{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}} - try: - global __cuGraphAddKernelNode_v2 - __cuGraphAddKernelNode_v2 = win32api.GetProcAddress(handle, 'cuGraphAddKernelNode_v2') - except: - pass + global __cuGraphAddKernelNode_v2 + __cuGraphAddKernelNode_v2 = windll.GetProcAddress(handle, 'cuGraphAddKernelNode_v2') {{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}} - try: - global __cuGraphKernelNodeGetParams_v2 - __cuGraphKernelNodeGetParams_v2 = win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams_v2') - except: - pass + global __cuGraphKernelNodeGetParams_v2 + __cuGraphKernelNodeGetParams_v2 = windll.GetProcAddress(handle, 'cuGraphKernelNodeGetParams_v2') {{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}} - try: - global __cuGraphKernelNodeSetParams_v2 - __cuGraphKernelNodeSetParams_v2 = win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams_v2') - except: - pass + global __cuGraphKernelNodeSetParams_v2 + __cuGraphKernelNodeSetParams_v2 = windll.GetProcAddress(handle, 'cuGraphKernelNodeSetParams_v2') {{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}} - try: - global __cuGraphAddMemcpyNode - __cuGraphAddMemcpyNode = win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode') - except: - pass + global __cuGraphAddMemcpyNode + __cuGraphAddMemcpyNode = windll.GetProcAddress(handle, 'cuGraphAddMemcpyNode') {{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}} - try: - global __cuGraphMemcpyNodeGetParams - __cuGraphMemcpyNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams') - except: - pass + global __cuGraphMemcpyNodeGetParams + __cuGraphMemcpyNodeGetParams = windll.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams') {{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}} - try: - global __cuGraphMemcpyNodeSetParams - __cuGraphMemcpyNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams') - except: - pass + global __cuGraphMemcpyNodeSetParams + __cuGraphMemcpyNodeSetParams = windll.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams') {{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}} - try: - global __cuGraphAddMemsetNode - __cuGraphAddMemsetNode = win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode') - except: - pass + global __cuGraphAddMemsetNode + __cuGraphAddMemsetNode = windll.GetProcAddress(handle, 'cuGraphAddMemsetNode') {{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}} - try: - global __cuGraphMemsetNodeGetParams - __cuGraphMemsetNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams') - except: - pass + global __cuGraphMemsetNodeGetParams + __cuGraphMemsetNodeGetParams = windll.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams') {{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}} - try: - global __cuGraphMemsetNodeSetParams - __cuGraphMemsetNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams') - except: - pass + global __cuGraphMemsetNodeSetParams + __cuGraphMemsetNodeSetParams = windll.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams') {{endif}} {{if 'cuGraphAddHostNode' in found_functions}} - try: - global __cuGraphAddHostNode - __cuGraphAddHostNode = win32api.GetProcAddress(handle, 'cuGraphAddHostNode') - except: - pass + global __cuGraphAddHostNode + __cuGraphAddHostNode = windll.GetProcAddress(handle, 'cuGraphAddHostNode') {{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}} - try: - global __cuGraphHostNodeGetParams - __cuGraphHostNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams') - except: - pass + global __cuGraphHostNodeGetParams + __cuGraphHostNodeGetParams = windll.GetProcAddress(handle, 'cuGraphHostNodeGetParams') {{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}} - try: - global __cuGraphHostNodeSetParams - __cuGraphHostNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams') - except: - pass + global __cuGraphHostNodeSetParams + __cuGraphHostNodeSetParams = windll.GetProcAddress(handle, 'cuGraphHostNodeSetParams') {{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}} - try: - global __cuGraphAddChildGraphNode - __cuGraphAddChildGraphNode = win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode') - except: - pass + global __cuGraphAddChildGraphNode + __cuGraphAddChildGraphNode = windll.GetProcAddress(handle, 'cuGraphAddChildGraphNode') {{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}} - try: - global __cuGraphChildGraphNodeGetGraph - __cuGraphChildGraphNodeGetGraph = win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph') - except: - pass + global __cuGraphChildGraphNodeGetGraph + __cuGraphChildGraphNodeGetGraph = windll.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph') {{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}} - try: - global __cuGraphAddEmptyNode - __cuGraphAddEmptyNode = win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode') - except: - pass + global __cuGraphAddEmptyNode + __cuGraphAddEmptyNode = windll.GetProcAddress(handle, 'cuGraphAddEmptyNode') {{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}} - try: - global __cuGraphAddEventRecordNode - __cuGraphAddEventRecordNode = win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode') - except: - pass + global __cuGraphAddEventRecordNode + __cuGraphAddEventRecordNode = windll.GetProcAddress(handle, 'cuGraphAddEventRecordNode') {{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}} - try: - global __cuGraphEventRecordNodeGetEvent - __cuGraphEventRecordNodeGetEvent = win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent') - except: - pass + global __cuGraphEventRecordNodeGetEvent + __cuGraphEventRecordNodeGetEvent = windll.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent') {{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}} - try: - global __cuGraphEventRecordNodeSetEvent - __cuGraphEventRecordNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent') - except: - pass + global __cuGraphEventRecordNodeSetEvent + __cuGraphEventRecordNodeSetEvent = windll.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent') {{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}} - try: - global __cuGraphAddEventWaitNode - __cuGraphAddEventWaitNode = win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode') - except: - pass + global __cuGraphAddEventWaitNode + __cuGraphAddEventWaitNode = windll.GetProcAddress(handle, 'cuGraphAddEventWaitNode') {{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}} - try: - global __cuGraphEventWaitNodeGetEvent - __cuGraphEventWaitNodeGetEvent = win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent') - except: - pass + global __cuGraphEventWaitNodeGetEvent + __cuGraphEventWaitNodeGetEvent = windll.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent') {{endif}} - {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} - try: - global __cuGraphEventWaitNodeSetEvent - __cuGraphEventWaitNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent') - except: - pass + {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} + global __cuGraphEventWaitNodeSetEvent + __cuGraphEventWaitNodeSetEvent = windll.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent') {{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}} - try: - global __cuGraphAddExternalSemaphoresSignalNode - __cuGraphAddExternalSemaphoresSignalNode = win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode') - except: - pass + global __cuGraphAddExternalSemaphoresSignalNode + __cuGraphAddExternalSemaphoresSignalNode = windll.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode') {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} - try: - global __cuGraphExternalSemaphoresSignalNodeGetParams - __cuGraphExternalSemaphoresSignalNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') - except: - pass + global __cuGraphExternalSemaphoresSignalNodeGetParams + __cuGraphExternalSemaphoresSignalNodeGetParams = windll.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} - try: - global __cuGraphExternalSemaphoresSignalNodeSetParams - __cuGraphExternalSemaphoresSignalNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') - except: - pass + global __cuGraphExternalSemaphoresSignalNodeSetParams + __cuGraphExternalSemaphoresSignalNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') {{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}} - try: - global __cuGraphAddExternalSemaphoresWaitNode - __cuGraphAddExternalSemaphoresWaitNode = win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode') - except: - pass + global __cuGraphAddExternalSemaphoresWaitNode + __cuGraphAddExternalSemaphoresWaitNode = windll.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode') {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} - try: - global __cuGraphExternalSemaphoresWaitNodeGetParams - __cuGraphExternalSemaphoresWaitNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') - except: - pass + global __cuGraphExternalSemaphoresWaitNodeGetParams + __cuGraphExternalSemaphoresWaitNodeGetParams = windll.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} - try: - global __cuGraphExternalSemaphoresWaitNodeSetParams - __cuGraphExternalSemaphoresWaitNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') - except: - pass + global __cuGraphExternalSemaphoresWaitNodeSetParams + __cuGraphExternalSemaphoresWaitNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') {{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}} - try: - global __cuGraphAddBatchMemOpNode - __cuGraphAddBatchMemOpNode = win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode') - except: - pass + global __cuGraphAddBatchMemOpNode + __cuGraphAddBatchMemOpNode = windll.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode') {{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}} - try: - global __cuGraphBatchMemOpNodeGetParams - __cuGraphBatchMemOpNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams') - except: - pass + global __cuGraphBatchMemOpNodeGetParams + __cuGraphBatchMemOpNodeGetParams = windll.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams') {{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}} - try: - global __cuGraphBatchMemOpNodeSetParams - __cuGraphBatchMemOpNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams') - except: - pass + global __cuGraphBatchMemOpNodeSetParams + __cuGraphBatchMemOpNodeSetParams = windll.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams') {{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}} - try: - global __cuGraphExecBatchMemOpNodeSetParams - __cuGraphExecBatchMemOpNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams') - except: - pass + global __cuGraphExecBatchMemOpNodeSetParams + __cuGraphExecBatchMemOpNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams') {{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}} - try: - global __cuGraphAddMemAllocNode - __cuGraphAddMemAllocNode = win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode') - except: - pass + global __cuGraphAddMemAllocNode + __cuGraphAddMemAllocNode = windll.GetProcAddress(handle, 'cuGraphAddMemAllocNode') {{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}} - try: - global __cuGraphMemAllocNodeGetParams - __cuGraphMemAllocNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams') - except: - pass + global __cuGraphMemAllocNodeGetParams + __cuGraphMemAllocNodeGetParams = windll.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams') {{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}} - try: - global __cuGraphAddMemFreeNode - __cuGraphAddMemFreeNode = win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode') - except: - pass + global __cuGraphAddMemFreeNode + __cuGraphAddMemFreeNode = windll.GetProcAddress(handle, 'cuGraphAddMemFreeNode') {{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}} - try: - global __cuGraphMemFreeNodeGetParams - __cuGraphMemFreeNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams') - except: - pass + global __cuGraphMemFreeNodeGetParams + __cuGraphMemFreeNodeGetParams = windll.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams') {{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}} - try: - global __cuDeviceGraphMemTrim - __cuDeviceGraphMemTrim = win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim') - except: - pass + global __cuDeviceGraphMemTrim + __cuDeviceGraphMemTrim = windll.GetProcAddress(handle, 'cuDeviceGraphMemTrim') {{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}} - try: - global __cuDeviceGetGraphMemAttribute - __cuDeviceGetGraphMemAttribute = win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute') - except: - pass + global __cuDeviceGetGraphMemAttribute + __cuDeviceGetGraphMemAttribute = windll.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute') {{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}} - try: - global __cuDeviceSetGraphMemAttribute - __cuDeviceSetGraphMemAttribute = win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute') - except: - pass + global __cuDeviceSetGraphMemAttribute + __cuDeviceSetGraphMemAttribute = windll.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute') {{endif}} {{if 'cuGraphClone' in found_functions}} - try: - global __cuGraphClone - __cuGraphClone = win32api.GetProcAddress(handle, 'cuGraphClone') - except: - pass + global __cuGraphClone + __cuGraphClone = windll.GetProcAddress(handle, 'cuGraphClone') {{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}} - try: - global __cuGraphNodeFindInClone - __cuGraphNodeFindInClone = win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone') - except: - pass + global __cuGraphNodeFindInClone + __cuGraphNodeFindInClone = windll.GetProcAddress(handle, 'cuGraphNodeFindInClone') {{endif}} {{if 'cuGraphNodeGetType' in found_functions}} - try: - global __cuGraphNodeGetType - __cuGraphNodeGetType = win32api.GetProcAddress(handle, 'cuGraphNodeGetType') - except: - pass + global __cuGraphNodeGetType + __cuGraphNodeGetType = windll.GetProcAddress(handle, 'cuGraphNodeGetType') {{endif}} {{if 'cuGraphGetNodes' in found_functions}} - try: - global __cuGraphGetNodes - __cuGraphGetNodes = win32api.GetProcAddress(handle, 'cuGraphGetNodes') - except: - pass + global __cuGraphGetNodes + __cuGraphGetNodes = windll.GetProcAddress(handle, 'cuGraphGetNodes') {{endif}} {{if 'cuGraphGetRootNodes' in found_functions}} - try: - global __cuGraphGetRootNodes - __cuGraphGetRootNodes = win32api.GetProcAddress(handle, 'cuGraphGetRootNodes') - except: - pass + global __cuGraphGetRootNodes + __cuGraphGetRootNodes = windll.GetProcAddress(handle, 'cuGraphGetRootNodes') {{endif}} {{if 'cuGraphGetEdges' in found_functions}} - try: - global __cuGraphGetEdges - __cuGraphGetEdges = win32api.GetProcAddress(handle, 'cuGraphGetEdges') - except: - pass + global __cuGraphGetEdges + __cuGraphGetEdges = windll.GetProcAddress(handle, 'cuGraphGetEdges') {{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}} - try: - global __cuGraphGetEdges_v2 - __cuGraphGetEdges_v2 = win32api.GetProcAddress(handle, 'cuGraphGetEdges_v2') - except: - pass + global __cuGraphGetEdges_v2 + __cuGraphGetEdges_v2 = windll.GetProcAddress(handle, 'cuGraphGetEdges_v2') {{endif}} {{if 'cuGraphNodeGetDependencies' in found_functions}} - try: - global __cuGraphNodeGetDependencies - __cuGraphNodeGetDependencies = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies') - except: - pass + global __cuGraphNodeGetDependencies + __cuGraphNodeGetDependencies = windll.GetProcAddress(handle, 'cuGraphNodeGetDependencies') {{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}} - try: - global __cuGraphNodeGetDependencies_v2 - __cuGraphNodeGetDependencies_v2 = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies_v2') - except: - pass + global __cuGraphNodeGetDependencies_v2 + __cuGraphNodeGetDependencies_v2 = windll.GetProcAddress(handle, 'cuGraphNodeGetDependencies_v2') {{endif}} {{if 'cuGraphNodeGetDependentNodes' in found_functions}} - try: - global __cuGraphNodeGetDependentNodes - __cuGraphNodeGetDependentNodes = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes') - except: - pass + global __cuGraphNodeGetDependentNodes + __cuGraphNodeGetDependentNodes = windll.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes') {{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}} - try: - global __cuGraphNodeGetDependentNodes_v2 - __cuGraphNodeGetDependentNodes_v2 = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes_v2') - except: - pass + global __cuGraphNodeGetDependentNodes_v2 + __cuGraphNodeGetDependentNodes_v2 = windll.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes_v2') {{endif}} {{if 'cuGraphAddDependencies' in found_functions}} - try: - global __cuGraphAddDependencies - __cuGraphAddDependencies = win32api.GetProcAddress(handle, 'cuGraphAddDependencies') - except: - pass + global __cuGraphAddDependencies + __cuGraphAddDependencies = windll.GetProcAddress(handle, 'cuGraphAddDependencies') {{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}} - try: - global __cuGraphAddDependencies_v2 - __cuGraphAddDependencies_v2 = win32api.GetProcAddress(handle, 'cuGraphAddDependencies_v2') - except: - pass + global __cuGraphAddDependencies_v2 + __cuGraphAddDependencies_v2 = windll.GetProcAddress(handle, 'cuGraphAddDependencies_v2') {{endif}} {{if 'cuGraphRemoveDependencies' in found_functions}} - try: - global __cuGraphRemoveDependencies - __cuGraphRemoveDependencies = win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies') - except: - pass + global __cuGraphRemoveDependencies + __cuGraphRemoveDependencies = windll.GetProcAddress(handle, 'cuGraphRemoveDependencies') {{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}} - try: - global __cuGraphRemoveDependencies_v2 - __cuGraphRemoveDependencies_v2 = win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies_v2') - except: - pass + global __cuGraphRemoveDependencies_v2 + __cuGraphRemoveDependencies_v2 = windll.GetProcAddress(handle, 'cuGraphRemoveDependencies_v2') {{endif}} {{if 'cuGraphDestroyNode' in found_functions}} - try: - global __cuGraphDestroyNode - __cuGraphDestroyNode = win32api.GetProcAddress(handle, 'cuGraphDestroyNode') - except: - pass + global __cuGraphDestroyNode + __cuGraphDestroyNode = windll.GetProcAddress(handle, 'cuGraphDestroyNode') {{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}} - try: - global __cuGraphInstantiateWithFlags - __cuGraphInstantiateWithFlags = win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags') - except: - pass + global __cuGraphInstantiateWithFlags + __cuGraphInstantiateWithFlags = windll.GetProcAddress(handle, 'cuGraphInstantiateWithFlags') {{endif}} {{if 'cuGraphExecGetFlags' in found_functions}} - try: - global __cuGraphExecGetFlags - __cuGraphExecGetFlags = win32api.GetProcAddress(handle, 'cuGraphExecGetFlags') - except: - pass + global __cuGraphExecGetFlags + __cuGraphExecGetFlags = windll.GetProcAddress(handle, 'cuGraphExecGetFlags') {{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}} - try: - global __cuGraphExecKernelNodeSetParams_v2 - __cuGraphExecKernelNodeSetParams_v2 = win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams_v2') - except: - pass + global __cuGraphExecKernelNodeSetParams_v2 + __cuGraphExecKernelNodeSetParams_v2 = windll.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams_v2') {{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}} - try: - global __cuGraphExecMemcpyNodeSetParams - __cuGraphExecMemcpyNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams') - except: - pass + global __cuGraphExecMemcpyNodeSetParams + __cuGraphExecMemcpyNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams') {{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}} - try: - global __cuGraphExecMemsetNodeSetParams - __cuGraphExecMemsetNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams') - except: - pass + global __cuGraphExecMemsetNodeSetParams + __cuGraphExecMemsetNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams') {{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}} - try: - global __cuGraphExecHostNodeSetParams - __cuGraphExecHostNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams') - except: - pass + global __cuGraphExecHostNodeSetParams + __cuGraphExecHostNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams') {{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}} - try: - global __cuGraphExecChildGraphNodeSetParams - __cuGraphExecChildGraphNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams') - except: - pass + global __cuGraphExecChildGraphNodeSetParams + __cuGraphExecChildGraphNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams') {{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}} - try: - global __cuGraphExecEventRecordNodeSetEvent - __cuGraphExecEventRecordNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent') - except: - pass + global __cuGraphExecEventRecordNodeSetEvent + __cuGraphExecEventRecordNodeSetEvent = windll.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent') {{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}} - try: - global __cuGraphExecEventWaitNodeSetEvent - __cuGraphExecEventWaitNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent') - except: - pass + global __cuGraphExecEventWaitNodeSetEvent + __cuGraphExecEventWaitNodeSetEvent = windll.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent') {{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} - try: - global __cuGraphExecExternalSemaphoresSignalNodeSetParams - __cuGraphExecExternalSemaphoresSignalNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') - except: - pass + global __cuGraphExecExternalSemaphoresSignalNodeSetParams + __cuGraphExecExternalSemaphoresSignalNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') {{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} - try: - global __cuGraphExecExternalSemaphoresWaitNodeSetParams - __cuGraphExecExternalSemaphoresWaitNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') - except: - pass + global __cuGraphExecExternalSemaphoresWaitNodeSetParams + __cuGraphExecExternalSemaphoresWaitNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') {{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}} - try: - global __cuGraphNodeSetEnabled - __cuGraphNodeSetEnabled = win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled') - except: - pass + global __cuGraphNodeSetEnabled + __cuGraphNodeSetEnabled = windll.GetProcAddress(handle, 'cuGraphNodeSetEnabled') {{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}} - try: - global __cuGraphNodeGetEnabled - __cuGraphNodeGetEnabled = win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled') - except: - pass + global __cuGraphNodeGetEnabled + __cuGraphNodeGetEnabled = windll.GetProcAddress(handle, 'cuGraphNodeGetEnabled') {{endif}} {{if 'cuGraphExecDestroy' in found_functions}} - try: - global __cuGraphExecDestroy - __cuGraphExecDestroy = win32api.GetProcAddress(handle, 'cuGraphExecDestroy') - except: - pass + global __cuGraphExecDestroy + __cuGraphExecDestroy = windll.GetProcAddress(handle, 'cuGraphExecDestroy') {{endif}} {{if 'cuGraphDestroy' in found_functions}} - try: - global __cuGraphDestroy - __cuGraphDestroy = win32api.GetProcAddress(handle, 'cuGraphDestroy') - except: - pass + global __cuGraphDestroy + __cuGraphDestroy = windll.GetProcAddress(handle, 'cuGraphDestroy') {{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}} - try: - global __cuGraphExecUpdate_v2 - __cuGraphExecUpdate_v2 = win32api.GetProcAddress(handle, 'cuGraphExecUpdate_v2') - except: - pass + global __cuGraphExecUpdate_v2 + __cuGraphExecUpdate_v2 = windll.GetProcAddress(handle, 'cuGraphExecUpdate_v2') {{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}} - try: - global __cuGraphKernelNodeCopyAttributes - __cuGraphKernelNodeCopyAttributes = win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes') - except: - pass + global __cuGraphKernelNodeCopyAttributes + __cuGraphKernelNodeCopyAttributes = windll.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes') {{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}} - try: - global __cuGraphKernelNodeGetAttribute - __cuGraphKernelNodeGetAttribute = win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute') - except: - pass + global __cuGraphKernelNodeGetAttribute + __cuGraphKernelNodeGetAttribute = windll.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute') {{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}} - try: - global __cuGraphKernelNodeSetAttribute - __cuGraphKernelNodeSetAttribute = win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute') - except: - pass + global __cuGraphKernelNodeSetAttribute + __cuGraphKernelNodeSetAttribute = windll.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute') {{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}} - try: - global __cuGraphDebugDotPrint - __cuGraphDebugDotPrint = win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint') - except: - pass + global __cuGraphDebugDotPrint + __cuGraphDebugDotPrint = windll.GetProcAddress(handle, 'cuGraphDebugDotPrint') {{endif}} {{if 'cuUserObjectCreate' in found_functions}} - try: - global __cuUserObjectCreate - __cuUserObjectCreate = win32api.GetProcAddress(handle, 'cuUserObjectCreate') - except: - pass + global __cuUserObjectCreate + __cuUserObjectCreate = windll.GetProcAddress(handle, 'cuUserObjectCreate') {{endif}} {{if 'cuUserObjectRetain' in found_functions}} - try: - global __cuUserObjectRetain - __cuUserObjectRetain = win32api.GetProcAddress(handle, 'cuUserObjectRetain') - except: - pass + global __cuUserObjectRetain + __cuUserObjectRetain = windll.GetProcAddress(handle, 'cuUserObjectRetain') {{endif}} {{if 'cuUserObjectRelease' in found_functions}} - try: - global __cuUserObjectRelease - __cuUserObjectRelease = win32api.GetProcAddress(handle, 'cuUserObjectRelease') - except: - pass + global __cuUserObjectRelease + __cuUserObjectRelease = windll.GetProcAddress(handle, 'cuUserObjectRelease') {{endif}} {{if 'cuGraphRetainUserObject' in found_functions}} - try: - global __cuGraphRetainUserObject - __cuGraphRetainUserObject = win32api.GetProcAddress(handle, 'cuGraphRetainUserObject') - except: - pass + global __cuGraphRetainUserObject + __cuGraphRetainUserObject = windll.GetProcAddress(handle, 'cuGraphRetainUserObject') {{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}} - try: - global __cuGraphReleaseUserObject - __cuGraphReleaseUserObject = win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject') - except: - pass + global __cuGraphReleaseUserObject + __cuGraphReleaseUserObject = windll.GetProcAddress(handle, 'cuGraphReleaseUserObject') {{endif}} {{if 'cuGraphAddNode' in found_functions}} - try: - global __cuGraphAddNode - __cuGraphAddNode = win32api.GetProcAddress(handle, 'cuGraphAddNode') - except: - pass + global __cuGraphAddNode + __cuGraphAddNode = windll.GetProcAddress(handle, 'cuGraphAddNode') {{endif}} {{if 'cuGraphAddNode_v2' in found_functions}} - try: - global __cuGraphAddNode_v2 - __cuGraphAddNode_v2 = win32api.GetProcAddress(handle, 'cuGraphAddNode_v2') - except: - pass + global __cuGraphAddNode_v2 + __cuGraphAddNode_v2 = windll.GetProcAddress(handle, 'cuGraphAddNode_v2') {{endif}} {{if 'cuGraphNodeSetParams' in found_functions}} - try: - global __cuGraphNodeSetParams - __cuGraphNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphNodeSetParams') - except: - pass + global __cuGraphNodeSetParams + __cuGraphNodeSetParams = windll.GetProcAddress(handle, 'cuGraphNodeSetParams') {{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}} - try: - global __cuGraphExecNodeSetParams - __cuGraphExecNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecNodeSetParams') - except: - pass + global __cuGraphExecNodeSetParams + __cuGraphExecNodeSetParams = windll.GetProcAddress(handle, 'cuGraphExecNodeSetParams') {{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}} - try: - global __cuGraphConditionalHandleCreate - __cuGraphConditionalHandleCreate = win32api.GetProcAddress(handle, 'cuGraphConditionalHandleCreate') - except: - pass + global __cuGraphConditionalHandleCreate + __cuGraphConditionalHandleCreate = windll.GetProcAddress(handle, 'cuGraphConditionalHandleCreate') {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} - try: - global __cuOccupancyMaxActiveBlocksPerMultiprocessor - __cuOccupancyMaxActiveBlocksPerMultiprocessor = win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') - except: - pass + global __cuOccupancyMaxActiveBlocksPerMultiprocessor + __cuOccupancyMaxActiveBlocksPerMultiprocessor = windll.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} - try: - global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags - __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') - except: - pass + global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = windll.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') {{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}} - try: - global __cuOccupancyMaxPotentialBlockSize - __cuOccupancyMaxPotentialBlockSize = win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize') - except: - pass + global __cuOccupancyMaxPotentialBlockSize + __cuOccupancyMaxPotentialBlockSize = windll.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize') {{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}} - try: - global __cuOccupancyMaxPotentialBlockSizeWithFlags - __cuOccupancyMaxPotentialBlockSizeWithFlags = win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') - except: - pass + global __cuOccupancyMaxPotentialBlockSizeWithFlags + __cuOccupancyMaxPotentialBlockSizeWithFlags = windll.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') {{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}} - try: - global __cuOccupancyAvailableDynamicSMemPerBlock - __cuOccupancyAvailableDynamicSMemPerBlock = win32api.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') - except: - pass + global __cuOccupancyAvailableDynamicSMemPerBlock + __cuOccupancyAvailableDynamicSMemPerBlock = windll.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') {{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}} - try: - global __cuOccupancyMaxPotentialClusterSize - __cuOccupancyMaxPotentialClusterSize = win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize') - except: - pass + global __cuOccupancyMaxPotentialClusterSize + __cuOccupancyMaxPotentialClusterSize = windll.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize') {{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}} - try: - global __cuOccupancyMaxActiveClusters - __cuOccupancyMaxActiveClusters = win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters') - except: - pass + global __cuOccupancyMaxActiveClusters + __cuOccupancyMaxActiveClusters = windll.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters') {{endif}} {{if 'cuTexRefSetArray' in found_functions}} - try: - global __cuTexRefSetArray - __cuTexRefSetArray = win32api.GetProcAddress(handle, 'cuTexRefSetArray') - except: - pass + global __cuTexRefSetArray + __cuTexRefSetArray = windll.GetProcAddress(handle, 'cuTexRefSetArray') {{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}} - try: - global __cuTexRefSetMipmappedArray - __cuTexRefSetMipmappedArray = win32api.GetProcAddress(handle, 'cuTexRefSetMipmappedArray') - except: - pass + global __cuTexRefSetMipmappedArray + __cuTexRefSetMipmappedArray = windll.GetProcAddress(handle, 'cuTexRefSetMipmappedArray') {{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}} - try: - global __cuTexRefSetAddress_v2 - __cuTexRefSetAddress_v2 = win32api.GetProcAddress(handle, 'cuTexRefSetAddress_v2') - except: - pass + global __cuTexRefSetAddress_v2 + __cuTexRefSetAddress_v2 = windll.GetProcAddress(handle, 'cuTexRefSetAddress_v2') {{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}} - try: - global __cuTexRefSetAddress2D_v3 - __cuTexRefSetAddress2D_v3 = win32api.GetProcAddress(handle, 'cuTexRefSetAddress2D_v3') - except: - pass + global __cuTexRefSetAddress2D_v3 + __cuTexRefSetAddress2D_v3 = windll.GetProcAddress(handle, 'cuTexRefSetAddress2D_v3') {{endif}} {{if 'cuTexRefSetFormat' in found_functions}} - try: - global __cuTexRefSetFormat - __cuTexRefSetFormat = win32api.GetProcAddress(handle, 'cuTexRefSetFormat') - except: - pass + global __cuTexRefSetFormat + __cuTexRefSetFormat = windll.GetProcAddress(handle, 'cuTexRefSetFormat') {{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}} - try: - global __cuTexRefSetAddressMode - __cuTexRefSetAddressMode = win32api.GetProcAddress(handle, 'cuTexRefSetAddressMode') - except: - pass + global __cuTexRefSetAddressMode + __cuTexRefSetAddressMode = windll.GetProcAddress(handle, 'cuTexRefSetAddressMode') {{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}} - try: - global __cuTexRefSetFilterMode - __cuTexRefSetFilterMode = win32api.GetProcAddress(handle, 'cuTexRefSetFilterMode') - except: - pass + global __cuTexRefSetFilterMode + __cuTexRefSetFilterMode = windll.GetProcAddress(handle, 'cuTexRefSetFilterMode') {{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}} - try: - global __cuTexRefSetMipmapFilterMode - __cuTexRefSetMipmapFilterMode = win32api.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode') - except: - pass + global __cuTexRefSetMipmapFilterMode + __cuTexRefSetMipmapFilterMode = windll.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode') {{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}} - try: - global __cuTexRefSetMipmapLevelBias - __cuTexRefSetMipmapLevelBias = win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias') - except: - pass + global __cuTexRefSetMipmapLevelBias + __cuTexRefSetMipmapLevelBias = windll.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias') {{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}} - try: - global __cuTexRefSetMipmapLevelClamp - __cuTexRefSetMipmapLevelClamp = win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp') - except: - pass + global __cuTexRefSetMipmapLevelClamp + __cuTexRefSetMipmapLevelClamp = windll.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp') {{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}} - try: - global __cuTexRefSetMaxAnisotropy - __cuTexRefSetMaxAnisotropy = win32api.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy') - except: - pass + global __cuTexRefSetMaxAnisotropy + __cuTexRefSetMaxAnisotropy = windll.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy') {{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}} - try: - global __cuTexRefSetBorderColor - __cuTexRefSetBorderColor = win32api.GetProcAddress(handle, 'cuTexRefSetBorderColor') - except: - pass + global __cuTexRefSetBorderColor + __cuTexRefSetBorderColor = windll.GetProcAddress(handle, 'cuTexRefSetBorderColor') {{endif}} {{if 'cuTexRefSetFlags' in found_functions}} - try: - global __cuTexRefSetFlags - __cuTexRefSetFlags = win32api.GetProcAddress(handle, 'cuTexRefSetFlags') - except: - pass + global __cuTexRefSetFlags + __cuTexRefSetFlags = windll.GetProcAddress(handle, 'cuTexRefSetFlags') {{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}} - try: - global __cuTexRefGetAddress_v2 - __cuTexRefGetAddress_v2 = win32api.GetProcAddress(handle, 'cuTexRefGetAddress_v2') - except: - pass + global __cuTexRefGetAddress_v2 + __cuTexRefGetAddress_v2 = windll.GetProcAddress(handle, 'cuTexRefGetAddress_v2') {{endif}} {{if 'cuTexRefGetArray' in found_functions}} - try: - global __cuTexRefGetArray - __cuTexRefGetArray = win32api.GetProcAddress(handle, 'cuTexRefGetArray') - except: - pass + global __cuTexRefGetArray + __cuTexRefGetArray = windll.GetProcAddress(handle, 'cuTexRefGetArray') {{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}} - try: - global __cuTexRefGetMipmappedArray - __cuTexRefGetMipmappedArray = win32api.GetProcAddress(handle, 'cuTexRefGetMipmappedArray') - except: - pass + global __cuTexRefGetMipmappedArray + __cuTexRefGetMipmappedArray = windll.GetProcAddress(handle, 'cuTexRefGetMipmappedArray') {{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}} - try: - global __cuTexRefGetAddressMode - __cuTexRefGetAddressMode = win32api.GetProcAddress(handle, 'cuTexRefGetAddressMode') - except: - pass + global __cuTexRefGetAddressMode + __cuTexRefGetAddressMode = windll.GetProcAddress(handle, 'cuTexRefGetAddressMode') {{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}} - try: - global __cuTexRefGetFilterMode - __cuTexRefGetFilterMode = win32api.GetProcAddress(handle, 'cuTexRefGetFilterMode') - except: - pass + global __cuTexRefGetFilterMode + __cuTexRefGetFilterMode = windll.GetProcAddress(handle, 'cuTexRefGetFilterMode') {{endif}} {{if 'cuTexRefGetFormat' in found_functions}} - try: - global __cuTexRefGetFormat - __cuTexRefGetFormat = win32api.GetProcAddress(handle, 'cuTexRefGetFormat') - except: - pass + global __cuTexRefGetFormat + __cuTexRefGetFormat = windll.GetProcAddress(handle, 'cuTexRefGetFormat') {{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}} - try: - global __cuTexRefGetMipmapFilterMode - __cuTexRefGetMipmapFilterMode = win32api.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode') - except: - pass + global __cuTexRefGetMipmapFilterMode + __cuTexRefGetMipmapFilterMode = windll.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode') {{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}} - try: - global __cuTexRefGetMipmapLevelBias - __cuTexRefGetMipmapLevelBias = win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias') - except: - pass + global __cuTexRefGetMipmapLevelBias + __cuTexRefGetMipmapLevelBias = windll.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias') {{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}} - try: - global __cuTexRefGetMipmapLevelClamp - __cuTexRefGetMipmapLevelClamp = win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp') - except: - pass + global __cuTexRefGetMipmapLevelClamp + __cuTexRefGetMipmapLevelClamp = windll.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp') {{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}} - try: - global __cuTexRefGetMaxAnisotropy - __cuTexRefGetMaxAnisotropy = win32api.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy') - except: - pass + global __cuTexRefGetMaxAnisotropy + __cuTexRefGetMaxAnisotropy = windll.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy') {{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}} - try: - global __cuTexRefGetBorderColor - __cuTexRefGetBorderColor = win32api.GetProcAddress(handle, 'cuTexRefGetBorderColor') - except: - pass + global __cuTexRefGetBorderColor + __cuTexRefGetBorderColor = windll.GetProcAddress(handle, 'cuTexRefGetBorderColor') {{endif}} {{if 'cuTexRefGetFlags' in found_functions}} - try: - global __cuTexRefGetFlags - __cuTexRefGetFlags = win32api.GetProcAddress(handle, 'cuTexRefGetFlags') - except: - pass + global __cuTexRefGetFlags + __cuTexRefGetFlags = windll.GetProcAddress(handle, 'cuTexRefGetFlags') {{endif}} {{if 'cuTexRefCreate' in found_functions}} - try: - global __cuTexRefCreate - __cuTexRefCreate = win32api.GetProcAddress(handle, 'cuTexRefCreate') - except: - pass + global __cuTexRefCreate + __cuTexRefCreate = windll.GetProcAddress(handle, 'cuTexRefCreate') {{endif}} {{if 'cuTexRefDestroy' in found_functions}} - try: - global __cuTexRefDestroy - __cuTexRefDestroy = win32api.GetProcAddress(handle, 'cuTexRefDestroy') - except: - pass + global __cuTexRefDestroy + __cuTexRefDestroy = windll.GetProcAddress(handle, 'cuTexRefDestroy') {{endif}} {{if 'cuSurfRefSetArray' in found_functions}} - try: - global __cuSurfRefSetArray - __cuSurfRefSetArray = win32api.GetProcAddress(handle, 'cuSurfRefSetArray') - except: - pass + global __cuSurfRefSetArray + __cuSurfRefSetArray = windll.GetProcAddress(handle, 'cuSurfRefSetArray') {{endif}} {{if 'cuSurfRefGetArray' in found_functions}} - try: - global __cuSurfRefGetArray - __cuSurfRefGetArray = win32api.GetProcAddress(handle, 'cuSurfRefGetArray') - except: - pass + global __cuSurfRefGetArray + __cuSurfRefGetArray = windll.GetProcAddress(handle, 'cuSurfRefGetArray') {{endif}} {{if 'cuTexObjectCreate' in found_functions}} - try: - global __cuTexObjectCreate - __cuTexObjectCreate = win32api.GetProcAddress(handle, 'cuTexObjectCreate') - except: - pass + global __cuTexObjectCreate + __cuTexObjectCreate = windll.GetProcAddress(handle, 'cuTexObjectCreate') {{endif}} {{if 'cuTexObjectDestroy' in found_functions}} - try: - global __cuTexObjectDestroy - __cuTexObjectDestroy = win32api.GetProcAddress(handle, 'cuTexObjectDestroy') - except: - pass + global __cuTexObjectDestroy + __cuTexObjectDestroy = windll.GetProcAddress(handle, 'cuTexObjectDestroy') {{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}} - try: - global __cuTexObjectGetResourceDesc - __cuTexObjectGetResourceDesc = win32api.GetProcAddress(handle, 'cuTexObjectGetResourceDesc') - except: - pass + global __cuTexObjectGetResourceDesc + __cuTexObjectGetResourceDesc = windll.GetProcAddress(handle, 'cuTexObjectGetResourceDesc') {{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}} - try: - global __cuTexObjectGetTextureDesc - __cuTexObjectGetTextureDesc = win32api.GetProcAddress(handle, 'cuTexObjectGetTextureDesc') - except: - pass + global __cuTexObjectGetTextureDesc + __cuTexObjectGetTextureDesc = windll.GetProcAddress(handle, 'cuTexObjectGetTextureDesc') {{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}} - try: - global __cuTexObjectGetResourceViewDesc - __cuTexObjectGetResourceViewDesc = win32api.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc') - except: - pass + global __cuTexObjectGetResourceViewDesc + __cuTexObjectGetResourceViewDesc = windll.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc') {{endif}} {{if 'cuSurfObjectCreate' in found_functions}} - try: - global __cuSurfObjectCreate - __cuSurfObjectCreate = win32api.GetProcAddress(handle, 'cuSurfObjectCreate') - except: - pass + global __cuSurfObjectCreate + __cuSurfObjectCreate = windll.GetProcAddress(handle, 'cuSurfObjectCreate') {{endif}} {{if 'cuSurfObjectDestroy' in found_functions}} - try: - global __cuSurfObjectDestroy - __cuSurfObjectDestroy = win32api.GetProcAddress(handle, 'cuSurfObjectDestroy') - except: - pass + global __cuSurfObjectDestroy + __cuSurfObjectDestroy = windll.GetProcAddress(handle, 'cuSurfObjectDestroy') {{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}} - try: - global __cuSurfObjectGetResourceDesc - __cuSurfObjectGetResourceDesc = win32api.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc') - except: - pass + global __cuSurfObjectGetResourceDesc + __cuSurfObjectGetResourceDesc = windll.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc') {{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}} - try: - global __cuTensorMapEncodeTiled - __cuTensorMapEncodeTiled = win32api.GetProcAddress(handle, 'cuTensorMapEncodeTiled') - except: - pass + global __cuTensorMapEncodeTiled + __cuTensorMapEncodeTiled = windll.GetProcAddress(handle, 'cuTensorMapEncodeTiled') {{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}} - try: - global __cuTensorMapEncodeIm2col - __cuTensorMapEncodeIm2col = win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2col') - except: - pass + global __cuTensorMapEncodeIm2col + __cuTensorMapEncodeIm2col = windll.GetProcAddress(handle, 'cuTensorMapEncodeIm2col') {{endif}} {{if 'cuTensorMapEncodeIm2colWide' in found_functions}} - try: - global __cuTensorMapEncodeIm2colWide - __cuTensorMapEncodeIm2colWide = win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2colWide') - except: - pass + global __cuTensorMapEncodeIm2colWide + __cuTensorMapEncodeIm2colWide = windll.GetProcAddress(handle, 'cuTensorMapEncodeIm2colWide') {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} - try: - global __cuTensorMapReplaceAddress - __cuTensorMapReplaceAddress = win32api.GetProcAddress(handle, 'cuTensorMapReplaceAddress') - except: - pass + global __cuTensorMapReplaceAddress + __cuTensorMapReplaceAddress = windll.GetProcAddress(handle, 'cuTensorMapReplaceAddress') {{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}} - try: - global __cuDeviceCanAccessPeer - __cuDeviceCanAccessPeer = win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer') - except: - pass + global __cuDeviceCanAccessPeer + __cuDeviceCanAccessPeer = windll.GetProcAddress(handle, 'cuDeviceCanAccessPeer') {{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}} - try: - global __cuCtxEnablePeerAccess - __cuCtxEnablePeerAccess = win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess') - except: - pass + global __cuCtxEnablePeerAccess + __cuCtxEnablePeerAccess = windll.GetProcAddress(handle, 'cuCtxEnablePeerAccess') {{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}} - try: - global __cuCtxDisablePeerAccess - __cuCtxDisablePeerAccess = win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess') - except: - pass + global __cuCtxDisablePeerAccess + __cuCtxDisablePeerAccess = windll.GetProcAddress(handle, 'cuCtxDisablePeerAccess') {{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}} - try: - global __cuDeviceGetP2PAttribute - __cuDeviceGetP2PAttribute = win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute') - except: - pass + global __cuDeviceGetP2PAttribute + __cuDeviceGetP2PAttribute = windll.GetProcAddress(handle, 'cuDeviceGetP2PAttribute') {{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}} - try: - global __cuGraphicsUnregisterResource - __cuGraphicsUnregisterResource = win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource') - except: - pass + global __cuGraphicsUnregisterResource + __cuGraphicsUnregisterResource = windll.GetProcAddress(handle, 'cuGraphicsUnregisterResource') {{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}} - try: - global __cuGraphicsSubResourceGetMappedArray - __cuGraphicsSubResourceGetMappedArray = win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray') - except: - pass + global __cuGraphicsSubResourceGetMappedArray + __cuGraphicsSubResourceGetMappedArray = windll.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray') {{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}} - try: - global __cuGraphicsResourceGetMappedMipmappedArray - __cuGraphicsResourceGetMappedMipmappedArray = win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray') - except: - pass + global __cuGraphicsResourceGetMappedMipmappedArray + __cuGraphicsResourceGetMappedMipmappedArray = windll.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray') {{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}} - try: - global __cuGraphicsResourceGetMappedPointer_v2 - __cuGraphicsResourceGetMappedPointer_v2 = win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_v2') - except: - pass + global __cuGraphicsResourceGetMappedPointer_v2 + __cuGraphicsResourceGetMappedPointer_v2 = windll.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_v2') {{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}} - try: - global __cuGraphicsResourceSetMapFlags_v2 - __cuGraphicsResourceSetMapFlags_v2 = win32api.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_v2') - except: - pass + global __cuGraphicsResourceSetMapFlags_v2 + __cuGraphicsResourceSetMapFlags_v2 = windll.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_v2') {{endif}} {{if 'cuGetProcAddress_v2' in found_functions}} - try: - global __cuGetProcAddress_v2 - __cuGetProcAddress_v2 = win32api.GetProcAddress(handle, 'cuGetProcAddress_v2') - except: - pass + global __cuGetProcAddress_v2 + __cuGetProcAddress_v2 = windll.GetProcAddress(handle, 'cuGetProcAddress_v2') {{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}} - try: - global __cuCoredumpGetAttribute - __cuCoredumpGetAttribute = win32api.GetProcAddress(handle, 'cuCoredumpGetAttribute') - except: - pass + global __cuCoredumpGetAttribute + __cuCoredumpGetAttribute = windll.GetProcAddress(handle, 'cuCoredumpGetAttribute') {{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}} - try: - global __cuCoredumpGetAttributeGlobal - __cuCoredumpGetAttributeGlobal = win32api.GetProcAddress(handle, 'cuCoredumpGetAttributeGlobal') - except: - pass + global __cuCoredumpGetAttributeGlobal + __cuCoredumpGetAttributeGlobal = windll.GetProcAddress(handle, 'cuCoredumpGetAttributeGlobal') {{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}} - try: - global __cuCoredumpSetAttribute - __cuCoredumpSetAttribute = win32api.GetProcAddress(handle, 'cuCoredumpSetAttribute') - except: - pass + global __cuCoredumpSetAttribute + __cuCoredumpSetAttribute = windll.GetProcAddress(handle, 'cuCoredumpSetAttribute') {{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}} - try: - global __cuCoredumpSetAttributeGlobal - __cuCoredumpSetAttributeGlobal = win32api.GetProcAddress(handle, 'cuCoredumpSetAttributeGlobal') - except: - pass + global __cuCoredumpSetAttributeGlobal + __cuCoredumpSetAttributeGlobal = windll.GetProcAddress(handle, 'cuCoredumpSetAttributeGlobal') {{endif}} {{if 'cuGetExportTable' in found_functions}} - try: - global __cuGetExportTable - __cuGetExportTable = win32api.GetProcAddress(handle, 'cuGetExportTable') - except: - pass + global __cuGetExportTable + __cuGetExportTable = windll.GetProcAddress(handle, 'cuGetExportTable') {{endif}} {{if 'cuGreenCtxCreate' in found_functions}} - try: - global __cuGreenCtxCreate - __cuGreenCtxCreate = win32api.GetProcAddress(handle, 'cuGreenCtxCreate') - except: - pass + global __cuGreenCtxCreate + __cuGreenCtxCreate = windll.GetProcAddress(handle, 'cuGreenCtxCreate') {{endif}} {{if 'cuGreenCtxDestroy' in found_functions}} - try: - global __cuGreenCtxDestroy - __cuGreenCtxDestroy = win32api.GetProcAddress(handle, 'cuGreenCtxDestroy') - except: - pass + global __cuGreenCtxDestroy + __cuGreenCtxDestroy = windll.GetProcAddress(handle, 'cuGreenCtxDestroy') {{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}} - try: - global __cuCtxFromGreenCtx - __cuCtxFromGreenCtx = win32api.GetProcAddress(handle, 'cuCtxFromGreenCtx') - except: - pass + global __cuCtxFromGreenCtx + __cuCtxFromGreenCtx = windll.GetProcAddress(handle, 'cuCtxFromGreenCtx') {{endif}} {{if 'cuDeviceGetDevResource' in found_functions}} - try: - global __cuDeviceGetDevResource - __cuDeviceGetDevResource = win32api.GetProcAddress(handle, 'cuDeviceGetDevResource') - except: - pass + global __cuDeviceGetDevResource + __cuDeviceGetDevResource = windll.GetProcAddress(handle, 'cuDeviceGetDevResource') {{endif}} {{if 'cuCtxGetDevResource' in found_functions}} - try: - global __cuCtxGetDevResource - __cuCtxGetDevResource = win32api.GetProcAddress(handle, 'cuCtxGetDevResource') - except: - pass + global __cuCtxGetDevResource + __cuCtxGetDevResource = windll.GetProcAddress(handle, 'cuCtxGetDevResource') {{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}} - try: - global __cuGreenCtxGetDevResource - __cuGreenCtxGetDevResource = win32api.GetProcAddress(handle, 'cuGreenCtxGetDevResource') - except: - pass + global __cuGreenCtxGetDevResource + __cuGreenCtxGetDevResource = windll.GetProcAddress(handle, 'cuGreenCtxGetDevResource') {{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}} - try: - global __cuDevSmResourceSplitByCount - __cuDevSmResourceSplitByCount = win32api.GetProcAddress(handle, 'cuDevSmResourceSplitByCount') - except: - pass + global __cuDevSmResourceSplitByCount + __cuDevSmResourceSplitByCount = windll.GetProcAddress(handle, 'cuDevSmResourceSplitByCount') {{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}} - try: - global __cuDevResourceGenerateDesc - __cuDevResourceGenerateDesc = win32api.GetProcAddress(handle, 'cuDevResourceGenerateDesc') - except: - pass + global __cuDevResourceGenerateDesc + __cuDevResourceGenerateDesc = windll.GetProcAddress(handle, 'cuDevResourceGenerateDesc') {{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}} - try: - global __cuGreenCtxRecordEvent - __cuGreenCtxRecordEvent = win32api.GetProcAddress(handle, 'cuGreenCtxRecordEvent') - except: - pass + global __cuGreenCtxRecordEvent + __cuGreenCtxRecordEvent = windll.GetProcAddress(handle, 'cuGreenCtxRecordEvent') {{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}} - try: - global __cuGreenCtxWaitEvent - __cuGreenCtxWaitEvent = win32api.GetProcAddress(handle, 'cuGreenCtxWaitEvent') - except: - pass + global __cuGreenCtxWaitEvent + __cuGreenCtxWaitEvent = windll.GetProcAddress(handle, 'cuGreenCtxWaitEvent') {{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}} - try: - global __cuStreamGetGreenCtx - __cuStreamGetGreenCtx = win32api.GetProcAddress(handle, 'cuStreamGetGreenCtx') - except: - pass + global __cuStreamGetGreenCtx + __cuStreamGetGreenCtx = windll.GetProcAddress(handle, 'cuStreamGetGreenCtx') {{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}} - try: - global __cuGreenCtxStreamCreate - __cuGreenCtxStreamCreate = win32api.GetProcAddress(handle, 'cuGreenCtxStreamCreate') - except: - pass + global __cuGreenCtxStreamCreate + __cuGreenCtxStreamCreate = windll.GetProcAddress(handle, 'cuGreenCtxStreamCreate') {{endif}} {{if 'cuLogsRegisterCallback' in found_functions}} - try: - global __cuLogsRegisterCallback - __cuLogsRegisterCallback = win32api.GetProcAddress(handle, 'cuLogsRegisterCallback') - except: - pass + global __cuLogsRegisterCallback + __cuLogsRegisterCallback = windll.GetProcAddress(handle, 'cuLogsRegisterCallback') {{endif}} {{if 'cuLogsUnregisterCallback' in found_functions}} - try: - global __cuLogsUnregisterCallback - __cuLogsUnregisterCallback = win32api.GetProcAddress(handle, 'cuLogsUnregisterCallback') - except: - pass + global __cuLogsUnregisterCallback + __cuLogsUnregisterCallback = windll.GetProcAddress(handle, 'cuLogsUnregisterCallback') {{endif}} {{if 'cuLogsCurrent' in found_functions}} - try: - global __cuLogsCurrent - __cuLogsCurrent = win32api.GetProcAddress(handle, 'cuLogsCurrent') - except: - pass + global __cuLogsCurrent + __cuLogsCurrent = windll.GetProcAddress(handle, 'cuLogsCurrent') {{endif}} {{if 'cuLogsDumpToFile' in found_functions}} - try: - global __cuLogsDumpToFile - __cuLogsDumpToFile = win32api.GetProcAddress(handle, 'cuLogsDumpToFile') - except: - pass + global __cuLogsDumpToFile + __cuLogsDumpToFile = windll.GetProcAddress(handle, 'cuLogsDumpToFile') {{endif}} {{if 'cuLogsDumpToMemory' in found_functions}} - try: - global __cuLogsDumpToMemory - __cuLogsDumpToMemory = win32api.GetProcAddress(handle, 'cuLogsDumpToMemory') - except: - pass + global __cuLogsDumpToMemory + __cuLogsDumpToMemory = windll.GetProcAddress(handle, 'cuLogsDumpToMemory') {{endif}} {{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} - try: - global __cuCheckpointProcessGetRestoreThreadId - __cuCheckpointProcessGetRestoreThreadId = win32api.GetProcAddress(handle, 'cuCheckpointProcessGetRestoreThreadId') - except: - pass + global __cuCheckpointProcessGetRestoreThreadId + __cuCheckpointProcessGetRestoreThreadId = windll.GetProcAddress(handle, 'cuCheckpointProcessGetRestoreThreadId') {{endif}} {{if 'cuCheckpointProcessGetState' in found_functions}} - try: - global __cuCheckpointProcessGetState - __cuCheckpointProcessGetState = win32api.GetProcAddress(handle, 'cuCheckpointProcessGetState') - except: - pass + global __cuCheckpointProcessGetState + __cuCheckpointProcessGetState = windll.GetProcAddress(handle, 'cuCheckpointProcessGetState') {{endif}} {{if 'cuCheckpointProcessLock' in found_functions}} - try: - global __cuCheckpointProcessLock - __cuCheckpointProcessLock = win32api.GetProcAddress(handle, 'cuCheckpointProcessLock') - except: - pass + global __cuCheckpointProcessLock + __cuCheckpointProcessLock = windll.GetProcAddress(handle, 'cuCheckpointProcessLock') {{endif}} {{if 'cuCheckpointProcessCheckpoint' in found_functions}} - try: - global __cuCheckpointProcessCheckpoint - __cuCheckpointProcessCheckpoint = win32api.GetProcAddress(handle, 'cuCheckpointProcessCheckpoint') - except: - pass + global __cuCheckpointProcessCheckpoint + __cuCheckpointProcessCheckpoint = windll.GetProcAddress(handle, 'cuCheckpointProcessCheckpoint') {{endif}} {{if 'cuCheckpointProcessRestore' in found_functions}} - try: - global __cuCheckpointProcessRestore - __cuCheckpointProcessRestore = win32api.GetProcAddress(handle, 'cuCheckpointProcessRestore') - except: - pass + global __cuCheckpointProcessRestore + __cuCheckpointProcessRestore = windll.GetProcAddress(handle, 'cuCheckpointProcessRestore') {{endif}} {{if 'cuCheckpointProcessUnlock' in found_functions}} - try: - global __cuCheckpointProcessUnlock - __cuCheckpointProcessUnlock = win32api.GetProcAddress(handle, 'cuCheckpointProcessUnlock') - except: - pass + global __cuCheckpointProcessUnlock + __cuCheckpointProcessUnlock = windll.GetProcAddress(handle, 'cuCheckpointProcessUnlock') {{endif}} {{if 'cuProfilerStart' in found_functions}} - try: - global __cuProfilerStart - __cuProfilerStart = win32api.GetProcAddress(handle, 'cuProfilerStart') - except: - pass + global __cuProfilerStart + __cuProfilerStart = windll.GetProcAddress(handle, 'cuProfilerStart') {{endif}} {{if 'cuProfilerStop' in found_functions}} - try: - global __cuProfilerStop - __cuProfilerStop = win32api.GetProcAddress(handle, 'cuProfilerStop') - except: - pass + global __cuProfilerStop + __cuProfilerStop = windll.GetProcAddress(handle, 'cuProfilerStop') {{endif}} {{if True}} - try: - global __cuGraphicsEGLRegisterImage - __cuGraphicsEGLRegisterImage = win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage') - except: - pass + global __cuGraphicsEGLRegisterImage + __cuGraphicsEGLRegisterImage = windll.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage') {{endif}} {{if True}} - try: - global __cuEGLStreamConsumerConnect - __cuEGLStreamConsumerConnect = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect') - except: - pass + global __cuEGLStreamConsumerConnect + __cuEGLStreamConsumerConnect = windll.GetProcAddress(handle, 'cuEGLStreamConsumerConnect') {{endif}} {{if True}} - try: - global __cuEGLStreamConsumerConnectWithFlags - __cuEGLStreamConsumerConnectWithFlags = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags') - except: - pass + global __cuEGLStreamConsumerConnectWithFlags + __cuEGLStreamConsumerConnectWithFlags = windll.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags') {{endif}} {{if True}} - try: - global __cuEGLStreamConsumerDisconnect - __cuEGLStreamConsumerDisconnect = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect') - except: - pass + global __cuEGLStreamConsumerDisconnect + __cuEGLStreamConsumerDisconnect = windll.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect') {{endif}} {{if True}} - try: - global __cuEGLStreamConsumerAcquireFrame - __cuEGLStreamConsumerAcquireFrame = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame') - except: - pass + global __cuEGLStreamConsumerAcquireFrame + __cuEGLStreamConsumerAcquireFrame = windll.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame') {{endif}} {{if True}} - try: - global __cuEGLStreamConsumerReleaseFrame - __cuEGLStreamConsumerReleaseFrame = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame') - except: - pass + global __cuEGLStreamConsumerReleaseFrame + __cuEGLStreamConsumerReleaseFrame = windll.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame') {{endif}} {{if True}} - try: - global __cuEGLStreamProducerConnect - __cuEGLStreamProducerConnect = win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect') - except: - pass + global __cuEGLStreamProducerConnect + __cuEGLStreamProducerConnect = windll.GetProcAddress(handle, 'cuEGLStreamProducerConnect') {{endif}} {{if True}} - try: - global __cuEGLStreamProducerDisconnect - __cuEGLStreamProducerDisconnect = win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect') - except: - pass + global __cuEGLStreamProducerDisconnect + __cuEGLStreamProducerDisconnect = windll.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect') {{endif}} {{if True}} - try: - global __cuEGLStreamProducerPresentFrame - __cuEGLStreamProducerPresentFrame = win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame') - except: - pass + global __cuEGLStreamProducerPresentFrame + __cuEGLStreamProducerPresentFrame = windll.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame') {{endif}} {{if True}} - try: - global __cuEGLStreamProducerReturnFrame - __cuEGLStreamProducerReturnFrame = win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame') - except: - pass + global __cuEGLStreamProducerReturnFrame + __cuEGLStreamProducerReturnFrame = windll.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame') {{endif}} {{if True}} - try: - global __cuGraphicsResourceGetMappedEglFrame - __cuGraphicsResourceGetMappedEglFrame = win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame') - except: - pass + global __cuGraphicsResourceGetMappedEglFrame + __cuGraphicsResourceGetMappedEglFrame = windll.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame') {{endif}} {{if True}} - try: - global __cuEventCreateFromEGLSync - __cuEventCreateFromEGLSync = win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync') - except: - pass + global __cuEventCreateFromEGLSync + __cuEventCreateFromEGLSync = windll.GetProcAddress(handle, 'cuEventCreateFromEGLSync') {{endif}} {{if True}} - try: - global __cuGraphicsGLRegisterBuffer - __cuGraphicsGLRegisterBuffer = win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer') - except: - pass + global __cuGraphicsGLRegisterBuffer + __cuGraphicsGLRegisterBuffer = windll.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer') {{endif}} {{if True}} - try: - global __cuGraphicsGLRegisterImage - __cuGraphicsGLRegisterImage = win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage') - except: - pass + global __cuGraphicsGLRegisterImage + __cuGraphicsGLRegisterImage = windll.GetProcAddress(handle, 'cuGraphicsGLRegisterImage') {{endif}} {{if True}} - try: - global __cuGLGetDevices_v2 - __cuGLGetDevices_v2 = win32api.GetProcAddress(handle, 'cuGLGetDevices_v2') - except: - pass + global __cuGLGetDevices_v2 + __cuGLGetDevices_v2 = windll.GetProcAddress(handle, 'cuGLGetDevices_v2') {{endif}} {{if True}} - try: - global __cuVDPAUGetDevice - __cuVDPAUGetDevice = win32api.GetProcAddress(handle, 'cuVDPAUGetDevice') - except: - pass + global __cuVDPAUGetDevice + __cuVDPAUGetDevice = windll.GetProcAddress(handle, 'cuVDPAUGetDevice') {{endif}} {{if True}} - try: - global __cuVDPAUCtxCreate_v2 - __cuVDPAUCtxCreate_v2 = win32api.GetProcAddress(handle, 'cuVDPAUCtxCreate_v2') - except: - pass + global __cuVDPAUCtxCreate_v2 + __cuVDPAUCtxCreate_v2 = windll.GetProcAddress(handle, 'cuVDPAUCtxCreate_v2') {{endif}} {{if True}} - try: - global __cuGraphicsVDPAURegisterVideoSurface - __cuGraphicsVDPAURegisterVideoSurface = win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface') - except: - pass + global __cuGraphicsVDPAURegisterVideoSurface + __cuGraphicsVDPAURegisterVideoSurface = windll.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface') {{endif}} {{if True}} - try: - global __cuGraphicsVDPAURegisterOutputSurface - __cuGraphicsVDPAURegisterOutputSurface = win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface') - except: - pass + global __cuGraphicsVDPAURegisterOutputSurface + __cuGraphicsVDPAURegisterOutputSurface = windll.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface') {{endif}} {{else}} # Load using dlsym diff --git a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in index 17ee3951db..091ce52e99 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in @@ -4,13 +4,12 @@ # This code was automatically generated with version 12.9.0. Do not modify it directly. {{if 'Windows' == platform.system()}} import os -import win32api +cimport cuda.bindings._lib.windll as windll {{else}} cimport cuda.bindings._lib.dlfcn as dlfcn -from libc.stdint cimport uintptr_t {{endif}} from cuda.pathfinder import load_nvidia_dynamic_lib -from libc.stdint cimport intptr_t +from libc.stdint cimport intptr_t, uintptr_t import threading cdef object __symbol_lock = threading.Lock() @@ -52,186 +51,108 @@ cdef int _cuPythonInit() except -1 nogil: # Load function {{if 'nvrtcGetErrorString' in found_functions}} - try: - global __nvrtcGetErrorString - __nvrtcGetErrorString = win32api.GetProcAddress(handle, 'nvrtcGetErrorString') - except: - pass + global __nvrtcGetErrorString + __nvrtcGetErrorString = windll.GetProcAddress(handle, 'nvrtcGetErrorString') {{endif}} {{if 'nvrtcVersion' in found_functions}} - try: - global __nvrtcVersion - __nvrtcVersion = win32api.GetProcAddress(handle, 'nvrtcVersion') - except: - pass + global __nvrtcVersion + __nvrtcVersion = windll.GetProcAddress(handle, 'nvrtcVersion') {{endif}} {{if 'nvrtcGetNumSupportedArchs' in found_functions}} - try: - global __nvrtcGetNumSupportedArchs - __nvrtcGetNumSupportedArchs = win32api.GetProcAddress(handle, 'nvrtcGetNumSupportedArchs') - except: - pass + global __nvrtcGetNumSupportedArchs + __nvrtcGetNumSupportedArchs = windll.GetProcAddress(handle, 'nvrtcGetNumSupportedArchs') {{endif}} {{if 'nvrtcGetSupportedArchs' in found_functions}} - try: - global __nvrtcGetSupportedArchs - __nvrtcGetSupportedArchs = win32api.GetProcAddress(handle, 'nvrtcGetSupportedArchs') - except: - pass + global __nvrtcGetSupportedArchs + __nvrtcGetSupportedArchs = windll.GetProcAddress(handle, 'nvrtcGetSupportedArchs') {{endif}} {{if 'nvrtcCreateProgram' in found_functions}} - try: - global __nvrtcCreateProgram - __nvrtcCreateProgram = win32api.GetProcAddress(handle, 'nvrtcCreateProgram') - except: - pass + global __nvrtcCreateProgram + __nvrtcCreateProgram = windll.GetProcAddress(handle, 'nvrtcCreateProgram') {{endif}} {{if 'nvrtcDestroyProgram' in found_functions}} - try: - global __nvrtcDestroyProgram - __nvrtcDestroyProgram = win32api.GetProcAddress(handle, 'nvrtcDestroyProgram') - except: - pass + global __nvrtcDestroyProgram + __nvrtcDestroyProgram = windll.GetProcAddress(handle, 'nvrtcDestroyProgram') {{endif}} {{if 'nvrtcCompileProgram' in found_functions}} - try: - global __nvrtcCompileProgram - __nvrtcCompileProgram = win32api.GetProcAddress(handle, 'nvrtcCompileProgram') - except: - pass + global __nvrtcCompileProgram + __nvrtcCompileProgram = windll.GetProcAddress(handle, 'nvrtcCompileProgram') {{endif}} {{if 'nvrtcGetPTXSize' in found_functions}} - try: - global __nvrtcGetPTXSize - __nvrtcGetPTXSize = win32api.GetProcAddress(handle, 'nvrtcGetPTXSize') - except: - pass + global __nvrtcGetPTXSize + __nvrtcGetPTXSize = windll.GetProcAddress(handle, 'nvrtcGetPTXSize') {{endif}} {{if 'nvrtcGetPTX' in found_functions}} - try: - global __nvrtcGetPTX - __nvrtcGetPTX = win32api.GetProcAddress(handle, 'nvrtcGetPTX') - except: - pass + global __nvrtcGetPTX + __nvrtcGetPTX = windll.GetProcAddress(handle, 'nvrtcGetPTX') {{endif}} {{if 'nvrtcGetCUBINSize' in found_functions}} - try: - global __nvrtcGetCUBINSize - __nvrtcGetCUBINSize = win32api.GetProcAddress(handle, 'nvrtcGetCUBINSize') - except: - pass + global __nvrtcGetCUBINSize + __nvrtcGetCUBINSize = windll.GetProcAddress(handle, 'nvrtcGetCUBINSize') {{endif}} {{if 'nvrtcGetCUBIN' in found_functions}} - try: - global __nvrtcGetCUBIN - __nvrtcGetCUBIN = win32api.GetProcAddress(handle, 'nvrtcGetCUBIN') - except: - pass + global __nvrtcGetCUBIN + __nvrtcGetCUBIN = windll.GetProcAddress(handle, 'nvrtcGetCUBIN') {{endif}} {{if 'nvrtcGetNVVMSize' in found_functions}} - try: - global __nvrtcGetNVVMSize - __nvrtcGetNVVMSize = win32api.GetProcAddress(handle, 'nvrtcGetNVVMSize') - except: - pass + global __nvrtcGetNVVMSize + __nvrtcGetNVVMSize = windll.GetProcAddress(handle, 'nvrtcGetNVVMSize') {{endif}} {{if 'nvrtcGetNVVM' in found_functions}} - try: - global __nvrtcGetNVVM - __nvrtcGetNVVM = win32api.GetProcAddress(handle, 'nvrtcGetNVVM') - except: - pass + global __nvrtcGetNVVM + __nvrtcGetNVVM = windll.GetProcAddress(handle, 'nvrtcGetNVVM') {{endif}} {{if 'nvrtcGetLTOIRSize' in found_functions}} - try: - global __nvrtcGetLTOIRSize - __nvrtcGetLTOIRSize = win32api.GetProcAddress(handle, 'nvrtcGetLTOIRSize') - except: - pass + global __nvrtcGetLTOIRSize + __nvrtcGetLTOIRSize = windll.GetProcAddress(handle, 'nvrtcGetLTOIRSize') {{endif}} {{if 'nvrtcGetLTOIR' in found_functions}} - try: - global __nvrtcGetLTOIR - __nvrtcGetLTOIR = win32api.GetProcAddress(handle, 'nvrtcGetLTOIR') - except: - pass + global __nvrtcGetLTOIR + __nvrtcGetLTOIR = windll.GetProcAddress(handle, 'nvrtcGetLTOIR') {{endif}} {{if 'nvrtcGetOptiXIRSize' in found_functions}} - try: - global __nvrtcGetOptiXIRSize - __nvrtcGetOptiXIRSize = win32api.GetProcAddress(handle, 'nvrtcGetOptiXIRSize') - except: - pass + global __nvrtcGetOptiXIRSize + __nvrtcGetOptiXIRSize = windll.GetProcAddress(handle, 'nvrtcGetOptiXIRSize') {{endif}} {{if 'nvrtcGetOptiXIR' in found_functions}} - try: - global __nvrtcGetOptiXIR - __nvrtcGetOptiXIR = win32api.GetProcAddress(handle, 'nvrtcGetOptiXIR') - except: - pass + global __nvrtcGetOptiXIR + __nvrtcGetOptiXIR = windll.GetProcAddress(handle, 'nvrtcGetOptiXIR') {{endif}} {{if 'nvrtcGetProgramLogSize' in found_functions}} - try: - global __nvrtcGetProgramLogSize - __nvrtcGetProgramLogSize = win32api.GetProcAddress(handle, 'nvrtcGetProgramLogSize') - except: - pass + global __nvrtcGetProgramLogSize + __nvrtcGetProgramLogSize = windll.GetProcAddress(handle, 'nvrtcGetProgramLogSize') {{endif}} {{if 'nvrtcGetProgramLog' in found_functions}} - try: - global __nvrtcGetProgramLog - __nvrtcGetProgramLog = win32api.GetProcAddress(handle, 'nvrtcGetProgramLog') - except: - pass + global __nvrtcGetProgramLog + __nvrtcGetProgramLog = windll.GetProcAddress(handle, 'nvrtcGetProgramLog') {{endif}} {{if 'nvrtcAddNameExpression' in found_functions}} - try: - global __nvrtcAddNameExpression - __nvrtcAddNameExpression = win32api.GetProcAddress(handle, 'nvrtcAddNameExpression') - except: - pass + global __nvrtcAddNameExpression + __nvrtcAddNameExpression = windll.GetProcAddress(handle, 'nvrtcAddNameExpression') {{endif}} {{if 'nvrtcGetLoweredName' in found_functions}} - try: - global __nvrtcGetLoweredName - __nvrtcGetLoweredName = win32api.GetProcAddress(handle, 'nvrtcGetLoweredName') - except: - pass + global __nvrtcGetLoweredName + __nvrtcGetLoweredName = windll.GetProcAddress(handle, 'nvrtcGetLoweredName') {{endif}} {{if 'nvrtcGetPCHHeapSize' in found_functions}} - try: - global __nvrtcGetPCHHeapSize - __nvrtcGetPCHHeapSize = win32api.GetProcAddress(handle, 'nvrtcGetPCHHeapSize') - except: - pass + global __nvrtcGetPCHHeapSize + __nvrtcGetPCHHeapSize = windll.GetProcAddress(handle, 'nvrtcGetPCHHeapSize') {{endif}} {{if 'nvrtcSetPCHHeapSize' in found_functions}} - try: - global __nvrtcSetPCHHeapSize - __nvrtcSetPCHHeapSize = win32api.GetProcAddress(handle, 'nvrtcSetPCHHeapSize') - except: - pass + global __nvrtcSetPCHHeapSize + __nvrtcSetPCHHeapSize = windll.GetProcAddress(handle, 'nvrtcSetPCHHeapSize') {{endif}} {{if 'nvrtcGetPCHCreateStatus' in found_functions}} - try: - global __nvrtcGetPCHCreateStatus - __nvrtcGetPCHCreateStatus = win32api.GetProcAddress(handle, 'nvrtcGetPCHCreateStatus') - except: - pass + global __nvrtcGetPCHCreateStatus + __nvrtcGetPCHCreateStatus = windll.GetProcAddress(handle, 'nvrtcGetPCHCreateStatus') {{endif}} {{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} - try: - global __nvrtcGetPCHHeapSizeRequired - __nvrtcGetPCHHeapSizeRequired = win32api.GetProcAddress(handle, 'nvrtcGetPCHHeapSizeRequired') - except: - pass + global __nvrtcGetPCHHeapSizeRequired + __nvrtcGetPCHHeapSizeRequired = windll.GetProcAddress(handle, 'nvrtcGetPCHHeapSizeRequired') {{endif}} {{if 'nvrtcSetFlowCallback' in found_functions}} - try: - global __nvrtcSetFlowCallback - __nvrtcSetFlowCallback = win32api.GetProcAddress(handle, 'nvrtcSetFlowCallback') - except: - pass + global __nvrtcSetFlowCallback + __nvrtcSetFlowCallback = windll.GetProcAddress(handle, 'nvrtcSetFlowCallback') {{endif}} {{else}} diff --git a/cuda_bindings/cuda/bindings/_lib/windll.pxd b/cuda_bindings/cuda/bindings/_lib/windll.pxd new file mode 100644 index 0000000000..7b190f3595 --- /dev/null +++ b/cuda_bindings/cuda/bindings/_lib/windll.pxd @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +from libc.stddef cimport wchar_t +from libc.stdint cimport uintptr_t +from cpython cimport PyUnicode_AsWideCharString, PyMem_Free + +cdef extern from "windows.h" nogil: + ctypedef void* HMODULE + ctypedef void* HANDLE + ctypedef void* FARPROC + ctypedef unsigned long DWORD + ctypedef const wchar_t *LPCWSTR + ctypedef const char *LPCSTR + ctypedef int BOOL + + cdef DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 + + HMODULE _LoadLibraryExW "LoadLibraryExW"( + LPCWSTR lpLibFileName, + HANDLE hFile, + DWORD dwFlags + ) + + FARPROC _GetProcAddress "GetProcAddress"(HMODULE hModule, LPCSTR lpProcName) + + BOOL _FreeLibrary "FreeLibrary"(HMODULE hLibModule) + +cdef inline uintptr_t LoadLibraryExW(str path, HANDLE hFile, DWORD dwFlags): + cdef uintptr_t result + cdef wchar_t* wpath = PyUnicode_AsWideCharString(path, NULL) + with nogil: + result = _LoadLibraryExW( + wpath, + hFile, + dwFlags + ) + PyMem_Free(wpath) + return result + +cdef inline FARPROC GetProcAddress(uintptr_t hModule, const char* lpProcName) nogil: + return _GetProcAddress(hModule, lpProcName) + +cdef inline BOOL FreeLibrary(uintptr_t hLibModule) nogil: + return _FreeLibrary(hLibModule) diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index 90433e8feb..b0f640e397 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1873,35 +1873,46 @@ cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** r {{if True}} -{{if 'Windows' != platform.system()}} +from libc.stdint cimport uintptr_t +from cuda.pathfinder import load_nvidia_dynamic_lib +{{if 'Windows' == platform.system()}} +cimport cuda.bindings._lib.windll as windll +{{else}} cimport cuda.bindings._lib.dlfcn as dlfcn {{endif}} cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: - {{if 'Windows' == platform.system()}} - with gil: - raise NotImplementedError('"getLocalRuntimeVersion" is unsupported on Windows') - {{else}} + # Load - handle = dlfcn.dlopen('libcudart.so.12', dlfcn.RTLD_NOW) - if handle == NULL: - with gil: - raise RuntimeError(f'Failed to dlopen libcudart.so.12') + with gil: + loaded_dl = load_nvidia_dynamic_lib("cudart") + {{if 'Windows' == platform.system()}} + handle = loaded_dl._handle_uint + {{else}} + handle = loaded_dl._handle_uint + {{endif}} + {{if 'Windows' == platform.system()}} + __cudaRuntimeGetVersion = windll.GetProcAddress(handle, b'cudaRuntimeGetVersion') + {{else}} __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion') + {{endif}} if __cudaRuntimeGetVersion == NULL: with gil: - raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in libcudart.so.12') + raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}') # Call cdef cudaError_t err = cudaSuccess err = ( __cudaRuntimeGetVersion)(runtimeVersion) # Unload + {{if 'Windows' == platform.system()}} + windll.FreeLibrary(handle) + {{else}} dlfcn.dlclose(handle) + {{endif}} # Return return err - {{endif}} {{endif}} diff --git a/cuda_bindings/cuda/bindings/driver.pyx.in b/cuda_bindings/cuda/bindings/driver.pyx.in index 7b60e81a72..e102982bd6 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx.in +++ b/cuda_bindings/cuda/bindings/driver.pyx.in @@ -25092,7 +25092,7 @@ def cuCtxCreate_v4(ctxCreateParams : Optional[CUctxCreateParams], unsigned int f pdev = int(CUdevice(dev)) cydev = pdev cdef CUcontext pctx = CUcontext() - cdef cydriver.CUctxCreateParams* cyctxCreateParams_ptr = ctxCreateParams._pvt_ptr if ctxCreateParams is not None else NULL + cdef cydriver.CUctxCreateParams* cyctxCreateParams_ptr = ctxCreateParams._pvt_ptr if ctxCreateParams != None else NULL with nogil: err = cydriver.cuCtxCreate_v4(pctx._pvt_ptr, cyctxCreateParams_ptr, flags, cydev) if err != cydriver.CUDA_SUCCESS: @@ -30022,7 +30022,7 @@ def cuMemcpy2D(pCopy : Optional[CUDA_MEMCPY2D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` """ - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL with nogil: err = cydriver.cuMemcpy2D(cypCopy_ptr) return (_dict_CUresult[err],) @@ -30149,7 +30149,7 @@ def cuMemcpy2DUnaligned(pCopy : Optional[CUDA_MEMCPY2D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` """ - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL with nogil: err = cydriver.cuMemcpy2DUnaligned(cypCopy_ptr) return (_dict_CUresult[err],) @@ -30279,7 +30279,7 @@ def cuMemcpy3D(pCopy : Optional[CUDA_MEMCPY3D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy3D` """ - cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL with nogil: err = cydriver.cuMemcpy3D(cypCopy_ptr) return (_dict_CUresult[err],) @@ -30309,7 +30309,7 @@ def cuMemcpy3DPeer(pCopy : Optional[CUDA_MEMCPY3D_PEER]): -------- :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeer` """ - cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL with nogil: err = cydriver.cuMemcpy3DPeer(cypCopy_ptr) return (_dict_CUresult[err],) @@ -30873,7 +30873,7 @@ def cuMemcpy2DAsync(pCopy : Optional[CUDA_MEMCPY2D], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL with nogil: err = cydriver.cuMemcpy2DAsync(cypCopy_ptr, cyhStream) return (_dict_CUresult[err],) @@ -31013,7 +31013,7 @@ def cuMemcpy3DAsync(pCopy : Optional[CUDA_MEMCPY3D], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL with nogil: err = cydriver.cuMemcpy3DAsync(cypCopy_ptr, cyhStream) return (_dict_CUresult[err],) @@ -31053,7 +31053,7 @@ def cuMemcpy3DPeerAsync(pCopy : Optional[CUDA_MEMCPY3D_PEER], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL with nogil: err = cydriver.cuMemcpy3DPeerAsync(cypCopy_ptr, cyhStream) return (_dict_CUresult[err],) @@ -32031,7 +32031,7 @@ def cuArrayCreate(pAllocateArray : Optional[CUDA_ARRAY_DESCRIPTOR]): :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocArray` """ cdef CUarray pHandle = CUarray() - cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray != None else NULL with nogil: err = cydriver.cuArrayCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: @@ -32531,7 +32531,7 @@ def cuArray3DCreate(pAllocateArray : Optional[CUDA_ARRAY3D_DESCRIPTOR]): :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc3DArray` """ cdef CUarray pHandle = CUarray() - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray != None else NULL with nogil: err = cydriver.cuArray3DCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: @@ -32701,7 +32701,7 @@ def cuMipmappedArrayCreate(pMipmappedArrayDesc : Optional[CUDA_ARRAY3D_DESCRIPTO :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaMallocMipmappedArray` """ cdef CUmipmappedArray pHandle = CUmipmappedArray() - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypMipmappedArrayDesc_ptr = pMipmappedArrayDesc._pvt_ptr if pMipmappedArrayDesc is not None else NULL + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypMipmappedArrayDesc_ptr = pMipmappedArrayDesc._pvt_ptr if pMipmappedArrayDesc != None else NULL with nogil: err = cydriver.cuMipmappedArrayCreate(pHandle._pvt_ptr, cypMipmappedArrayDesc_ptr, numMipmapLevels) if err != cydriver.CUDA_SUCCESS: @@ -32945,7 +32945,7 @@ def cuMemBatchDecompressAsync(paramsArray : Optional[CUmemDecompressParams], siz else: pstream = int(CUstream(stream)) cystream = pstream - cdef cydriver.CUmemDecompressParams* cyparamsArray_ptr = paramsArray._pvt_ptr if paramsArray is not None else NULL + cdef cydriver.CUmemDecompressParams* cyparamsArray_ptr = paramsArray._pvt_ptr if paramsArray != None else NULL cdef size_t errorIndex = 0 with nogil: err = cydriver.cuMemBatchDecompressAsync(cyparamsArray_ptr, count, flags, &errorIndex, cystream) @@ -33124,7 +33124,7 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` """ cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() - cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL with nogil: err = cydriver.cuMemCreate(handle._pvt_ptr, size, cyprop_ptr, flags) if err != cydriver.CUDA_SUCCESS: @@ -33587,7 +33587,7 @@ def cuMemGetAccess(location : Optional[CUmemLocation], ptr): pptr = int(CUdeviceptr(ptr)) cyptr = pptr cdef unsigned long long flags = 0 - cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location != None else NULL with nogil: err = cydriver.cuMemGetAccess(&flags, cylocation_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: @@ -33735,7 +33735,7 @@ def cuMemGetAllocationGranularity(prop : Optional[CUmemAllocationProp], option n :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` """ cdef size_t granularity = 0 - cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL cdef cydriver.CUmemAllocationGranularity_flags cyoption = option.value with nogil: err = cydriver.cuMemGetAllocationGranularity(&granularity, cyprop_ptr, cyoption) @@ -34224,7 +34224,7 @@ def cuMemPoolGetAccess(memPool, location : Optional[CUmemLocation]): pmemPool = int(CUmemoryPool(memPool)) cymemPool = pmemPool cdef cydriver.CUmemAccess_flags flags - cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location != None else NULL with nogil: err = cydriver.cuMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) if err != cydriver.CUDA_SUCCESS: @@ -34299,7 +34299,7 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC. """ cdef CUmemoryPool pool = CUmemoryPool() - cdef cydriver.CUmemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps is not None else NULL + cdef cydriver.CUmemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps != None else NULL with nogil: err = cydriver.cuMemPoolCreate(pool._pvt_ptr, cypoolProps_ptr) if err != cydriver.CUDA_SUCCESS: @@ -34606,7 +34606,7 @@ def cuMemPoolImportPointer(pool, shareData : Optional[CUmemPoolPtrExportData]): ppool = int(CUmemoryPool(pool)) cypool = ppool cdef CUdeviceptr ptr_out = CUdeviceptr() - cdef cydriver.CUmemPoolPtrExportData* cyshareData_ptr = shareData._pvt_ptr if shareData is not None else NULL + cdef cydriver.CUmemPoolPtrExportData* cyshareData_ptr = shareData._pvt_ptr if shareData != None else NULL with nogil: err = cydriver.cuMemPoolImportPointer(ptr_out._pvt_ptr, cypool, cyshareData_ptr) if err != cydriver.CUDA_SUCCESS: @@ -34667,7 +34667,7 @@ def cuMulticastCreate(prop : Optional[CUmulticastObjectProp]): :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` """ cdef CUmemGenericAllocationHandle mcHandle = CUmemGenericAllocationHandle() - cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL with nogil: err = cydriver.cuMulticastCreate(mcHandle._pvt_ptr, cyprop_ptr) if err != cydriver.CUDA_SUCCESS: @@ -34976,7 +34976,7 @@ def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not :py:obj:`~.cuMulticastCreate`, :py:obj:`~.cuMulticastBindMem`, :py:obj:`~.cuMulticastBindAddr`, :py:obj:`~.cuMulticastUnbind` """ cdef size_t granularity = 0 - cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL cdef cydriver.CUmulticastGranularity_flags cyoption = option.value with nogil: err = cydriver.cuMulticastGetGranularity(&granularity, cyprop_ptr, cyoption) @@ -37887,7 +37887,7 @@ def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : Option phStream = int(CUstream(hStream)) cyhStream = phStream cdef cydriver.CUstreamAttrID cyattr = attr.value - cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL with nogil: err = cydriver.cuStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) return (_dict_CUresult[err],) @@ -38498,7 +38498,7 @@ def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_ and Cache Control" chapter from Vulkan specification. """ cdef CUexternalMemory extMem_out = CUexternalMemory() - cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc != None else NULL with nogil: err = cydriver.cuImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -38568,7 +38568,7 @@ def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[CUDA_EXTERNAL_ pextMem = int(CUexternalMemory(extMem)) cyextMem = pextMem cdef CUdeviceptr devPtr = CUdeviceptr() - cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc != None else NULL with nogil: err = cydriver.cuExternalMemoryGetMappedBuffer(devPtr._pvt_ptr, cyextMem, cybufferDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -38641,7 +38641,7 @@ def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[CUDA_E pextMem = int(CUexternalMemory(extMem)) cyextMem = pextMem cdef CUmipmappedArray mipmap = CUmipmappedArray() - cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc != None else NULL with nogil: err = cydriver.cuExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -38830,7 +38830,7 @@ def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_H :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` """ cdef CUexternalSemaphore extSem_out = CUexternalSemaphore() - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc != None else NULL with nogil: err = cydriver.cuImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -40368,7 +40368,7 @@ def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_pt else: pf = int(CUfunction(f)) cyf = pf - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config != None else NULL cykernelParams = _HelperKernelParams(kernelParams) cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: @@ -41475,7 +41475,7 @@ def cuGraphAddKernelNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddKernelNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -41566,7 +41566,7 @@ def cuGraphKernelNodeSetParams(hNode, nodeParams : Optional[CUDA_KERNEL_NODE_PAR else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -41653,7 +41653,7 @@ def cuGraphAddMemcpyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams != None else NULL with nogil: err = cydriver.cuGraphAddMemcpyNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cycopyParams_ptr, cyctx) if len(dependencies) > 1 and cydependencies is not NULL: @@ -41735,7 +41735,7 @@ def cuGraphMemcpyNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMCPY3D]): else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphMemcpyNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -41812,7 +41812,7 @@ def cuGraphAddMemsetNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams != None else NULL with nogil: err = cydriver.cuGraphAddMemsetNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cymemsetParams_ptr, cyctx) if len(dependencies) > 1 and cydependencies is not NULL: @@ -41894,7 +41894,7 @@ def cuGraphMemsetNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMSET_NODE_PAR else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphMemsetNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -41961,7 +41961,7 @@ def cuGraphAddHostNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddHostNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -42043,7 +42043,7 @@ def cuGraphHostNodeSetParams(hNode, nodeParams : Optional[CUDA_HOST_NODE_PARAMS] else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphHostNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -42636,7 +42636,7 @@ def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : Optional[tuple elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -42725,7 +42725,7 @@ def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[CU else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -42793,7 +42793,7 @@ def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : Optional[tuple[C elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -42882,7 +42882,7 @@ def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[CUDA else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -42953,7 +42953,7 @@ def cuGraphAddBatchMemOpNode(hGraph, dependencies : Optional[tuple[CUgraphNode] elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddBatchMemOpNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -43043,7 +43043,7 @@ def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : Optional[CUDA_BATCH_MEM_O else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphBatchMemOpNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -43114,7 +43114,7 @@ def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : Optional[ else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExecBatchMemOpNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -43222,7 +43222,7 @@ def cuGraphAddMemAllocNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddMemAllocNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -44889,7 +44889,7 @@ def cuGraphInstantiateWithParams(hGraph, instantiateParams : Optional[CUDA_GRAPH phGraph = int(CUgraph(hGraph)) cyhGraph = phGraph cdef CUgraphExec phGraphExec = CUgraphExec() - cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams is not None else NULL + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams != None else NULL with nogil: err = cydriver.cuGraphInstantiateWithParams(phGraphExec._pvt_ptr, cyhGraph, cyinstantiateParams_ptr) if err != cydriver.CUDA_SUCCESS: @@ -45015,7 +45015,7 @@ def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExecKernelNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -45090,7 +45090,7 @@ def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : Optional[CUDA else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams != None else NULL with nogil: err = cydriver.cuGraphExecMemcpyNodeSetParams(cyhGraphExec, cyhNode, cycopyParams_ptr, cyctx) return (_dict_CUresult[err],) @@ -45170,7 +45170,7 @@ def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : Optional[CU else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams != None else NULL with nogil: err = cydriver.cuGraphExecMemsetNodeSetParams(cyhGraphExec, cyhNode, cymemsetParams_ptr, cyctx) return (_dict_CUresult[err],) @@ -45225,7 +45225,7 @@ def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_H else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExecHostNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -45481,7 +45481,7 @@ def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePara else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -45541,7 +45541,7 @@ def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -46159,7 +46159,7 @@ def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, val phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef cydriver.CUkernelNodeAttrID cyattr = attr.value - cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) return (_dict_CUresult[err],) @@ -46531,7 +46531,7 @@ def cuGraphAddNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUg elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -46627,7 +46627,7 @@ def cuGraphAddNode_v2(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[ cydependencyData = (dependencyData[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphAddNode_v2(phGraphNode._pvt_ptr, cyhGraph, cydependencies, cydependencyData, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -46677,7 +46677,7 @@ def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -46737,7 +46737,7 @@ def cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUgraphNod else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cydriver.cuGraphExecNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_CUresult[err],) @@ -47200,7 +47200,7 @@ def cuOccupancyMaxPotentialClusterSize(func, config : Optional[CUlaunchConfig]): pfunc = int(CUfunction(func)) cyfunc = pfunc cdef int clusterSize = 0 - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config != None else NULL with nogil: err = cydriver.cuOccupancyMaxPotentialClusterSize(&clusterSize, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: @@ -47260,7 +47260,7 @@ def cuOccupancyMaxActiveClusters(func, config : Optional[CUlaunchConfig]): pfunc = int(CUfunction(func)) cyfunc = pfunc cdef int numClusters = 0 - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config != None else NULL with nogil: err = cydriver.cuOccupancyMaxActiveClusters(&numClusters, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: @@ -47524,7 +47524,7 @@ def cuTexRefSetAddress2D(hTexRef, desc : Optional[CUDA_ARRAY_DESCRIPTOR], dptr, else: phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef - cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc != None else NULL with nogil: err = cydriver.cuTexRefSetAddress2D(cyhTexRef, cydesc_ptr, cydptr, Pitch) return (_dict_CUresult[err],) @@ -48895,9 +48895,9 @@ def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Option :py:obj:`~.cuTexObjectDestroy`, :py:obj:`~.cudaCreateTextureObject` """ cdef CUtexObject pTexObject = CUtexObject() - cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL - cdef cydriver.CUDA_TEXTURE_DESC* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc is not None else NULL - cdef cydriver.CUDA_RESOURCE_VIEW_DESC* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc is not None else NULL + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL + cdef cydriver.CUDA_TEXTURE_DESC* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc != None else NULL + cdef cydriver.CUDA_RESOURCE_VIEW_DESC* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc != None else NULL with nogil: err = cydriver.cuTexObjectCreate(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -49099,7 +49099,7 @@ def cuSurfObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC]): :py:obj:`~.cuSurfObjectDestroy`, :py:obj:`~.cudaCreateSurfaceObject` """ cdef CUsurfObject pSurfObject = CUsurfObject() - cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL with nogil: err = cydriver.cuSurfObjectCreate(pSurfObject._pvt_ptr, cypResDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -50198,7 +50198,7 @@ def cuTensorMapReplaceAddress(tensorMap : Optional[CUtensorMap], globalAddress): -------- :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapEncodeIm2colWide` """ - cdef cydriver.CUtensorMap* cytensorMap_ptr = tensorMap._pvt_ptr if tensorMap is not None else NULL + cdef cydriver.CUtensorMap* cytensorMap_ptr = tensorMap._pvt_ptr if tensorMap != None else NULL cyglobalAddress = _HelperInputVoidPtr(globalAddress) cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr with nogil: @@ -51426,7 +51426,7 @@ def cuGetExportTable(pExportTableId : Optional[CUuuid]): None """ cdef void_ptr ppExportTable = 0 - cdef cydriver.CUuuid* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId is not None else NULL + cdef cydriver.CUuuid* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId != None else NULL with nogil: err = cydriver.cuGetExportTable(&ppExportTable, cypExportTableId_ptr) if err != cydriver.CUDA_SUCCESS: @@ -51836,7 +51836,7 @@ def cuDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[CUdevRe if cyresult is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(nbGroups) + 'x' + str(sizeof(cydriver.CUdevResource))) cdef unsigned int cynbGroups = nbGroups - cdef cydriver.CUdevResource* cyinput__ptr = input_._pvt_ptr if input_ is not None else NULL + cdef cydriver.CUdevResource* cyinput__ptr = input_._pvt_ptr if input_ != None else NULL cdef CUdevResource remaining = CUdevResource() with nogil: err = cydriver.cuDevSmResourceSplitByCount(cyresult, &cynbGroups, cyinput__ptr, remaining._pvt_ptr, useFlags, minCount) @@ -52470,7 +52470,7 @@ def cuCheckpointProcessLock(int pid, args : Optional[CUcheckpointLockArgs]): CUresult :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` :py:obj:`~.CUDA_ERROR_NOT_READY` """ - cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL with nogil: err = cydriver.cuCheckpointProcessLock(pid, cyargs_ptr) return (_dict_CUresult[err],) @@ -52501,7 +52501,7 @@ def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpoin CUresult :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` """ - cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL with nogil: err = cydriver.cuCheckpointProcessCheckpoint(pid, cyargs_ptr) return (_dict_CUresult[err],) @@ -52537,7 +52537,7 @@ def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs] -------- :py:obj:`~.cuInit` """ - cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL with nogil: err = cydriver.cuCheckpointProcessRestore(pid, cyargs_ptr) return (_dict_CUresult[err],) @@ -52566,7 +52566,7 @@ def cuCheckpointProcessUnlock(int pid, args : Optional[CUcheckpointUnlockArgs]): CUresult :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` """ - cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL with nogil: err = cydriver.cuCheckpointProcessUnlock(pid, cyargs_ptr) return (_dict_CUresult[err],) @@ -53185,7 +53185,7 @@ def cuEGLStreamProducerReturnFrame(conn, eglframe : Optional[CUeglFrame], pStrea cyconn = conn else: raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) - cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL + cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe != None else NULL with nogil: err = cydriver.cuEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) return (_dict_CUresult[err],) diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index b683631ac2..2a8d25b057 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -18271,7 +18271,7 @@ def cudaDeviceGetTexture1DLinearMaxWidth(fmtDesc : Optional[cudaChannelFormatDes :py:obj:`~.cuDeviceGetTexture1DLinearMaxWidth` """ cdef size_t maxWidthInElements = 0 - cdef cyruntime.cudaChannelFormatDesc* cyfmtDesc_ptr = fmtDesc._pvt_ptr if fmtDesc is not None else NULL + cdef cyruntime.cudaChannelFormatDesc* cyfmtDesc_ptr = fmtDesc._pvt_ptr if fmtDesc != None else NULL with nogil: err = cyruntime.cudaDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cyfmtDesc_ptr, device) if err != cyruntime.cudaSuccess: @@ -20201,7 +20201,7 @@ def cudaChooseDevice(prop : Optional[cudaDeviceProp]): :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaInitDevice` """ cdef int device = 0 - cdef cyruntime.cudaDeviceProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cyruntime.cudaDeviceProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL with nogil: err = cyruntime.cudaChooseDevice(&device, cyprop_ptr) if err != cyruntime.cudaSuccess: @@ -20942,7 +20942,7 @@ def cudaStreamSetAttribute(hStream, attr not None : cudaStreamAttrID, value : Op phStream = int(cudaStream_t(hStream)) cyhStream = phStream cdef cyruntime.cudaStreamAttrID cyattr = attr.value - cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL with nogil: err = cyruntime.cudaStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) return (_dict_cudaError_t[err],) @@ -22670,7 +22670,7 @@ def cudaImportExternalMemory(memHandleDesc : Optional[cudaExternalMemoryHandleDe and Cache Control" chapter from Vulkan specification. """ cdef cudaExternalMemory_t extMem_out = cudaExternalMemory_t() - cdef cyruntime.cudaExternalMemoryHandleDesc* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc is not None else NULL + cdef cyruntime.cudaExternalMemoryHandleDesc* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc != None else NULL with nogil: err = cyruntime.cudaImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) if err != cyruntime.cudaSuccess: @@ -22738,7 +22738,7 @@ def cudaExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[cudaExternal pextMem = int(cudaExternalMemory_t(extMem)) cyextMem = pextMem cdef void_ptr devPtr = 0 - cdef cyruntime.cudaExternalMemoryBufferDesc* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc is not None else NULL + cdef cyruntime.cudaExternalMemoryBufferDesc* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc != None else NULL with nogil: err = cyruntime.cudaExternalMemoryGetMappedBuffer(&devPtr, cyextMem, cybufferDesc_ptr) if err != cyruntime.cudaSuccess: @@ -22810,7 +22810,7 @@ def cudaExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[cuda pextMem = int(cudaExternalMemory_t(extMem)) cyextMem = pextMem cdef cudaMipmappedArray_t mipmap = cudaMipmappedArray_t() - cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc is not None else NULL + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc != None else NULL with nogil: err = cyruntime.cudaExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) if err != cyruntime.cudaSuccess: @@ -22997,7 +22997,7 @@ def cudaImportExternalSemaphore(semHandleDesc : Optional[cudaExternalSemaphoreHa :py:obj:`~.cudaDestroyExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` """ cdef cudaExternalSemaphore_t extSem_out = cudaExternalSemaphore_t() - cdef cyruntime.cudaExternalSemaphoreHandleDesc* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc is not None else NULL + cdef cyruntime.cudaExternalSemaphoreHandleDesc* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc != None else NULL with nogil: err = cyruntime.cudaImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) if err != cyruntime.cudaSuccess: @@ -24166,7 +24166,7 @@ def cudaMallocArray(desc : Optional[cudaChannelFormatDesc], size_t width, size_t :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuArrayCreate` """ cdef cudaArray_t array = cudaArray_t() - cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc != None else NULL with nogil: err = cyruntime.cudaMallocArray(array._pvt_ptr, cydesc_ptr, width, height, flags) if err != cyruntime.cudaSuccess: @@ -24825,7 +24825,7 @@ def cudaMalloc3DArray(desc : Optional[cudaChannelFormatDesc], extent not None : :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuArray3DCreate` """ cdef cudaArray_t array = cudaArray_t() - cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc != None else NULL with nogil: err = cyruntime.cudaMalloc3DArray(array._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], flags) if err != cyruntime.cudaSuccess: @@ -24951,7 +24951,7 @@ def cudaMallocMipmappedArray(desc : Optional[cudaChannelFormatDesc], extent not :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuMipmappedArrayCreate` """ cdef cudaMipmappedArray_t mipmappedArray = cudaMipmappedArray_t() - cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc != None else NULL with nogil: err = cyruntime.cudaMallocMipmappedArray(mipmappedArray._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], numLevels, flags) if err != cyruntime.cudaSuccess: @@ -25086,7 +25086,7 @@ def cudaMemcpy3D(p : Optional[cudaMemcpy3DParms]): -------- :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemcpy3DAsync`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.make_cudaPos`, :py:obj:`~.cuMemcpy3D` """ - cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p != None else NULL with nogil: err = cyruntime.cudaMemcpy3D(cyp_ptr) return (_dict_cudaError_t[err],) @@ -25123,7 +25123,7 @@ def cudaMemcpy3DPeer(p : Optional[cudaMemcpy3DPeerParms]): -------- :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyPeerAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cuMemcpy3DPeer` """ - cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p != None else NULL with nogil: err = cyruntime.cudaMemcpy3DPeer(cyp_ptr) return (_dict_cudaError_t[err],) @@ -25228,7 +25228,7 @@ def cudaMemcpy3DAsync(p : Optional[cudaMemcpy3DParms], stream): else: pstream = int(cudaStream_t(stream)) cystream = pstream - cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p != None else NULL with nogil: err = cyruntime.cudaMemcpy3DAsync(cyp_ptr, cystream) return (_dict_cudaError_t[err],) @@ -25268,7 +25268,7 @@ def cudaMemcpy3DPeerAsync(p : Optional[cudaMemcpy3DPeerParms], stream): else: pstream = int(cudaStream_t(stream)) cystream = pstream - cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p != None else NULL with nogil: err = cyruntime.cudaMemcpy3DPeerAsync(cyp_ptr, cystream) return (_dict_cudaError_t[err],) @@ -28553,7 +28553,7 @@ def cudaMemPoolGetAccess(memPool, location : Optional[cudaMemLocation]): pmemPool = int(cudaMemPool_t(memPool)) cymemPool = pmemPool cdef cyruntime.cudaMemAccessFlags flags - cdef cyruntime.cudaMemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + cdef cyruntime.cudaMemLocation* cylocation_ptr = location._pvt_ptr if location != None else NULL with nogil: err = cyruntime.cudaMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) if err != cyruntime.cudaSuccess: @@ -28629,7 +28629,7 @@ def cudaMemPoolCreate(poolProps : Optional[cudaMemPoolProps]): Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC. """ cdef cudaMemPool_t memPool = cudaMemPool_t() - cdef cyruntime.cudaMemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps is not None else NULL + cdef cyruntime.cudaMemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps != None else NULL with nogil: err = cyruntime.cudaMemPoolCreate(memPool._pvt_ptr, cypoolProps_ptr) if err != cyruntime.cudaSuccess: @@ -28925,7 +28925,7 @@ def cudaMemPoolImportPointer(memPool, exportData : Optional[cudaMemPoolPtrExport pmemPool = int(cudaMemPool_t(memPool)) cymemPool = pmemPool cdef void_ptr ptr = 0 - cdef cyruntime.cudaMemPoolPtrExportData* cyexportData_ptr = exportData._pvt_ptr if exportData is not None else NULL + cdef cyruntime.cudaMemPoolPtrExportData* cyexportData_ptr = exportData._pvt_ptr if exportData != None else NULL with nogil: err = cyruntime.cudaMemPoolImportPointer(&ptr, cymemPool, cyexportData_ptr) if err != cyruntime.cudaSuccess: @@ -29816,9 +29816,9 @@ def cudaCreateTextureObject(pResDesc : Optional[cudaResourceDesc], pTexDesc : Op :py:obj:`~.cudaDestroyTextureObject`, :py:obj:`~.cuTexObjectCreate` """ cdef cudaTextureObject_t pTexObject = cudaTextureObject_t() - cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL - cdef cyruntime.cudaTextureDesc* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc is not None else NULL - cdef cyruntime.cudaResourceViewDesc* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc is not None else NULL + cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL + cdef cyruntime.cudaTextureDesc* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc != None else NULL + cdef cyruntime.cudaResourceViewDesc* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc != None else NULL with nogil: err = cyruntime.cudaCreateTextureObject(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) if err != cyruntime.cudaSuccess: @@ -30019,7 +30019,7 @@ def cudaCreateSurfaceObject(pResDesc : Optional[cudaResourceDesc]): :py:obj:`~.cudaDestroySurfaceObject`, :py:obj:`~.cuSurfObjectCreate` """ cdef cudaSurfaceObject_t pSurfObject = cudaSurfaceObject_t() - cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL with nogil: err = cyruntime.cudaCreateSurfaceObject(pSurfObject._pvt_ptr, cypResDesc_ptr) if err != cyruntime.cudaSuccess: @@ -30313,7 +30313,7 @@ def cudaGraphAddKernelNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphAddKernelNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypNodeParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -30404,7 +30404,7 @@ def cudaGraphKernelNodeSetParams(node, pNodeParams : Optional[cudaKernelNodePara else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphKernelNodeSetParams(cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -30537,7 +30537,7 @@ def cudaGraphKernelNodeSetAttribute(hNode, attr not None : cudaKernelNodeAttrID, phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode cdef cyruntime.cudaKernelNodeAttrID cyattr = attr.value - cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL with nogil: err = cyruntime.cudaGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) return (_dict_cudaError_t[err],) @@ -30609,7 +30609,7 @@ def cudaGraphAddMemcpyNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaMemcpy3DParms* cypCopyParams_ptr = pCopyParams._pvt_ptr if pCopyParams is not None else NULL + cdef cyruntime.cudaMemcpy3DParms* cypCopyParams_ptr = pCopyParams._pvt_ptr if pCopyParams != None else NULL with nogil: err = cyruntime.cudaGraphAddMemcpyNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypCopyParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -30786,7 +30786,7 @@ def cudaGraphMemcpyNodeSetParams(node, pNodeParams : Optional[cudaMemcpy3DParms] else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphMemcpyNodeSetParams(cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -30914,7 +30914,7 @@ def cudaGraphAddMemsetNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaMemsetParams* cypMemsetParams_ptr = pMemsetParams._pvt_ptr if pMemsetParams is not None else NULL + cdef cyruntime.cudaMemsetParams* cypMemsetParams_ptr = pMemsetParams._pvt_ptr if pMemsetParams != None else NULL with nogil: err = cyruntime.cudaGraphAddMemsetNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypMemsetParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -30996,7 +30996,7 @@ def cudaGraphMemsetNodeSetParams(node, pNodeParams : Optional[cudaMemsetParams]) else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphMemsetNodeSetParams(cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -31063,7 +31063,7 @@ def cudaGraphAddHostNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphAddHostNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypNodeParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -31145,7 +31145,7 @@ def cudaGraphHostNodeSetParams(node, pNodeParams : Optional[cudaHostNodeParams]) else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphHostNodeSetParams(cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -31743,7 +31743,7 @@ def cudaGraphAddExternalSemaphoresSignalNode(graph, pDependencies : Optional[tup elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphAddExternalSemaphoresSignalNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -31832,7 +31832,7 @@ def cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[ else: phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_cudaError_t[err],) @@ -31900,7 +31900,7 @@ def cudaGraphAddExternalSemaphoresWaitNode(graph, pDependencies : Optional[tuple elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphAddExternalSemaphoresWaitNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -31989,7 +31989,7 @@ def cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[cu else: phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) return (_dict_cudaError_t[err],) @@ -32096,7 +32096,7 @@ def cudaGraphAddMemAllocNode(graph, pDependencies : Optional[tuple[cudaGraphNode elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaMemAllocNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaMemAllocNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphAddMemAllocNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -33838,7 +33838,7 @@ def cudaGraphInstantiateWithParams(graph, instantiateParams : Optional[cudaGraph pgraph = int(cudaGraph_t(graph)) cygraph = pgraph cdef cudaGraphExec_t pGraphExec = cudaGraphExec_t() - cdef cyruntime.cudaGraphInstantiateParams* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams is not None else NULL + cdef cyruntime.cudaGraphInstantiateParams* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams != None else NULL with nogil: err = cyruntime.cudaGraphInstantiateWithParams(pGraphExec._pvt_ptr, cygraph, cyinstantiateParams_ptr) if err != cyruntime.cudaSuccess: @@ -33965,7 +33965,7 @@ def cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExecKernelNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -34030,7 +34030,7 @@ def cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExecMemcpyNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -34173,7 +34173,7 @@ def cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExecMemsetNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -34228,7 +34228,7 @@ def cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams : Optional[cuda else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExecHostNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (_dict_cudaError_t[err],) @@ -34484,7 +34484,7 @@ def cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePa else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_cudaError_t[err],) @@ -34544,7 +34544,7 @@ def cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodePara else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_dict_cudaError_t[err],) @@ -35387,7 +35387,7 @@ def cudaGraphAddNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | li elif len(pDependencies) == 1: cypDependencies = (pDependencies[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphAddNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -35483,7 +35483,7 @@ def cudaGraphAddNode_v2(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | cydependencyData = (dependencyData[0])._pvt_ptr if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphAddNode_v2(pGraphNode._pvt_ptr, cygraph, cypDependencies, cydependencyData, numDependencies, cynodeParams_ptr) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -35533,7 +35533,7 @@ def cudaGraphNodeSetParams(node, nodeParams : Optional[cudaGraphNodeParams]): else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphNodeSetParams(cynode, cynodeParams_ptr) return (_dict_cudaError_t[err],) @@ -35593,7 +35593,7 @@ def cudaGraphExecNodeSetParams(graphExec, node, nodeParams : Optional[cudaGraphN else: pgraphExec = int(cudaGraphExec_t(graphExec)) cygraphExec = pgraphExec - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL with nogil: err = cyruntime.cudaGraphExecNodeSetParams(cygraphExec, cynode, cynodeParams_ptr) return (_dict_cudaError_t[err],) @@ -36487,7 +36487,7 @@ def cudaKernelSetAttributeForDevice(kernel, attr not None : cudaFuncAttribute, i def cudaGetExportTable(pExportTableId : Optional[cudaUUID_t]): """""" cdef void_ptr ppExportTable = 0 - cdef cyruntime.cudaUUID_t* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId is not None else NULL + cdef cyruntime.cudaUUID_t* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId != None else NULL with nogil: err = cyruntime.cudaGetExportTable(&ppExportTable, cypExportTableId_ptr) if err != cyruntime.cudaSuccess: @@ -37190,7 +37190,7 @@ def cudaEGLStreamProducerReturnFrame(conn, eglframe : Optional[cudaEglFrame], pS cyconn = conn else: raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) - cdef cyruntime.cudaEglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL + cdef cyruntime.cudaEglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe != None else NULL with nogil: err = cyruntime.cudaEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) return (_dict_cudaError_t[err],)