# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. # # Please refer to the NVIDIA end user license agreement (EULA) associated # with this source code for terms and conditions that govern your use of # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. {{if 'Windows' == platform.system()}} import win32api import struct from pywintypes import error {{else}} cimport cuda._lib.dlfcn as dlfcn {{endif}} import os import sys cimport cuda._cuda.loader as loader cdef bint __cuPythonInit = False {{if 'cuGetErrorString' in found_functions}}cdef void *__cuGetErrorString = NULL{{endif}} {{if 'cuGetErrorName' in found_functions}}cdef void *__cuGetErrorName = NULL{{endif}} {{if 'cuInit' in found_functions}}cdef void *__cuInit = NULL{{endif}} {{if 'cuDriverGetVersion' in found_functions}}cdef void *__cuDriverGetVersion = NULL{{endif}} {{if 'cuDeviceGet' in found_functions}}cdef void *__cuDeviceGet = NULL{{endif}} {{if 'cuDeviceGetCount' in found_functions}}cdef void *__cuDeviceGetCount = NULL{{endif}} {{if 'cuDeviceGetName' in found_functions}}cdef void *__cuDeviceGetName = NULL{{endif}} {{if 'cuDeviceGetUuid' in found_functions}}cdef void *__cuDeviceGetUuid = NULL{{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}}cdef void *__cuDeviceGetUuid_v2 = NULL{{endif}} {{if 'cuDeviceGetLuid' in found_functions}}cdef void *__cuDeviceGetLuid = NULL{{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}}cdef void *__cuDeviceTotalMem_v2 = NULL{{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}}cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL{{endif}} {{if 'cuDeviceGetAttribute' in found_functions}}cdef void *__cuDeviceGetAttribute = NULL{{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}}cdef void *__cuDeviceGetNvSciSyncAttributes = NULL{{endif}} {{if 'cuDeviceSetMemPool' in found_functions}}cdef void *__cuDeviceSetMemPool = NULL{{endif}} {{if 'cuDeviceGetMemPool' in found_functions}}cdef void *__cuDeviceGetMemPool = NULL{{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}}cdef void *__cuDeviceGetDefaultMemPool = NULL{{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}}cdef void *__cuDeviceGetExecAffinitySupport = NULL{{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}}cdef void *__cuFlushGPUDirectRDMAWrites = NULL{{endif}} {{if 'cuDeviceGetProperties' in found_functions}}cdef void *__cuDeviceGetProperties = NULL{{endif}} {{if 'cuDeviceComputeCapability' in found_functions}}cdef void *__cuDeviceComputeCapability = NULL{{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}}cdef void *__cuDevicePrimaryCtxRetain = NULL{{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}}cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL{{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}}cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL{{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}}cdef void *__cuDevicePrimaryCtxGetState = NULL{{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}}cdef void *__cuDevicePrimaryCtxReset_v2 = NULL{{endif}} {{if 'cuCtxCreate_v2' in found_functions}}cdef void *__cuCtxCreate_v2 = NULL{{endif}} {{if 'cuCtxCreate_v3' in found_functions}}cdef void *__cuCtxCreate_v3 = NULL{{endif}} {{if 'cuCtxCreate_v4' in found_functions}}cdef void *__cuCtxCreate_v4 = NULL{{endif}} {{if 'cuCtxDestroy_v2' in found_functions}}cdef void *__cuCtxDestroy_v2 = NULL{{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}}cdef void *__cuCtxPushCurrent_v2 = NULL{{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}}cdef void *__cuCtxPopCurrent_v2 = NULL{{endif}} {{if 'cuCtxSetCurrent' in found_functions}}cdef void *__cuCtxSetCurrent = NULL{{endif}} {{if 'cuCtxGetCurrent' in found_functions}}cdef void *__cuCtxGetCurrent = NULL{{endif}} {{if 'cuCtxGetDevice' in found_functions}}cdef void *__cuCtxGetDevice = NULL{{endif}} {{if 'cuCtxGetFlags' in found_functions}}cdef void *__cuCtxGetFlags = NULL{{endif}} {{if 'cuCtxSetFlags' in found_functions}}cdef void *__cuCtxSetFlags = NULL{{endif}} {{if 'cuCtxGetId' in found_functions}}cdef void *__cuCtxGetId = NULL{{endif}} {{if 'cuCtxSynchronize' in found_functions}}cdef void *__cuCtxSynchronize = NULL{{endif}} {{if 'cuCtxSetLimit' in found_functions}}cdef void *__cuCtxSetLimit = NULL{{endif}} {{if 'cuCtxGetLimit' in found_functions}}cdef void *__cuCtxGetLimit = NULL{{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}}cdef void *__cuCtxGetCacheConfig = NULL{{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}}cdef void *__cuCtxSetCacheConfig = NULL{{endif}} {{if 'cuCtxGetApiVersion' in found_functions}}cdef void *__cuCtxGetApiVersion = NULL{{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}}cdef void *__cuCtxGetStreamPriorityRange = NULL{{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}}cdef void *__cuCtxResetPersistingL2Cache = NULL{{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}}cdef void *__cuCtxGetExecAffinity = NULL{{endif}} {{if 'cuCtxRecordEvent' in found_functions}}cdef void *__cuCtxRecordEvent = NULL{{endif}} {{if 'cuCtxWaitEvent' in found_functions}}cdef void *__cuCtxWaitEvent = NULL{{endif}} {{if 'cuCtxAttach' in found_functions}}cdef void *__cuCtxAttach = NULL{{endif}} {{if 'cuCtxDetach' in found_functions}}cdef void *__cuCtxDetach = NULL{{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}}cdef void *__cuCtxGetSharedMemConfig = NULL{{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}}cdef void *__cuCtxSetSharedMemConfig = NULL{{endif}} {{if 'cuModuleLoad' in found_functions}}cdef void *__cuModuleLoad = NULL{{endif}} {{if 'cuModuleLoadData' in found_functions}}cdef void *__cuModuleLoadData = NULL{{endif}} {{if 'cuModuleLoadDataEx' in found_functions}}cdef void *__cuModuleLoadDataEx = NULL{{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}}cdef void *__cuModuleLoadFatBinary = NULL{{endif}} {{if 'cuModuleUnload' in found_functions}}cdef void *__cuModuleUnload = NULL{{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}}cdef void *__cuModuleGetLoadingMode = NULL{{endif}} {{if 'cuModuleGetFunction' in found_functions}}cdef void *__cuModuleGetFunction = NULL{{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}}cdef void *__cuModuleGetFunctionCount = NULL{{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}}cdef void *__cuModuleEnumerateFunctions = NULL{{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}}cdef void *__cuModuleGetGlobal_v2 = NULL{{endif}} {{if 'cuLinkCreate_v2' in found_functions}}cdef void *__cuLinkCreate_v2 = NULL{{endif}} {{if 'cuLinkAddData_v2' in found_functions}}cdef void *__cuLinkAddData_v2 = NULL{{endif}} {{if 'cuLinkAddFile_v2' in found_functions}}cdef void *__cuLinkAddFile_v2 = NULL{{endif}} {{if 'cuLinkComplete' in found_functions}}cdef void *__cuLinkComplete = NULL{{endif}} {{if 'cuLinkDestroy' in found_functions}}cdef void *__cuLinkDestroy = NULL{{endif}} {{if 'cuModuleGetTexRef' in found_functions}}cdef void *__cuModuleGetTexRef = NULL{{endif}} {{if 'cuModuleGetSurfRef' in found_functions}}cdef void *__cuModuleGetSurfRef = NULL{{endif}} {{if 'cuLibraryLoadData' in found_functions}}cdef void *__cuLibraryLoadData = NULL{{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}}cdef void *__cuLibraryLoadFromFile = NULL{{endif}} {{if 'cuLibraryUnload' in found_functions}}cdef void *__cuLibraryUnload = NULL{{endif}} {{if 'cuLibraryGetKernel' in found_functions}}cdef void *__cuLibraryGetKernel = NULL{{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}}cdef void *__cuLibraryGetKernelCount = NULL{{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}}cdef void *__cuLibraryEnumerateKernels = NULL{{endif}} {{if 'cuLibraryGetModule' in found_functions}}cdef void *__cuLibraryGetModule = NULL{{endif}} {{if 'cuKernelGetFunction' in found_functions}}cdef void *__cuKernelGetFunction = NULL{{endif}} {{if 'cuKernelGetLibrary' in found_functions}}cdef void *__cuKernelGetLibrary = NULL{{endif}} {{if 'cuLibraryGetGlobal' in found_functions}}cdef void *__cuLibraryGetGlobal = NULL{{endif}} {{if 'cuLibraryGetManaged' in found_functions}}cdef void *__cuLibraryGetManaged = NULL{{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}}cdef void *__cuLibraryGetUnifiedFunction = NULL{{endif}} {{if 'cuKernelGetAttribute' in found_functions}}cdef void *__cuKernelGetAttribute = NULL{{endif}} {{if 'cuKernelSetAttribute' in found_functions}}cdef void *__cuKernelSetAttribute = NULL{{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}}cdef void *__cuKernelSetCacheConfig = NULL{{endif}} {{if 'cuKernelGetName' in found_functions}}cdef void *__cuKernelGetName = NULL{{endif}} {{if 'cuKernelGetParamInfo' in found_functions}}cdef void *__cuKernelGetParamInfo = NULL{{endif}} {{if 'cuMemGetInfo_v2' in found_functions}}cdef void *__cuMemGetInfo_v2 = NULL{{endif}} {{if 'cuMemAlloc_v2' in found_functions}}cdef void *__cuMemAlloc_v2 = NULL{{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}}cdef void *__cuMemAllocPitch_v2 = NULL{{endif}} {{if 'cuMemFree_v2' in found_functions}}cdef void *__cuMemFree_v2 = NULL{{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}}cdef void *__cuMemGetAddressRange_v2 = NULL{{endif}} {{if 'cuMemAllocHost_v2' in found_functions}}cdef void *__cuMemAllocHost_v2 = NULL{{endif}} {{if 'cuMemFreeHost' in found_functions}}cdef void *__cuMemFreeHost = NULL{{endif}} {{if 'cuMemHostAlloc' in found_functions}}cdef void *__cuMemHostAlloc = NULL{{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}}cdef void *__cuMemHostGetDevicePointer_v2 = NULL{{endif}} {{if 'cuMemHostGetFlags' in found_functions}}cdef void *__cuMemHostGetFlags = NULL{{endif}} {{if 'cuMemAllocManaged' in found_functions}}cdef void *__cuMemAllocManaged = NULL{{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}}cdef void *__cuDeviceRegisterAsyncNotification = NULL{{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}}cdef void *__cuDeviceUnregisterAsyncNotification = NULL{{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}}cdef void *__cuDeviceGetByPCIBusId = NULL{{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}}cdef void *__cuDeviceGetPCIBusId = NULL{{endif}} {{if 'cuIpcGetEventHandle' in found_functions}}cdef void *__cuIpcGetEventHandle = NULL{{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}}cdef void *__cuIpcOpenEventHandle = NULL{{endif}} {{if 'cuIpcGetMemHandle' in found_functions}}cdef void *__cuIpcGetMemHandle = NULL{{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}}cdef void *__cuIpcOpenMemHandle_v2 = NULL{{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}}cdef void *__cuIpcCloseMemHandle = NULL{{endif}} {{if 'cuMemHostRegister_v2' in found_functions}}cdef void *__cuMemHostRegister_v2 = NULL{{endif}} {{if 'cuMemHostUnregister' in found_functions}}cdef void *__cuMemHostUnregister = NULL{{endif}} {{if 'cuMemcpy' in found_functions}}cdef void *__cuMemcpy = NULL{{endif}} {{if 'cuMemcpyPeer' in found_functions}}cdef void *__cuMemcpyPeer = NULL{{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}}cdef void *__cuMemcpyHtoD_v2 = NULL{{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}}cdef void *__cuMemcpyDtoH_v2 = NULL{{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}}cdef void *__cuMemcpyDtoD_v2 = NULL{{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}}cdef void *__cuMemcpyDtoA_v2 = NULL{{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}}cdef void *__cuMemcpyAtoD_v2 = NULL{{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}}cdef void *__cuMemcpyHtoA_v2 = NULL{{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}}cdef void *__cuMemcpyAtoH_v2 = NULL{{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}}cdef void *__cuMemcpyAtoA_v2 = NULL{{endif}} {{if 'cuMemcpy2D_v2' in found_functions}}cdef void *__cuMemcpy2D_v2 = NULL{{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}}cdef void *__cuMemcpy2DUnaligned_v2 = NULL{{endif}} {{if 'cuMemcpy3D_v2' in found_functions}}cdef void *__cuMemcpy3D_v2 = NULL{{endif}} {{if 'cuMemcpy3DPeer' in found_functions}}cdef void *__cuMemcpy3DPeer = NULL{{endif}} {{if 'cuMemcpyAsync' in found_functions}}cdef void *__cuMemcpyAsync = NULL{{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}}cdef void *__cuMemcpyPeerAsync = NULL{{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}}cdef void *__cuMemcpyHtoDAsync_v2 = NULL{{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}}cdef void *__cuMemcpyDtoHAsync_v2 = NULL{{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}}cdef void *__cuMemcpyDtoDAsync_v2 = NULL{{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}}cdef void *__cuMemcpyHtoAAsync_v2 = NULL{{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}}cdef void *__cuMemcpyAtoHAsync_v2 = NULL{{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}}cdef void *__cuMemcpy2DAsync_v2 = NULL{{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}}cdef void *__cuMemcpy3DAsync_v2 = NULL{{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}}cdef void *__cuMemcpy3DPeerAsync = NULL{{endif}} {{if 'cuMemsetD8_v2' in found_functions}}cdef void *__cuMemsetD8_v2 = NULL{{endif}} {{if 'cuMemsetD16_v2' in found_functions}}cdef void *__cuMemsetD16_v2 = NULL{{endif}} {{if 'cuMemsetD32_v2' in found_functions}}cdef void *__cuMemsetD32_v2 = NULL{{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}}cdef void *__cuMemsetD2D8_v2 = NULL{{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}}cdef void *__cuMemsetD2D16_v2 = NULL{{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}}cdef void *__cuMemsetD2D32_v2 = NULL{{endif}} {{if 'cuMemsetD8Async' in found_functions}}cdef void *__cuMemsetD8Async = NULL{{endif}} {{if 'cuMemsetD16Async' in found_functions}}cdef void *__cuMemsetD16Async = NULL{{endif}} {{if 'cuMemsetD32Async' in found_functions}}cdef void *__cuMemsetD32Async = NULL{{endif}} {{if 'cuMemsetD2D8Async' in found_functions}}cdef void *__cuMemsetD2D8Async = NULL{{endif}} {{if 'cuMemsetD2D16Async' in found_functions}}cdef void *__cuMemsetD2D16Async = NULL{{endif}} {{if 'cuMemsetD2D32Async' in found_functions}}cdef void *__cuMemsetD2D32Async = NULL{{endif}} {{if 'cuArrayCreate_v2' in found_functions}}cdef void *__cuArrayCreate_v2 = NULL{{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}}cdef void *__cuArrayGetDescriptor_v2 = NULL{{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}}cdef void *__cuArrayGetSparseProperties = NULL{{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}}cdef void *__cuMipmappedArrayGetSparseProperties = NULL{{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}}cdef void *__cuArrayGetMemoryRequirements = NULL{{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}}cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL{{endif}} {{if 'cuArrayGetPlane' in found_functions}}cdef void *__cuArrayGetPlane = NULL{{endif}} {{if 'cuArrayDestroy' in found_functions}}cdef void *__cuArrayDestroy = NULL{{endif}} {{if 'cuArray3DCreate_v2' in found_functions}}cdef void *__cuArray3DCreate_v2 = NULL{{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}}cdef void *__cuArray3DGetDescriptor_v2 = NULL{{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}}cdef void *__cuMipmappedArrayCreate = NULL{{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}}cdef void *__cuMipmappedArrayGetLevel = NULL{{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}}cdef void *__cuMipmappedArrayDestroy = NULL{{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}}cdef void *__cuMemGetHandleForAddressRange = NULL{{endif}} {{if 'cuMemAddressReserve' in found_functions}}cdef void *__cuMemAddressReserve = NULL{{endif}} {{if 'cuMemAddressFree' in found_functions}}cdef void *__cuMemAddressFree = NULL{{endif}} {{if 'cuMemCreate' in found_functions}}cdef void *__cuMemCreate = NULL{{endif}} {{if 'cuMemRelease' in found_functions}}cdef void *__cuMemRelease = NULL{{endif}} {{if 'cuMemMap' in found_functions}}cdef void *__cuMemMap = NULL{{endif}} {{if 'cuMemMapArrayAsync' in found_functions}}cdef void *__cuMemMapArrayAsync = NULL{{endif}} {{if 'cuMemUnmap' in found_functions}}cdef void *__cuMemUnmap = NULL{{endif}} {{if 'cuMemSetAccess' in found_functions}}cdef void *__cuMemSetAccess = NULL{{endif}} {{if 'cuMemGetAccess' in found_functions}}cdef void *__cuMemGetAccess = NULL{{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}}cdef void *__cuMemExportToShareableHandle = NULL{{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}}cdef void *__cuMemImportFromShareableHandle = NULL{{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}}cdef void *__cuMemGetAllocationGranularity = NULL{{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}}cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL{{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}}cdef void *__cuMemRetainAllocationHandle = NULL{{endif}} {{if 'cuMemFreeAsync' in found_functions}}cdef void *__cuMemFreeAsync = NULL{{endif}} {{if 'cuMemAllocAsync' in found_functions}}cdef void *__cuMemAllocAsync = NULL{{endif}} {{if 'cuMemPoolTrimTo' in found_functions}}cdef void *__cuMemPoolTrimTo = NULL{{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}}cdef void *__cuMemPoolSetAttribute = NULL{{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}}cdef void *__cuMemPoolGetAttribute = NULL{{endif}} {{if 'cuMemPoolSetAccess' in found_functions}}cdef void *__cuMemPoolSetAccess = NULL{{endif}} {{if 'cuMemPoolGetAccess' in found_functions}}cdef void *__cuMemPoolGetAccess = NULL{{endif}} {{if 'cuMemPoolCreate' in found_functions}}cdef void *__cuMemPoolCreate = NULL{{endif}} {{if 'cuMemPoolDestroy' in found_functions}}cdef void *__cuMemPoolDestroy = NULL{{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}}cdef void *__cuMemAllocFromPoolAsync = NULL{{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}}cdef void *__cuMemPoolExportToShareableHandle = NULL{{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}}cdef void *__cuMemPoolImportFromShareableHandle = NULL{{endif}} {{if 'cuMemPoolExportPointer' in found_functions}}cdef void *__cuMemPoolExportPointer = NULL{{endif}} {{if 'cuMemPoolImportPointer' in found_functions}}cdef void *__cuMemPoolImportPointer = NULL{{endif}} {{if 'cuMulticastCreate' in found_functions}}cdef void *__cuMulticastCreate = NULL{{endif}} {{if 'cuMulticastAddDevice' in found_functions}}cdef void *__cuMulticastAddDevice = NULL{{endif}} {{if 'cuMulticastBindMem' in found_functions}}cdef void *__cuMulticastBindMem = NULL{{endif}} {{if 'cuMulticastBindAddr' in found_functions}}cdef void *__cuMulticastBindAddr = NULL{{endif}} {{if 'cuMulticastUnbind' in found_functions}}cdef void *__cuMulticastUnbind = NULL{{endif}} {{if 'cuMulticastGetGranularity' in found_functions}}cdef void *__cuMulticastGetGranularity = NULL{{endif}} {{if 'cuPointerGetAttribute' in found_functions}}cdef void *__cuPointerGetAttribute = NULL{{endif}} {{if 'cuMemPrefetchAsync' in found_functions}}cdef void *__cuMemPrefetchAsync = NULL{{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}}cdef void *__cuMemPrefetchAsync_v2 = NULL{{endif}} {{if 'cuMemAdvise' in found_functions}}cdef void *__cuMemAdvise = NULL{{endif}} {{if 'cuMemAdvise_v2' in found_functions}}cdef void *__cuMemAdvise_v2 = NULL{{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}}cdef void *__cuMemRangeGetAttribute = NULL{{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}}cdef void *__cuMemRangeGetAttributes = NULL{{endif}} {{if 'cuPointerSetAttribute' in found_functions}}cdef void *__cuPointerSetAttribute = NULL{{endif}} {{if 'cuPointerGetAttributes' in found_functions}}cdef void *__cuPointerGetAttributes = NULL{{endif}} {{if 'cuStreamCreate' in found_functions}}cdef void *__cuStreamCreate = NULL{{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}}cdef void *__cuStreamCreateWithPriority = NULL{{endif}} {{if 'cuStreamGetPriority' in found_functions}}cdef void *__cuStreamGetPriority = NULL{{endif}} {{if 'cuStreamGetFlags' in found_functions}}cdef void *__cuStreamGetFlags = NULL{{endif}} {{if 'cuStreamGetId' in found_functions}}cdef void *__cuStreamGetId = NULL{{endif}} {{if 'cuStreamGetCtx' in found_functions}}cdef void *__cuStreamGetCtx = NULL{{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}}cdef void *__cuStreamGetCtx_v2 = NULL{{endif}} {{if 'cuStreamWaitEvent' in found_functions}}cdef void *__cuStreamWaitEvent = NULL{{endif}} {{if 'cuStreamAddCallback' in found_functions}}cdef void *__cuStreamAddCallback = NULL{{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}}cdef void *__cuStreamBeginCapture_v2 = NULL{{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}}cdef void *__cuStreamBeginCaptureToGraph = NULL{{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}}cdef void *__cuThreadExchangeStreamCaptureMode = NULL{{endif}} {{if 'cuStreamEndCapture' in found_functions}}cdef void *__cuStreamEndCapture = NULL{{endif}} {{if 'cuStreamIsCapturing' in found_functions}}cdef void *__cuStreamIsCapturing = NULL{{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}}cdef void *__cuStreamGetCaptureInfo_v2 = NULL{{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}}cdef void *__cuStreamGetCaptureInfo_v3 = NULL{{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}}cdef void *__cuStreamUpdateCaptureDependencies = NULL{{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}}cdef void *__cuStreamUpdateCaptureDependencies_v2 = NULL{{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}}cdef void *__cuStreamAttachMemAsync = NULL{{endif}} {{if 'cuStreamQuery' in found_functions}}cdef void *__cuStreamQuery = NULL{{endif}} {{if 'cuStreamSynchronize' in found_functions}}cdef void *__cuStreamSynchronize = NULL{{endif}} {{if 'cuStreamDestroy_v2' in found_functions}}cdef void *__cuStreamDestroy_v2 = NULL{{endif}} {{if 'cuStreamCopyAttributes' in found_functions}}cdef void *__cuStreamCopyAttributes = NULL{{endif}} {{if 'cuStreamGetAttribute' in found_functions}}cdef void *__cuStreamGetAttribute = NULL{{endif}} {{if 'cuStreamSetAttribute' in found_functions}}cdef void *__cuStreamSetAttribute = NULL{{endif}} {{if 'cuEventCreate' in found_functions}}cdef void *__cuEventCreate = NULL{{endif}} {{if 'cuEventRecord' in found_functions}}cdef void *__cuEventRecord = NULL{{endif}} {{if 'cuEventRecordWithFlags' in found_functions}}cdef void *__cuEventRecordWithFlags = NULL{{endif}} {{if 'cuEventQuery' in found_functions}}cdef void *__cuEventQuery = NULL{{endif}} {{if 'cuEventSynchronize' in found_functions}}cdef void *__cuEventSynchronize = NULL{{endif}} {{if 'cuEventDestroy_v2' in found_functions}}cdef void *__cuEventDestroy_v2 = NULL{{endif}} {{if 'cuEventElapsedTime' in found_functions}}cdef void *__cuEventElapsedTime = NULL{{endif}} {{if 'cuImportExternalMemory' in found_functions}}cdef void *__cuImportExternalMemory = NULL{{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}}cdef void *__cuExternalMemoryGetMappedBuffer = NULL{{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}}cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL{{endif}} {{if 'cuDestroyExternalMemory' in found_functions}}cdef void *__cuDestroyExternalMemory = NULL{{endif}} {{if 'cuImportExternalSemaphore' in found_functions}}cdef void *__cuImportExternalSemaphore = NULL{{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}}cdef void *__cuSignalExternalSemaphoresAsync = NULL{{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}}cdef void *__cuWaitExternalSemaphoresAsync = NULL{{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}}cdef void *__cuDestroyExternalSemaphore = NULL{{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}}cdef void *__cuStreamWaitValue32_v2 = NULL{{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}}cdef void *__cuStreamWaitValue64_v2 = NULL{{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}}cdef void *__cuStreamWriteValue32_v2 = NULL{{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}}cdef void *__cuStreamWriteValue64_v2 = NULL{{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}}cdef void *__cuStreamBatchMemOp_v2 = NULL{{endif}} {{if 'cuFuncGetAttribute' in found_functions}}cdef void *__cuFuncGetAttribute = NULL{{endif}} {{if 'cuFuncSetAttribute' in found_functions}}cdef void *__cuFuncSetAttribute = NULL{{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}}cdef void *__cuFuncSetCacheConfig = NULL{{endif}} {{if 'cuFuncGetModule' in found_functions}}cdef void *__cuFuncGetModule = NULL{{endif}} {{if 'cuFuncGetName' in found_functions}}cdef void *__cuFuncGetName = NULL{{endif}} {{if 'cuFuncGetParamInfo' in found_functions}}cdef void *__cuFuncGetParamInfo = NULL{{endif}} {{if 'cuFuncIsLoaded' in found_functions}}cdef void *__cuFuncIsLoaded = NULL{{endif}} {{if 'cuFuncLoad' in found_functions}}cdef void *__cuFuncLoad = NULL{{endif}} {{if 'cuLaunchKernel' in found_functions}}cdef void *__cuLaunchKernel = NULL{{endif}} {{if 'cuLaunchKernelEx' in found_functions}}cdef void *__cuLaunchKernelEx = NULL{{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}}cdef void *__cuLaunchCooperativeKernel = NULL{{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}}cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL{{endif}} {{if 'cuLaunchHostFunc' in found_functions}}cdef void *__cuLaunchHostFunc = NULL{{endif}} {{if 'cuFuncSetBlockShape' in found_functions}}cdef void *__cuFuncSetBlockShape = NULL{{endif}} {{if 'cuFuncSetSharedSize' in found_functions}}cdef void *__cuFuncSetSharedSize = NULL{{endif}} {{if 'cuParamSetSize' in found_functions}}cdef void *__cuParamSetSize = NULL{{endif}} {{if 'cuParamSeti' in found_functions}}cdef void *__cuParamSeti = NULL{{endif}} {{if 'cuParamSetf' in found_functions}}cdef void *__cuParamSetf = NULL{{endif}} {{if 'cuParamSetv' in found_functions}}cdef void *__cuParamSetv = NULL{{endif}} {{if 'cuLaunch' in found_functions}}cdef void *__cuLaunch = NULL{{endif}} {{if 'cuLaunchGrid' in found_functions}}cdef void *__cuLaunchGrid = NULL{{endif}} {{if 'cuLaunchGridAsync' in found_functions}}cdef void *__cuLaunchGridAsync = NULL{{endif}} {{if 'cuParamSetTexRef' in found_functions}}cdef void *__cuParamSetTexRef = NULL{{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}}cdef void *__cuFuncSetSharedMemConfig = NULL{{endif}} {{if 'cuGraphCreate' in found_functions}}cdef void *__cuGraphCreate = NULL{{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}}cdef void *__cuGraphAddKernelNode_v2 = NULL{{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}}cdef void *__cuGraphKernelNodeGetParams_v2 = NULL{{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}}cdef void *__cuGraphKernelNodeSetParams_v2 = NULL{{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}}cdef void *__cuGraphAddMemcpyNode = NULL{{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}}cdef void *__cuGraphMemcpyNodeGetParams = NULL{{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}}cdef void *__cuGraphMemcpyNodeSetParams = NULL{{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}}cdef void *__cuGraphAddMemsetNode = NULL{{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}}cdef void *__cuGraphMemsetNodeGetParams = NULL{{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}}cdef void *__cuGraphMemsetNodeSetParams = NULL{{endif}} {{if 'cuGraphAddHostNode' in found_functions}}cdef void *__cuGraphAddHostNode = NULL{{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}}cdef void *__cuGraphHostNodeGetParams = NULL{{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}}cdef void *__cuGraphHostNodeSetParams = NULL{{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}}cdef void *__cuGraphAddChildGraphNode = NULL{{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}}cdef void *__cuGraphChildGraphNodeGetGraph = NULL{{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}}cdef void *__cuGraphAddEmptyNode = NULL{{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}}cdef void *__cuGraphAddEventRecordNode = NULL{{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}}cdef void *__cuGraphEventRecordNodeGetEvent = NULL{{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}}cdef void *__cuGraphEventRecordNodeSetEvent = NULL{{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}}cdef void *__cuGraphAddEventWaitNode = NULL{{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}}cdef void *__cuGraphEventWaitNodeGetEvent = NULL{{endif}} {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}}cdef void *__cuGraphEventWaitNodeSetEvent = NULL{{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}}cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL{{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}}cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL{{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}}cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL{{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}}cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL{{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}}cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL{{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}}cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL{{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}}cdef void *__cuGraphAddBatchMemOpNode = NULL{{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}}cdef void *__cuGraphBatchMemOpNodeGetParams = NULL{{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}}cdef void *__cuGraphBatchMemOpNodeSetParams = NULL{{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}}cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL{{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}}cdef void *__cuGraphAddMemAllocNode = NULL{{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}}cdef void *__cuGraphMemAllocNodeGetParams = NULL{{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}}cdef void *__cuGraphAddMemFreeNode = NULL{{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}}cdef void *__cuGraphMemFreeNodeGetParams = NULL{{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}}cdef void *__cuDeviceGraphMemTrim = NULL{{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}}cdef void *__cuDeviceGetGraphMemAttribute = NULL{{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}}cdef void *__cuDeviceSetGraphMemAttribute = NULL{{endif}} {{if 'cuGraphClone' in found_functions}}cdef void *__cuGraphClone = NULL{{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}}cdef void *__cuGraphNodeFindInClone = NULL{{endif}} {{if 'cuGraphNodeGetType' in found_functions}}cdef void *__cuGraphNodeGetType = NULL{{endif}} {{if 'cuGraphGetNodes' in found_functions}}cdef void *__cuGraphGetNodes = NULL{{endif}} {{if 'cuGraphGetRootNodes' in found_functions}}cdef void *__cuGraphGetRootNodes = NULL{{endif}} {{if 'cuGraphGetEdges' in found_functions}}cdef void *__cuGraphGetEdges = NULL{{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}}cdef void *__cuGraphGetEdges_v2 = NULL{{endif}} {{if 'cuGraphNodeGetDependencies' in found_functions}}cdef void *__cuGraphNodeGetDependencies = NULL{{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}}cdef void *__cuGraphNodeGetDependencies_v2 = NULL{{endif}} {{if 'cuGraphNodeGetDependentNodes' in found_functions}}cdef void *__cuGraphNodeGetDependentNodes = NULL{{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}}cdef void *__cuGraphNodeGetDependentNodes_v2 = NULL{{endif}} {{if 'cuGraphAddDependencies' in found_functions}}cdef void *__cuGraphAddDependencies = NULL{{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}}cdef void *__cuGraphAddDependencies_v2 = NULL{{endif}} {{if 'cuGraphRemoveDependencies' in found_functions}}cdef void *__cuGraphRemoveDependencies = NULL{{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}}cdef void *__cuGraphRemoveDependencies_v2 = NULL{{endif}} {{if 'cuGraphDestroyNode' in found_functions}}cdef void *__cuGraphDestroyNode = NULL{{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}}cdef void *__cuGraphInstantiateWithFlags = NULL{{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}}cdef void *__cuGraphInstantiateWithParams = NULL{{endif}} {{if 'cuGraphExecGetFlags' in found_functions}}cdef void *__cuGraphExecGetFlags = NULL{{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}}cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL{{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}}cdef void *__cuGraphExecMemcpyNodeSetParams = NULL{{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}}cdef void *__cuGraphExecMemsetNodeSetParams = NULL{{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}}cdef void *__cuGraphExecHostNodeSetParams = NULL{{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}}cdef void *__cuGraphExecChildGraphNodeSetParams = NULL{{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}}cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL{{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}}cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL{{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}}cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL{{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}}cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL{{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}}cdef void *__cuGraphNodeSetEnabled = NULL{{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}}cdef void *__cuGraphNodeGetEnabled = NULL{{endif}} {{if 'cuGraphUpload' in found_functions}}cdef void *__cuGraphUpload = NULL{{endif}} {{if 'cuGraphLaunch' in found_functions}}cdef void *__cuGraphLaunch = NULL{{endif}} {{if 'cuGraphExecDestroy' in found_functions}}cdef void *__cuGraphExecDestroy = NULL{{endif}} {{if 'cuGraphDestroy' in found_functions}}cdef void *__cuGraphDestroy = NULL{{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}}cdef void *__cuGraphExecUpdate_v2 = NULL{{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}}cdef void *__cuGraphKernelNodeCopyAttributes = NULL{{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}}cdef void *__cuGraphKernelNodeGetAttribute = NULL{{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}}cdef void *__cuGraphKernelNodeSetAttribute = NULL{{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}}cdef void *__cuGraphDebugDotPrint = NULL{{endif}} {{if 'cuUserObjectCreate' in found_functions}}cdef void *__cuUserObjectCreate = NULL{{endif}} {{if 'cuUserObjectRetain' in found_functions}}cdef void *__cuUserObjectRetain = NULL{{endif}} {{if 'cuUserObjectRelease' in found_functions}}cdef void *__cuUserObjectRelease = NULL{{endif}} {{if 'cuGraphRetainUserObject' in found_functions}}cdef void *__cuGraphRetainUserObject = NULL{{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}}cdef void *__cuGraphReleaseUserObject = NULL{{endif}} {{if 'cuGraphAddNode' in found_functions}}cdef void *__cuGraphAddNode = NULL{{endif}} {{if 'cuGraphAddNode_v2' in found_functions}}cdef void *__cuGraphAddNode_v2 = NULL{{endif}} {{if 'cuGraphNodeSetParams' in found_functions}}cdef void *__cuGraphNodeSetParams = NULL{{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}}cdef void *__cuGraphExecNodeSetParams = NULL{{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}}cdef void *__cuGraphConditionalHandleCreate = NULL{{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}}cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL{{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}}cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL{{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}}cdef void *__cuOccupancyMaxPotentialBlockSize = NULL{{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}}cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL{{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}}cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL{{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}}cdef void *__cuOccupancyMaxPotentialClusterSize = NULL{{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}}cdef void *__cuOccupancyMaxActiveClusters = NULL{{endif}} {{if 'cuTexRefSetArray' in found_functions}}cdef void *__cuTexRefSetArray = NULL{{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}}cdef void *__cuTexRefSetMipmappedArray = NULL{{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}}cdef void *__cuTexRefSetAddress_v2 = NULL{{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}}cdef void *__cuTexRefSetAddress2D_v3 = NULL{{endif}} {{if 'cuTexRefSetFormat' in found_functions}}cdef void *__cuTexRefSetFormat = NULL{{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}}cdef void *__cuTexRefSetAddressMode = NULL{{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}}cdef void *__cuTexRefSetFilterMode = NULL{{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}}cdef void *__cuTexRefSetMipmapFilterMode = NULL{{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}}cdef void *__cuTexRefSetMipmapLevelBias = NULL{{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}}cdef void *__cuTexRefSetMipmapLevelClamp = NULL{{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}}cdef void *__cuTexRefSetMaxAnisotropy = NULL{{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}}cdef void *__cuTexRefSetBorderColor = NULL{{endif}} {{if 'cuTexRefSetFlags' in found_functions}}cdef void *__cuTexRefSetFlags = NULL{{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}}cdef void *__cuTexRefGetAddress_v2 = NULL{{endif}} {{if 'cuTexRefGetArray' in found_functions}}cdef void *__cuTexRefGetArray = NULL{{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}}cdef void *__cuTexRefGetMipmappedArray = NULL{{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}}cdef void *__cuTexRefGetAddressMode = NULL{{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}}cdef void *__cuTexRefGetFilterMode = NULL{{endif}} {{if 'cuTexRefGetFormat' in found_functions}}cdef void *__cuTexRefGetFormat = NULL{{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}}cdef void *__cuTexRefGetMipmapFilterMode = NULL{{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}}cdef void *__cuTexRefGetMipmapLevelBias = NULL{{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}}cdef void *__cuTexRefGetMipmapLevelClamp = NULL{{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}}cdef void *__cuTexRefGetMaxAnisotropy = NULL{{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}}cdef void *__cuTexRefGetBorderColor = NULL{{endif}} {{if 'cuTexRefGetFlags' in found_functions}}cdef void *__cuTexRefGetFlags = NULL{{endif}} {{if 'cuTexRefCreate' in found_functions}}cdef void *__cuTexRefCreate = NULL{{endif}} {{if 'cuTexRefDestroy' in found_functions}}cdef void *__cuTexRefDestroy = NULL{{endif}} {{if 'cuSurfRefSetArray' in found_functions}}cdef void *__cuSurfRefSetArray = NULL{{endif}} {{if 'cuSurfRefGetArray' in found_functions}}cdef void *__cuSurfRefGetArray = NULL{{endif}} {{if 'cuTexObjectCreate' in found_functions}}cdef void *__cuTexObjectCreate = NULL{{endif}} {{if 'cuTexObjectDestroy' in found_functions}}cdef void *__cuTexObjectDestroy = NULL{{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}}cdef void *__cuTexObjectGetResourceDesc = NULL{{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}}cdef void *__cuTexObjectGetTextureDesc = NULL{{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}}cdef void *__cuTexObjectGetResourceViewDesc = NULL{{endif}} {{if 'cuSurfObjectCreate' in found_functions}}cdef void *__cuSurfObjectCreate = NULL{{endif}} {{if 'cuSurfObjectDestroy' in found_functions}}cdef void *__cuSurfObjectDestroy = NULL{{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}}cdef void *__cuSurfObjectGetResourceDesc = NULL{{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}}cdef void *__cuTensorMapEncodeTiled = NULL{{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}}cdef void *__cuTensorMapEncodeIm2col = NULL{{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}}cdef void *__cuTensorMapReplaceAddress = NULL{{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}}cdef void *__cuDeviceCanAccessPeer = NULL{{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}}cdef void *__cuCtxEnablePeerAccess = NULL{{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}}cdef void *__cuCtxDisablePeerAccess = NULL{{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}}cdef void *__cuDeviceGetP2PAttribute = NULL{{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}}cdef void *__cuGraphicsUnregisterResource = NULL{{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}}cdef void *__cuGraphicsSubResourceGetMappedArray = NULL{{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}}cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL{{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}}cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL{{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}}cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL{{endif}} {{if 'cuGraphicsMapResources' in found_functions}}cdef void *__cuGraphicsMapResources = NULL{{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}}cdef void *__cuGraphicsUnmapResources = NULL{{endif}} {{if 'cuGetProcAddress_v2' in found_functions}}cdef void *__cuGetProcAddress_v2 = NULL{{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}}cdef void *__cuCoredumpGetAttribute = NULL{{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}}cdef void *__cuCoredumpGetAttributeGlobal = NULL{{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}}cdef void *__cuCoredumpSetAttribute = NULL{{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}}cdef void *__cuCoredumpSetAttributeGlobal = NULL{{endif}} {{if 'cuGetExportTable' in found_functions}}cdef void *__cuGetExportTable = NULL{{endif}} {{if 'cuGreenCtxCreate' in found_functions}}cdef void *__cuGreenCtxCreate = NULL{{endif}} {{if 'cuGreenCtxDestroy' in found_functions}}cdef void *__cuGreenCtxDestroy = NULL{{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}}cdef void *__cuCtxFromGreenCtx = NULL{{endif}} {{if 'cuDeviceGetDevResource' in found_functions}}cdef void *__cuDeviceGetDevResource = NULL{{endif}} {{if 'cuCtxGetDevResource' in found_functions}}cdef void *__cuCtxGetDevResource = NULL{{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}}cdef void *__cuGreenCtxGetDevResource = NULL{{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}}cdef void *__cuDevSmResourceSplitByCount = NULL{{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}}cdef void *__cuDevResourceGenerateDesc = NULL{{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}}cdef void *__cuGreenCtxRecordEvent = NULL{{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}}cdef void *__cuGreenCtxWaitEvent = NULL{{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}}cdef void *__cuStreamGetGreenCtx = NULL{{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}}cdef void *__cuGreenCtxStreamCreate = NULL{{endif}} {{if 'cuProfilerStart' in found_functions}}cdef void *__cuProfilerStart = NULL{{endif}} {{if 'cuProfilerStop' in found_functions}}cdef void *__cuProfilerStop = NULL{{endif}} {{if True}}cdef void *__cuGraphicsEGLRegisterImage = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamConsumerConnect = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamConsumerDisconnect = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamConsumerAcquireFrame = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamConsumerReleaseFrame = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamProducerConnect = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamProducerDisconnect = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamProducerPresentFrame = NULL{{endif}} {{if True}}cdef void *__cuEGLStreamProducerReturnFrame = NULL{{endif}} {{if True}}cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL{{endif}} {{if True}}cdef void *__cuEventCreateFromEGLSync = NULL{{endif}} {{if True}}cdef void *__cuGraphicsGLRegisterBuffer = NULL{{endif}} {{if True}}cdef void *__cuGraphicsGLRegisterImage = NULL{{endif}} {{if True}}cdef void *__cuGLGetDevices_v2 = NULL{{endif}} {{if True}}cdef void *__cuVDPAUGetDevice = NULL{{endif}} {{if True}}cdef void *__cuVDPAUCtxCreate_v2 = NULL{{endif}} {{if True}}cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL{{endif}} {{if True}}cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL{{endif}} cdef int cuPythonInit() except -1 nogil: global __cuPythonInit cdef bint usePTDS if __cuPythonInit: return 0 __cuPythonInit = True with gil: usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0) # Load library cdef char libPath[260] libPath[0] = 0 with gil: status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32) if status == 0 and len(libPath) != 0: path = libPath.decode('utf-8') else: {{if 'Windows' == platform.system()}} path = 'nvcuda.dll' {{else}} path = 'libcuda.so.1' {{endif}} {{if 'Windows' == platform.system()}} LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 try: handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32) except error as e: raise RuntimeError('Failed to LoadLibraryEx ' + path) {{else}} handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) if (handle == NULL): raise RuntimeError('Failed to dlopen ' + path) {{endif}} # Get latest __cuGetProcAddress_v2 {{if 'Windows' == platform.system()}} with gil: try: global __cuGetProcAddress_v2 __cuGetProcAddress_v2 = win32api.GetProcAddress(handle, 'cuGetProcAddress_v2') except: pass {{else}} global __cuGetProcAddress_v2 __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') {{endif}} # Load using cuGetProcAddress if available if __cuGetProcAddress_v2 != NULL: if usePTDS: # Get all PTDS version of functions pass {{if 'cuMemcpy' in found_functions}} global __cuMemcpy cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyPeer' in found_functions}} global __cuMemcpyPeer cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} global __cuMemcpyHtoD_v2 cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} global __cuMemcpyDtoH_v2 cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} global __cuMemcpyDtoD_v2 cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} global __cuMemcpyDtoA_v2 cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} global __cuMemcpyAtoD_v2 cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} global __cuMemcpyHtoA_v2 cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} global __cuMemcpyAtoH_v2 cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} global __cuMemcpyAtoA_v2 cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} global __cuMemcpy2D_v2 cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} global __cuMemcpy2DUnaligned_v2 cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} global __cuMemcpy3D_v2 cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} global __cuMemcpy3DPeer cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyAsync' in found_functions}} global __cuMemcpyAsync cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} global __cuMemcpyPeerAsync cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} global __cuMemcpyHtoDAsync_v2 cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} global __cuMemcpyDtoHAsync_v2 cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} global __cuMemcpyDtoDAsync_v2 cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} global __cuMemcpyHtoAAsync_v2 cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} global __cuMemcpyAtoHAsync_v2 cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} global __cuMemcpy2DAsync_v2 cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} global __cuMemcpy3DAsync_v2 cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} global __cuMemcpy3DPeerAsync cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} global __cuMemsetD16_v2 cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} global __cuMemsetD32_v2 cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} global __cuMemsetD2D8_v2 cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} global __cuMemsetD2D16_v2 cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} global __cuMemsetD2D32_v2 cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD8Async' in found_functions}} global __cuMemsetD8Async cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD16Async' in found_functions}} global __cuMemsetD16Async cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD32Async' in found_functions}} global __cuMemsetD32Async cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} global __cuMemsetD2D8Async cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} global __cuMemsetD2D16Async cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} global __cuMemsetD2D32Async cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemFreeAsync' in found_functions}} global __cuMemFreeAsync cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemAllocAsync' in found_functions}} global __cuMemAllocAsync cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} global __cuMemAllocFromPoolAsync cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} global __cuMemPrefetchAsync cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} global __cuMemPrefetchAsync_v2 cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetPriority' in found_functions}} global __cuStreamGetPriority cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetId' in found_functions}} global __cuStreamGetId cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetCtx' in found_functions}} global __cuStreamGetCtx cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} global __cuStreamGetCtx_v2 cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} global __cuStreamWaitEvent cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamAddCallback' in found_functions}} global __cuStreamAddCallback cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} global __cuStreamBeginCapture_v2 cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} global __cuStreamBeginCaptureToGraph cuGetProcAddress('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamEndCapture' in found_functions}} global __cuStreamEndCapture cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} global __cuStreamIsCapturing cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} global __cuStreamGetCaptureInfo_v2 cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} global __cuStreamGetCaptureInfo_v3 cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} global __cuStreamUpdateCaptureDependencies cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} global __cuStreamUpdateCaptureDependencies_v2 cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} global __cuStreamAttachMemAsync cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamQuery' in found_functions}} global __cuStreamQuery cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamSynchronize' in found_functions}} global __cuStreamSynchronize cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} global __cuStreamCopyAttributes cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} global __cuStreamGetAttribute cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} global __cuStreamSetAttribute cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuEventRecord' in found_functions}} global __cuEventRecord cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} global __cuEventRecordWithFlags cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} global __cuSignalExternalSemaphoresAsync cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} global __cuWaitExternalSemaphoresAsync cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} global __cuStreamWaitValue32_v2 cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} global __cuStreamWaitValue64_v2 cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} global __cuStreamWriteValue32_v2 cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} global __cuStreamWriteValue64_v2 cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} global __cuStreamBatchMemOp_v2 cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuLaunchKernel' in found_functions}} global __cuLaunchKernel cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} global __cuLaunchKernelEx cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} global __cuLaunchCooperativeKernel cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} global __cuLaunchHostFunc cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} global __cuGraphInstantiateWithParams cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuGraphUpload' in found_functions}} global __cuGraphUpload cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuGraphLaunch' in found_functions}} global __cuGraphLaunch cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} global __cuGraphicsMapResources cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} global __cuGraphicsUnmapResources cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} else: # Else get the regular version pass {{if 'cuMemcpy' in found_functions}} global __cuMemcpy cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyPeer' in found_functions}} global __cuMemcpyPeer cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} global __cuMemcpyHtoD_v2 cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} global __cuMemcpyDtoH_v2 cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} global __cuMemcpyDtoD_v2 cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} global __cuMemcpyDtoA_v2 cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} global __cuMemcpyAtoD_v2 cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} global __cuMemcpyHtoA_v2 cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} global __cuMemcpyAtoH_v2 cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} global __cuMemcpyAtoA_v2 cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} global __cuMemcpy2D_v2 cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} global __cuMemcpy2DUnaligned_v2 cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} global __cuMemcpy3D_v2 cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} global __cuMemcpy3DPeer cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyAsync' in found_functions}} global __cuMemcpyAsync cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} global __cuMemcpyPeerAsync cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} global __cuMemcpyHtoDAsync_v2 cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} global __cuMemcpyDtoHAsync_v2 cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} global __cuMemcpyDtoDAsync_v2 cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} global __cuMemcpyHtoAAsync_v2 cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} global __cuMemcpyAtoHAsync_v2 cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} global __cuMemcpy2DAsync_v2 cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} global __cuMemcpy3DAsync_v2 cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} global __cuMemcpy3DPeerAsync cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} global __cuMemsetD16_v2 cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} global __cuMemsetD32_v2 cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} global __cuMemsetD2D8_v2 cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} global __cuMemsetD2D16_v2 cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} global __cuMemsetD2D32_v2 cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD8Async' in found_functions}} global __cuMemsetD8Async cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD16Async' in found_functions}} global __cuMemsetD16Async cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD32Async' in found_functions}} global __cuMemsetD32Async cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} global __cuMemsetD2D8Async cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} global __cuMemsetD2D16Async cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} global __cuMemsetD2D32Async cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemFreeAsync' in found_functions}} global __cuMemFreeAsync cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAllocAsync' in found_functions}} global __cuMemAllocAsync cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} global __cuMemAllocFromPoolAsync cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} global __cuMemPrefetchAsync cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} global __cuMemPrefetchAsync_v2 cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetPriority' in found_functions}} global __cuStreamGetPriority cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetId' in found_functions}} global __cuStreamGetId cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetCtx' in found_functions}} global __cuStreamGetCtx cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} global __cuStreamGetCtx_v2 cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} global __cuStreamWaitEvent cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamAddCallback' in found_functions}} global __cuStreamAddCallback cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} global __cuStreamBeginCapture_v2 cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} global __cuStreamBeginCaptureToGraph cuGetProcAddress('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamEndCapture' in found_functions}} global __cuStreamEndCapture cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} global __cuStreamIsCapturing cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} global __cuStreamGetCaptureInfo_v2 cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} global __cuStreamGetCaptureInfo_v3 cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} global __cuStreamUpdateCaptureDependencies cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} global __cuStreamUpdateCaptureDependencies_v2 cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} global __cuStreamAttachMemAsync cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamQuery' in found_functions}} global __cuStreamQuery cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamSynchronize' in found_functions}} global __cuStreamSynchronize cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} global __cuStreamCopyAttributes cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} global __cuStreamGetAttribute cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} global __cuStreamSetAttribute cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuEventRecord' in found_functions}} global __cuEventRecord cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} global __cuEventRecordWithFlags cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} global __cuSignalExternalSemaphoresAsync cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} global __cuWaitExternalSemaphoresAsync cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} global __cuStreamWaitValue32_v2 cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} global __cuStreamWaitValue64_v2 cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} global __cuStreamWriteValue32_v2 cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} global __cuStreamWriteValue64_v2 cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} global __cuStreamBatchMemOp_v2 cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunchKernel' in found_functions}} global __cuLaunchKernel cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} global __cuLaunchKernelEx cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} global __cuLaunchCooperativeKernel cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} global __cuLaunchHostFunc cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} global __cuGraphInstantiateWithParams cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphUpload' in found_functions}} global __cuGraphUpload cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphLaunch' in found_functions}} global __cuGraphLaunch cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} global __cuGraphicsMapResources cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} global __cuGraphicsUnmapResources cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} # Get remaining functions {{if 'cuGetErrorString' in found_functions}} global __cuGetErrorString cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGetErrorName' in found_functions}} global __cuGetErrorName cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuInit' in found_functions}} global __cuInit cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDriverGetVersion' in found_functions}} global __cuDriverGetVersion cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGet' in found_functions}} global __cuDeviceGet cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetCount' in found_functions}} global __cuDeviceGetCount cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetName' in found_functions}} global __cuDeviceGetName cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetUuid' in found_functions}} global __cuDeviceGetUuid cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}} global __cuDeviceGetUuid_v2 cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetLuid' in found_functions}} global __cuDeviceGetLuid cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}} global __cuDeviceTotalMem_v2 cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}} global __cuDeviceGetTexture1DLinearMaxWidth cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetAttribute' in found_functions}} global __cuDeviceGetAttribute cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}} global __cuDeviceGetNvSciSyncAttributes cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceSetMemPool' in found_functions}} global __cuDeviceSetMemPool cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetMemPool' in found_functions}} global __cuDeviceGetMemPool cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}} global __cuDeviceGetDefaultMemPool cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}} global __cuDeviceGetExecAffinitySupport cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}} global __cuFlushGPUDirectRDMAWrites cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetProperties' in found_functions}} global __cuDeviceGetProperties cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceComputeCapability' in found_functions}} global __cuDeviceComputeCapability cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}} global __cuDevicePrimaryCtxRetain cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}} global __cuDevicePrimaryCtxRelease_v2 cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}} global __cuDevicePrimaryCtxSetFlags_v2 cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}} global __cuDevicePrimaryCtxGetState cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}} global __cuDevicePrimaryCtxReset_v2 cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxCreate_v2' in found_functions}} global __cuCtxCreate_v2 cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxCreate_v3' in found_functions}} global __cuCtxCreate_v3 cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxCreate_v4' in found_functions}} global __cuCtxCreate_v4 cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v4, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxDestroy_v2' in found_functions}} global __cuCtxDestroy_v2 cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}} global __cuCtxPushCurrent_v2 cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}} global __cuCtxPopCurrent_v2 cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxSetCurrent' in found_functions}} global __cuCtxSetCurrent cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetCurrent' in found_functions}} global __cuCtxGetCurrent cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetDevice' in found_functions}} global __cuCtxGetDevice cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetFlags' in found_functions}} global __cuCtxGetFlags cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxSetFlags' in found_functions}} global __cuCtxSetFlags cuGetProcAddress('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetId' in found_functions}} global __cuCtxGetId cuGetProcAddress('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxSynchronize' in found_functions}} global __cuCtxSynchronize cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxSetLimit' in found_functions}} global __cuCtxSetLimit cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetLimit' in found_functions}} global __cuCtxGetLimit cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}} global __cuCtxGetCacheConfig cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}} global __cuCtxSetCacheConfig cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetApiVersion' in found_functions}} global __cuCtxGetApiVersion cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}} global __cuCtxGetStreamPriorityRange cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}} global __cuCtxResetPersistingL2Cache cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}} global __cuCtxGetExecAffinity cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxRecordEvent' in found_functions}} global __cuCtxRecordEvent cuGetProcAddress('cuCtxRecordEvent', &__cuCtxRecordEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxWaitEvent' in found_functions}} global __cuCtxWaitEvent cuGetProcAddress('cuCtxWaitEvent', &__cuCtxWaitEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxAttach' in found_functions}} global __cuCtxAttach cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxDetach' in found_functions}} global __cuCtxDetach cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}} global __cuCtxGetSharedMemConfig cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}} global __cuCtxSetSharedMemConfig cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleLoad' in found_functions}} global __cuModuleLoad cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleLoadData' in found_functions}} global __cuModuleLoadData cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleLoadDataEx' in found_functions}} global __cuModuleLoadDataEx cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}} global __cuModuleLoadFatBinary cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleUnload' in found_functions}} global __cuModuleUnload cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}} global __cuModuleGetLoadingMode cuGetProcAddress('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleGetFunction' in found_functions}} global __cuModuleGetFunction cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}} global __cuModuleGetFunctionCount cuGetProcAddress('cuModuleGetFunctionCount', &__cuModuleGetFunctionCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}} global __cuModuleEnumerateFunctions cuGetProcAddress('cuModuleEnumerateFunctions', &__cuModuleEnumerateFunctions, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}} global __cuModuleGetGlobal_v2 cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLinkCreate_v2' in found_functions}} global __cuLinkCreate_v2 cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLinkAddData_v2' in found_functions}} global __cuLinkAddData_v2 cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLinkAddFile_v2' in found_functions}} global __cuLinkAddFile_v2 cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLinkComplete' in found_functions}} global __cuLinkComplete cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLinkDestroy' in found_functions}} global __cuLinkDestroy cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleGetTexRef' in found_functions}} global __cuModuleGetTexRef cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuModuleGetSurfRef' in found_functions}} global __cuModuleGetSurfRef cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryLoadData' in found_functions}} global __cuLibraryLoadData cuGetProcAddress('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}} global __cuLibraryLoadFromFile cuGetProcAddress('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryUnload' in found_functions}} global __cuLibraryUnload cuGetProcAddress('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryGetKernel' in found_functions}} global __cuLibraryGetKernel cuGetProcAddress('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}} global __cuLibraryGetKernelCount cuGetProcAddress('cuLibraryGetKernelCount', &__cuLibraryGetKernelCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}} global __cuLibraryEnumerateKernels cuGetProcAddress('cuLibraryEnumerateKernels', &__cuLibraryEnumerateKernels, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryGetModule' in found_functions}} global __cuLibraryGetModule cuGetProcAddress('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuKernelGetFunction' in found_functions}} global __cuKernelGetFunction cuGetProcAddress('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuKernelGetLibrary' in found_functions}} global __cuKernelGetLibrary cuGetProcAddress('cuKernelGetLibrary', &__cuKernelGetLibrary, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryGetGlobal' in found_functions}} global __cuLibraryGetGlobal cuGetProcAddress('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryGetManaged' in found_functions}} global __cuLibraryGetManaged cuGetProcAddress('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}} global __cuLibraryGetUnifiedFunction cuGetProcAddress('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuKernelGetAttribute' in found_functions}} global __cuKernelGetAttribute cuGetProcAddress('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuKernelSetAttribute' in found_functions}} global __cuKernelSetAttribute cuGetProcAddress('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}} global __cuKernelSetCacheConfig cuGetProcAddress('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuKernelGetName' in found_functions}} global __cuKernelGetName cuGetProcAddress('cuKernelGetName', &__cuKernelGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuKernelGetParamInfo' in found_functions}} global __cuKernelGetParamInfo cuGetProcAddress('cuKernelGetParamInfo', &__cuKernelGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemGetInfo_v2' in found_functions}} global __cuMemGetInfo_v2 cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAlloc_v2' in found_functions}} global __cuMemAlloc_v2 cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}} global __cuMemAllocPitch_v2 cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemFree_v2' in found_functions}} global __cuMemFree_v2 cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}} global __cuMemGetAddressRange_v2 cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAllocHost_v2' in found_functions}} global __cuMemAllocHost_v2 cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemFreeHost' in found_functions}} global __cuMemFreeHost cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemHostAlloc' in found_functions}} global __cuMemHostAlloc cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}} global __cuMemHostGetDevicePointer_v2 cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemHostGetFlags' in found_functions}} global __cuMemHostGetFlags cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAllocManaged' in found_functions}} global __cuMemAllocManaged cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}} global __cuDeviceRegisterAsyncNotification cuGetProcAddress('cuDeviceRegisterAsyncNotification', &__cuDeviceRegisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}} global __cuDeviceUnregisterAsyncNotification cuGetProcAddress('cuDeviceUnregisterAsyncNotification', &__cuDeviceUnregisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}} global __cuDeviceGetByPCIBusId cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}} global __cuDeviceGetPCIBusId cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuIpcGetEventHandle' in found_functions}} global __cuIpcGetEventHandle cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}} global __cuIpcOpenEventHandle cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuIpcGetMemHandle' in found_functions}} global __cuIpcGetMemHandle cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}} global __cuIpcOpenMemHandle_v2 cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}} global __cuIpcCloseMemHandle cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemHostRegister_v2' in found_functions}} global __cuMemHostRegister_v2 cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemHostUnregister' in found_functions}} global __cuMemHostUnregister cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArrayCreate_v2' in found_functions}} global __cuArrayCreate_v2 cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}} global __cuArrayGetDescriptor_v2 cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}} global __cuArrayGetSparseProperties cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}} global __cuMipmappedArrayGetSparseProperties cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}} global __cuArrayGetMemoryRequirements cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}} global __cuMipmappedArrayGetMemoryRequirements cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArrayGetPlane' in found_functions}} global __cuArrayGetPlane cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArrayDestroy' in found_functions}} global __cuArrayDestroy cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArray3DCreate_v2' in found_functions}} global __cuArray3DCreate_v2 cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}} global __cuArray3DGetDescriptor_v2 cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}} global __cuMipmappedArrayCreate cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}} global __cuMipmappedArrayGetLevel cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}} global __cuMipmappedArrayDestroy cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}} global __cuMemGetHandleForAddressRange cuGetProcAddress('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAddressReserve' in found_functions}} global __cuMemAddressReserve cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAddressFree' in found_functions}} global __cuMemAddressFree cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemCreate' in found_functions}} global __cuMemCreate cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemRelease' in found_functions}} global __cuMemRelease cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemMap' in found_functions}} global __cuMemMap cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemUnmap' in found_functions}} global __cuMemUnmap cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemSetAccess' in found_functions}} global __cuMemSetAccess cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemGetAccess' in found_functions}} global __cuMemGetAccess cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}} global __cuMemExportToShareableHandle cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}} global __cuMemImportFromShareableHandle cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}} global __cuMemGetAllocationGranularity cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}} global __cuMemGetAllocationPropertiesFromHandle cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}} global __cuMemRetainAllocationHandle cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolTrimTo' in found_functions}} global __cuMemPoolTrimTo cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}} global __cuMemPoolSetAttribute cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}} global __cuMemPoolGetAttribute cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolSetAccess' in found_functions}} global __cuMemPoolSetAccess cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolGetAccess' in found_functions}} global __cuMemPoolGetAccess cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolCreate' in found_functions}} global __cuMemPoolCreate cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolDestroy' in found_functions}} global __cuMemPoolDestroy cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}} global __cuMemPoolExportToShareableHandle cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}} global __cuMemPoolImportFromShareableHandle cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolExportPointer' in found_functions}} global __cuMemPoolExportPointer cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemPoolImportPointer' in found_functions}} global __cuMemPoolImportPointer cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMulticastCreate' in found_functions}} global __cuMulticastCreate cuGetProcAddress('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMulticastAddDevice' in found_functions}} global __cuMulticastAddDevice cuGetProcAddress('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMulticastBindMem' in found_functions}} global __cuMulticastBindMem cuGetProcAddress('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMulticastBindAddr' in found_functions}} global __cuMulticastBindAddr cuGetProcAddress('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMulticastUnbind' in found_functions}} global __cuMulticastUnbind cuGetProcAddress('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMulticastGetGranularity' in found_functions}} global __cuMulticastGetGranularity cuGetProcAddress('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuPointerGetAttribute' in found_functions}} global __cuPointerGetAttribute cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAdvise' in found_functions}} global __cuMemAdvise cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemAdvise_v2' in found_functions}} global __cuMemAdvise_v2 cuGetProcAddress('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}} global __cuMemRangeGetAttribute cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}} global __cuMemRangeGetAttributes cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuPointerSetAttribute' in found_functions}} global __cuPointerSetAttribute cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuPointerGetAttributes' in found_functions}} global __cuPointerGetAttributes cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamCreate' in found_functions}} global __cuStreamCreate cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}} global __cuStreamCreateWithPriority cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}} global __cuThreadExchangeStreamCaptureMode cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamDestroy_v2' in found_functions}} global __cuStreamDestroy_v2 cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuEventCreate' in found_functions}} global __cuEventCreate cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuEventQuery' in found_functions}} global __cuEventQuery cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuEventSynchronize' in found_functions}} global __cuEventSynchronize cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuEventDestroy_v2' in found_functions}} global __cuEventDestroy_v2 cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuEventElapsedTime' in found_functions}} global __cuEventElapsedTime cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuImportExternalMemory' in found_functions}} global __cuImportExternalMemory cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}} global __cuExternalMemoryGetMappedBuffer cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}} global __cuExternalMemoryGetMappedMipmappedArray cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDestroyExternalMemory' in found_functions}} global __cuDestroyExternalMemory cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuImportExternalSemaphore' in found_functions}} global __cuImportExternalSemaphore cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}} global __cuDestroyExternalSemaphore cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncGetAttribute' in found_functions}} global __cuFuncGetAttribute cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncSetAttribute' in found_functions}} global __cuFuncSetAttribute cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}} global __cuFuncSetCacheConfig cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncGetModule' in found_functions}} global __cuFuncGetModule cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncGetName' in found_functions}} global __cuFuncGetName cuGetProcAddress('cuFuncGetName', &__cuFuncGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncGetParamInfo' in found_functions}} global __cuFuncGetParamInfo cuGetProcAddress('cuFuncGetParamInfo', &__cuFuncGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncIsLoaded' in found_functions}} global __cuFuncIsLoaded cuGetProcAddress('cuFuncIsLoaded', &__cuFuncIsLoaded, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncLoad' in found_functions}} global __cuFuncLoad cuGetProcAddress('cuFuncLoad', &__cuFuncLoad, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}} global __cuLaunchCooperativeKernelMultiDevice cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncSetBlockShape' in found_functions}} global __cuFuncSetBlockShape cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncSetSharedSize' in found_functions}} global __cuFuncSetSharedSize cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuParamSetSize' in found_functions}} global __cuParamSetSize cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuParamSeti' in found_functions}} global __cuParamSeti cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuParamSetf' in found_functions}} global __cuParamSetf cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuParamSetv' in found_functions}} global __cuParamSetv cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunch' in found_functions}} global __cuLaunch cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunchGrid' in found_functions}} global __cuLaunchGrid cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuLaunchGridAsync' in found_functions}} global __cuLaunchGridAsync cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuParamSetTexRef' in found_functions}} global __cuParamSetTexRef cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}} global __cuFuncSetSharedMemConfig cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphCreate' in found_functions}} global __cuGraphCreate cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}} global __cuGraphAddKernelNode_v2 cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}} global __cuGraphKernelNodeGetParams_v2 cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}} global __cuGraphKernelNodeSetParams_v2 cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}} global __cuGraphAddMemcpyNode cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}} global __cuGraphMemcpyNodeGetParams cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}} global __cuGraphMemcpyNodeSetParams cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}} global __cuGraphAddMemsetNode cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}} global __cuGraphMemsetNodeGetParams cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}} global __cuGraphMemsetNodeSetParams cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddHostNode' in found_functions}} global __cuGraphAddHostNode cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}} global __cuGraphHostNodeGetParams cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}} global __cuGraphHostNodeSetParams cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}} global __cuGraphAddChildGraphNode cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}} global __cuGraphChildGraphNodeGetGraph cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}} global __cuGraphAddEmptyNode cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}} global __cuGraphAddEventRecordNode cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}} global __cuGraphEventRecordNodeGetEvent cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}} global __cuGraphEventRecordNodeSetEvent cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}} global __cuGraphAddEventWaitNode cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}} global __cuGraphEventWaitNodeGetEvent cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} global __cuGraphEventWaitNodeSetEvent cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}} global __cuGraphAddExternalSemaphoresSignalNode cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} global __cuGraphExternalSemaphoresSignalNodeGetParams cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} global __cuGraphExternalSemaphoresSignalNodeSetParams cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}} global __cuGraphAddExternalSemaphoresWaitNode cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} global __cuGraphExternalSemaphoresWaitNodeGetParams cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} global __cuGraphExternalSemaphoresWaitNodeSetParams cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}} global __cuGraphAddBatchMemOpNode cuGetProcAddress('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}} global __cuGraphBatchMemOpNodeGetParams cuGetProcAddress('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}} global __cuGraphBatchMemOpNodeSetParams cuGetProcAddress('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}} global __cuGraphExecBatchMemOpNodeSetParams cuGetProcAddress('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}} global __cuGraphAddMemAllocNode cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}} global __cuGraphMemAllocNodeGetParams cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}} global __cuGraphAddMemFreeNode cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}} global __cuGraphMemFreeNodeGetParams cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}} global __cuDeviceGraphMemTrim cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}} global __cuDeviceGetGraphMemAttribute cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}} global __cuDeviceSetGraphMemAttribute cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphClone' in found_functions}} global __cuGraphClone cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}} global __cuGraphNodeFindInClone cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeGetType' in found_functions}} global __cuGraphNodeGetType cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphGetNodes' in found_functions}} global __cuGraphGetNodes cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphGetRootNodes' in found_functions}} global __cuGraphGetRootNodes cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphGetEdges' in found_functions}} global __cuGraphGetEdges cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}} global __cuGraphGetEdges_v2 cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeGetDependencies' in found_functions}} global __cuGraphNodeGetDependencies cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}} global __cuGraphNodeGetDependencies_v2 cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeGetDependentNodes' in found_functions}} global __cuGraphNodeGetDependentNodes cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}} global __cuGraphNodeGetDependentNodes_v2 cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddDependencies' in found_functions}} global __cuGraphAddDependencies cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}} global __cuGraphAddDependencies_v2 cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphRemoveDependencies' in found_functions}} global __cuGraphRemoveDependencies cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}} global __cuGraphRemoveDependencies_v2 cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphDestroyNode' in found_functions}} global __cuGraphDestroyNode cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}} global __cuGraphInstantiateWithFlags cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecGetFlags' in found_functions}} global __cuGraphExecGetFlags cuGetProcAddress('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}} global __cuGraphExecKernelNodeSetParams_v2 cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}} global __cuGraphExecMemcpyNodeSetParams cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}} global __cuGraphExecMemsetNodeSetParams cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}} global __cuGraphExecHostNodeSetParams cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}} global __cuGraphExecChildGraphNodeSetParams cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}} global __cuGraphExecEventRecordNodeSetEvent cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}} global __cuGraphExecEventWaitNodeSetEvent cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} global __cuGraphExecExternalSemaphoresSignalNodeSetParams cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} global __cuGraphExecExternalSemaphoresWaitNodeSetParams cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}} global __cuGraphNodeSetEnabled cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}} global __cuGraphNodeGetEnabled cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecDestroy' in found_functions}} global __cuGraphExecDestroy cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphDestroy' in found_functions}} global __cuGraphDestroy cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}} global __cuGraphExecUpdate_v2 cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}} global __cuGraphKernelNodeCopyAttributes cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}} global __cuGraphKernelNodeGetAttribute cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}} global __cuGraphKernelNodeSetAttribute cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}} global __cuGraphDebugDotPrint cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuUserObjectCreate' in found_functions}} global __cuUserObjectCreate cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuUserObjectRetain' in found_functions}} global __cuUserObjectRetain cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuUserObjectRelease' in found_functions}} global __cuUserObjectRelease cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphRetainUserObject' in found_functions}} global __cuGraphRetainUserObject cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}} global __cuGraphReleaseUserObject cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddNode' in found_functions}} global __cuGraphAddNode cuGetProcAddress('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphAddNode_v2' in found_functions}} global __cuGraphAddNode_v2 cuGetProcAddress('cuGraphAddNode', &__cuGraphAddNode_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphNodeSetParams' in found_functions}} global __cuGraphNodeSetParams cuGetProcAddress('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}} global __cuGraphExecNodeSetParams cuGetProcAddress('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}} global __cuGraphConditionalHandleCreate cuGetProcAddress('cuGraphConditionalHandleCreate', &__cuGraphConditionalHandleCreate, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} global __cuOccupancyMaxActiveBlocksPerMultiprocessor cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}} global __cuOccupancyMaxPotentialBlockSize cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}} global __cuOccupancyMaxPotentialBlockSizeWithFlags cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}} global __cuOccupancyAvailableDynamicSMemPerBlock cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}} global __cuOccupancyMaxPotentialClusterSize cuGetProcAddress('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}} global __cuOccupancyMaxActiveClusters cuGetProcAddress('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetArray' in found_functions}} global __cuTexRefSetArray cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}} global __cuTexRefSetMipmappedArray cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}} global __cuTexRefSetAddress_v2 cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}} global __cuTexRefSetAddress2D_v3 cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetFormat' in found_functions}} global __cuTexRefSetFormat cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}} global __cuTexRefSetAddressMode cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}} global __cuTexRefSetFilterMode cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}} global __cuTexRefSetMipmapFilterMode cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}} global __cuTexRefSetMipmapLevelBias cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}} global __cuTexRefSetMipmapLevelClamp cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}} global __cuTexRefSetMaxAnisotropy cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}} global __cuTexRefSetBorderColor cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefSetFlags' in found_functions}} global __cuTexRefSetFlags cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}} global __cuTexRefGetAddress_v2 cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetArray' in found_functions}} global __cuTexRefGetArray cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}} global __cuTexRefGetMipmappedArray cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}} global __cuTexRefGetAddressMode cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}} global __cuTexRefGetFilterMode cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetFormat' in found_functions}} global __cuTexRefGetFormat cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}} global __cuTexRefGetMipmapFilterMode cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}} global __cuTexRefGetMipmapLevelBias cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}} global __cuTexRefGetMipmapLevelClamp cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}} global __cuTexRefGetMaxAnisotropy cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}} global __cuTexRefGetBorderColor cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefGetFlags' in found_functions}} global __cuTexRefGetFlags cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefCreate' in found_functions}} global __cuTexRefCreate cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexRefDestroy' in found_functions}} global __cuTexRefDestroy cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuSurfRefSetArray' in found_functions}} global __cuSurfRefSetArray cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuSurfRefGetArray' in found_functions}} global __cuSurfRefGetArray cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexObjectCreate' in found_functions}} global __cuTexObjectCreate cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexObjectDestroy' in found_functions}} global __cuTexObjectDestroy cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}} global __cuTexObjectGetResourceDesc cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}} global __cuTexObjectGetTextureDesc cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}} global __cuTexObjectGetResourceViewDesc cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuSurfObjectCreate' in found_functions}} global __cuSurfObjectCreate cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuSurfObjectDestroy' in found_functions}} global __cuSurfObjectDestroy cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}} global __cuSurfObjectGetResourceDesc cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}} global __cuTensorMapEncodeTiled cuGetProcAddress('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}} global __cuTensorMapEncodeIm2col cuGetProcAddress('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} global __cuTensorMapReplaceAddress cuGetProcAddress('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}} global __cuDeviceCanAccessPeer cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}} global __cuCtxEnablePeerAccess cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}} global __cuCtxDisablePeerAccess cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}} global __cuDeviceGetP2PAttribute cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}} global __cuGraphicsUnregisterResource cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}} global __cuGraphicsSubResourceGetMappedArray cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}} global __cuGraphicsResourceGetMappedMipmappedArray cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}} global __cuGraphicsResourceGetMappedPointer_v2 cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}} global __cuGraphicsResourceSetMapFlags_v2 cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGetProcAddress_v2' in found_functions}} global __cuGetProcAddress_v2 cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}} global __cuCoredumpGetAttribute cuGetProcAddress('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}} global __cuCoredumpGetAttributeGlobal cuGetProcAddress('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}} global __cuCoredumpSetAttribute cuGetProcAddress('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}} global __cuCoredumpSetAttributeGlobal cuGetProcAddress('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGetExportTable' in found_functions}} global __cuGetExportTable cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGreenCtxCreate' in found_functions}} global __cuGreenCtxCreate cuGetProcAddress('cuGreenCtxCreate', &__cuGreenCtxCreate, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGreenCtxDestroy' in found_functions}} global __cuGreenCtxDestroy cuGetProcAddress('cuGreenCtxDestroy', &__cuGreenCtxDestroy, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}} global __cuCtxFromGreenCtx cuGetProcAddress('cuCtxFromGreenCtx', &__cuCtxFromGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDeviceGetDevResource' in found_functions}} global __cuDeviceGetDevResource cuGetProcAddress('cuDeviceGetDevResource', &__cuDeviceGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuCtxGetDevResource' in found_functions}} global __cuCtxGetDevResource cuGetProcAddress('cuCtxGetDevResource', &__cuCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}} global __cuGreenCtxGetDevResource cuGetProcAddress('cuGreenCtxGetDevResource', &__cuGreenCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}} global __cuDevSmResourceSplitByCount cuGetProcAddress('cuDevSmResourceSplitByCount', &__cuDevSmResourceSplitByCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}} global __cuDevResourceGenerateDesc cuGetProcAddress('cuDevResourceGenerateDesc', &__cuDevResourceGenerateDesc, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}} global __cuGreenCtxRecordEvent cuGetProcAddress('cuGreenCtxRecordEvent', &__cuGreenCtxRecordEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}} global __cuGreenCtxWaitEvent cuGetProcAddress('cuGreenCtxWaitEvent', &__cuGreenCtxWaitEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}} global __cuStreamGetGreenCtx cuGetProcAddress('cuStreamGetGreenCtx', &__cuStreamGetGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}} global __cuGreenCtxStreamCreate cuGetProcAddress('cuGreenCtxStreamCreate', &__cuGreenCtxStreamCreate, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuProfilerStart' in found_functions}} global __cuProfilerStart cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if 'cuProfilerStop' in found_functions}} global __cuProfilerStop cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuGraphicsEGLRegisterImage cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamConsumerConnect cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamConsumerConnectWithFlags cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamConsumerDisconnect cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamConsumerAcquireFrame cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamConsumerReleaseFrame cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamProducerConnect cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamProducerDisconnect cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamProducerPresentFrame cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEGLStreamProducerReturnFrame cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuGraphicsResourceGetMappedEglFrame cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuEventCreateFromEGLSync cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuGraphicsGLRegisterBuffer cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuGraphicsGLRegisterImage cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuGLGetDevices_v2 cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuVDPAUGetDevice cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuVDPAUCtxCreate_v2 cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuGraphicsVDPAURegisterVideoSurface cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} {{if True}} global __cuGraphicsVDPAURegisterOutputSurface cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} return 0 {{if 'Windows' == platform.system()}} # Load using win32GetAddr with gil: if usePTDS: # Get all PTDS version of functions pass {{if 'cuMemcpy' in found_functions}} try: global __cuMemcpy __cuMemcpy = win32api.GetProcAddress(handle, 'cuMemcpy_ptds') except: pass {{endif}} {{if 'cuMemcpyPeer' in found_functions}} try: global __cuMemcpyPeer __cuMemcpyPeer = win32api.GetProcAddress(handle, 'cuMemcpyPeer_ptds') except: pass {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} try: global __cuMemcpyHtoD_v2 __cuMemcpyHtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2_ptds') except: pass {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} try: global __cuMemcpyDtoH_v2 __cuMemcpyDtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2_ptds') except: pass {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} try: global __cuMemcpyDtoD_v2 __cuMemcpyDtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2_ptds') except: pass {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} try: global __cuMemcpyDtoA_v2 __cuMemcpyDtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2_ptds') except: pass {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} try: global __cuMemcpyAtoD_v2 __cuMemcpyAtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2_ptds') except: pass {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} try: global __cuMemcpyHtoA_v2 __cuMemcpyHtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2_ptds') except: pass {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} try: global __cuMemcpyAtoH_v2 __cuMemcpyAtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2_ptds') except: pass {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} try: global __cuMemcpyAtoA_v2 __cuMemcpyAtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2_ptds') except: pass {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} try: global __cuMemcpy2D_v2 __cuMemcpy2D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2D_v2_ptds') except: pass {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} try: global __cuMemcpy2DUnaligned_v2 __cuMemcpy2DUnaligned_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2_ptds') except: pass {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} try: global __cuMemcpy3D_v2 __cuMemcpy3D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3D_v2_ptds') except: pass {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} try: global __cuMemcpy3DPeer __cuMemcpy3DPeer = win32api.GetProcAddress(handle, 'cuMemcpy3DPeer_ptds') except: pass {{endif}} {{if 'cuMemcpyAsync' in found_functions}} try: global __cuMemcpyAsync __cuMemcpyAsync = win32api.GetProcAddress(handle, 'cuMemcpyAsync_ptsz') except: pass {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} try: global __cuMemcpyPeerAsync __cuMemcpyPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync_ptsz') except: pass {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} try: global __cuMemcpyHtoDAsync_v2 __cuMemcpyHtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2_ptsz') except: pass {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} try: global __cuMemcpyDtoHAsync_v2 __cuMemcpyDtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2_ptsz') except: pass {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} try: global __cuMemcpyDtoDAsync_v2 __cuMemcpyDtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2_ptsz') except: pass {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} try: global __cuMemcpyHtoAAsync_v2 __cuMemcpyHtoAAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2_ptsz') except: pass {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} try: global __cuMemcpyAtoHAsync_v2 __cuMemcpyAtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2_ptsz') except: pass {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} try: global __cuMemcpy2DAsync_v2 __cuMemcpy2DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2_ptsz') except: pass {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} try: global __cuMemcpy3DAsync_v2 __cuMemcpy3DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2_ptsz') except: pass {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} try: global __cuMemcpy3DPeerAsync __cuMemcpy3DPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync_ptsz') except: pass {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} try: global __cuMemsetD8_v2 __cuMemsetD8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD8_v2_ptds') except: pass {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} try: global __cuMemsetD16_v2 __cuMemsetD16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD16_v2_ptds') except: pass {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} try: global __cuMemsetD32_v2 __cuMemsetD32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD32_v2_ptds') except: pass {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} try: global __cuMemsetD2D8_v2 __cuMemsetD2D8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2_ptds') except: pass {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} try: global __cuMemsetD2D16_v2 __cuMemsetD2D16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2_ptds') except: pass {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} try: global __cuMemsetD2D32_v2 __cuMemsetD2D32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2_ptds') except: pass {{endif}} {{if 'cuMemsetD8Async' in found_functions}} try: global __cuMemsetD8Async __cuMemsetD8Async = win32api.GetProcAddress(handle, 'cuMemsetD8Async_ptsz') except: pass {{endif}} {{if 'cuMemsetD16Async' in found_functions}} try: global __cuMemsetD16Async __cuMemsetD16Async = win32api.GetProcAddress(handle, 'cuMemsetD16Async_ptsz') except: pass {{endif}} {{if 'cuMemsetD32Async' in found_functions}} try: global __cuMemsetD32Async __cuMemsetD32Async = win32api.GetProcAddress(handle, 'cuMemsetD32Async_ptsz') except: pass {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} try: global __cuMemsetD2D8Async __cuMemsetD2D8Async = win32api.GetProcAddress(handle, 'cuMemsetD2D8Async_ptsz') except: pass {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} try: global __cuMemsetD2D16Async __cuMemsetD2D16Async = win32api.GetProcAddress(handle, 'cuMemsetD2D16Async_ptsz') except: pass {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} try: global __cuMemsetD2D32Async __cuMemsetD2D32Async = win32api.GetProcAddress(handle, 'cuMemsetD2D32Async_ptsz') except: pass {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} try: global __cuMemMapArrayAsync __cuMemMapArrayAsync = win32api.GetProcAddress(handle, 'cuMemMapArrayAsync_ptsz') except: pass {{endif}} {{if 'cuMemFreeAsync' in found_functions}} try: global __cuMemFreeAsync __cuMemFreeAsync = win32api.GetProcAddress(handle, 'cuMemFreeAsync_ptsz') except: pass {{endif}} {{if 'cuMemAllocAsync' in found_functions}} try: global __cuMemAllocAsync __cuMemAllocAsync = win32api.GetProcAddress(handle, 'cuMemAllocAsync_ptsz') except: pass {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} try: global __cuMemAllocFromPoolAsync __cuMemAllocFromPoolAsync = win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync_ptsz') except: pass {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} try: global __cuMemPrefetchAsync __cuMemPrefetchAsync = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_ptsz') except: pass {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} try: global __cuMemPrefetchAsync_v2 __cuMemPrefetchAsync_v2 = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2_ptsz') except: pass {{endif}} {{if 'cuStreamGetPriority' in found_functions}} try: global __cuStreamGetPriority __cuStreamGetPriority = win32api.GetProcAddress(handle, 'cuStreamGetPriority_ptsz') except: pass {{endif}} {{if 'cuStreamGetFlags' in found_functions}} try: global __cuStreamGetFlags __cuStreamGetFlags = win32api.GetProcAddress(handle, 'cuStreamGetFlags_ptsz') except: pass {{endif}} {{if 'cuStreamGetId' in found_functions}} try: global __cuStreamGetId __cuStreamGetId = win32api.GetProcAddress(handle, 'cuStreamGetId_ptsz') except: pass {{endif}} {{if 'cuStreamGetCtx' in found_functions}} try: global __cuStreamGetCtx __cuStreamGetCtx = win32api.GetProcAddress(handle, 'cuStreamGetCtx_ptsz') except: pass {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} try: global __cuStreamGetCtx_v2 __cuStreamGetCtx_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCtx_v2_ptsz') except: pass {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} try: global __cuStreamWaitEvent __cuStreamWaitEvent = win32api.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz') except: pass {{endif}} {{if 'cuStreamAddCallback' in found_functions}} try: global __cuStreamAddCallback __cuStreamAddCallback = win32api.GetProcAddress(handle, 'cuStreamAddCallback_ptsz') except: pass {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} try: global __cuStreamBeginCapture_v2 __cuStreamBeginCapture_v2 = win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz') except: pass {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} try: global __cuStreamBeginCaptureToGraph __cuStreamBeginCaptureToGraph = win32api.GetProcAddress(handle, 'cuStreamBeginCaptureToGraph_ptsz') except: pass {{endif}} {{if 'cuStreamEndCapture' in found_functions}} try: global __cuStreamEndCapture __cuStreamEndCapture = win32api.GetProcAddress(handle, 'cuStreamEndCapture_ptsz') except: pass {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} try: global __cuStreamIsCapturing __cuStreamIsCapturing = win32api.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz') except: pass {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} try: global __cuStreamGetCaptureInfo_v2 __cuStreamGetCaptureInfo_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz') except: pass {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} try: global __cuStreamGetCaptureInfo_v3 __cuStreamGetCaptureInfo_v3 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v3_ptsz') except: pass {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} try: global __cuStreamUpdateCaptureDependencies __cuStreamUpdateCaptureDependencies = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz') except: pass {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} try: global __cuStreamUpdateCaptureDependencies_v2 __cuStreamUpdateCaptureDependencies_v2 = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') except: pass {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} try: global __cuStreamAttachMemAsync __cuStreamAttachMemAsync = win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz') except: pass {{endif}} {{if 'cuStreamQuery' in found_functions}} try: global __cuStreamQuery __cuStreamQuery = win32api.GetProcAddress(handle, 'cuStreamQuery_ptsz') except: pass {{endif}} {{if 'cuStreamSynchronize' in found_functions}} try: global __cuStreamSynchronize __cuStreamSynchronize = win32api.GetProcAddress(handle, 'cuStreamSynchronize_ptsz') except: pass {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} try: global __cuStreamCopyAttributes __cuStreamCopyAttributes = win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz') except: pass {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} try: global __cuStreamGetAttribute __cuStreamGetAttribute = win32api.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz') except: pass {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} try: global __cuStreamSetAttribute __cuStreamSetAttribute = win32api.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz') except: pass {{endif}} {{if 'cuEventRecord' in found_functions}} try: global __cuEventRecord __cuEventRecord = win32api.GetProcAddress(handle, 'cuEventRecord_ptsz') except: pass {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} try: global __cuEventRecordWithFlags __cuEventRecordWithFlags = win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz') except: pass {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} try: global __cuSignalExternalSemaphoresAsync __cuSignalExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz') except: pass {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} try: global __cuWaitExternalSemaphoresAsync __cuWaitExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz') except: pass {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} try: global __cuStreamWaitValue32_v2 __cuStreamWaitValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz') except: pass {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} try: global __cuStreamWaitValue64_v2 __cuStreamWaitValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz') except: pass {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} try: global __cuStreamWriteValue32_v2 __cuStreamWriteValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz') except: pass {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} try: global __cuStreamWriteValue64_v2 __cuStreamWriteValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz') except: pass {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} try: global __cuStreamBatchMemOp_v2 __cuStreamBatchMemOp_v2 = win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz') except: pass {{endif}} {{if 'cuLaunchKernel' in found_functions}} try: global __cuLaunchKernel __cuLaunchKernel = win32api.GetProcAddress(handle, 'cuLaunchKernel_ptsz') except: pass {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} try: global __cuLaunchKernelEx __cuLaunchKernelEx = win32api.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz') except: pass {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} try: global __cuLaunchCooperativeKernel __cuLaunchCooperativeKernel = win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz') except: pass {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} try: global __cuLaunchHostFunc __cuLaunchHostFunc = win32api.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz') except: pass {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} try: global __cuGraphInstantiateWithParams __cuGraphInstantiateWithParams = win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams_ptsz') except: pass {{endif}} {{if 'cuGraphUpload' in found_functions}} try: global __cuGraphUpload __cuGraphUpload = win32api.GetProcAddress(handle, 'cuGraphUpload_ptsz') except: pass {{endif}} {{if 'cuGraphLaunch' in found_functions}} try: global __cuGraphLaunch __cuGraphLaunch = win32api.GetProcAddress(handle, 'cuGraphLaunch_ptsz') except: pass {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} try: global __cuGraphicsMapResources __cuGraphicsMapResources = win32api.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz') except: pass {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} try: global __cuGraphicsUnmapResources __cuGraphicsUnmapResources = win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz') except: pass {{endif}} else: # Else get the regular version pass {{if 'cuMemcpy' in found_functions}} try: global __cuMemcpy __cuMemcpy = win32api.GetProcAddress(handle, 'cuMemcpy') except: pass {{endif}} {{if 'cuMemcpyPeer' in found_functions}} try: global __cuMemcpyPeer __cuMemcpyPeer = win32api.GetProcAddress(handle, 'cuMemcpyPeer') except: pass {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} try: global __cuMemcpyHtoD_v2 __cuMemcpyHtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2') except: pass {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} try: global __cuMemcpyDtoH_v2 __cuMemcpyDtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2') except: pass {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} try: global __cuMemcpyDtoD_v2 __cuMemcpyDtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2') except: pass {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} try: global __cuMemcpyDtoA_v2 __cuMemcpyDtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2') except: pass {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} try: global __cuMemcpyAtoD_v2 __cuMemcpyAtoD_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2') except: pass {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} try: global __cuMemcpyHtoA_v2 __cuMemcpyHtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2') except: pass {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} try: global __cuMemcpyAtoH_v2 __cuMemcpyAtoH_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2') except: pass {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} try: global __cuMemcpyAtoA_v2 __cuMemcpyAtoA_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2') except: pass {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} try: global __cuMemcpy2D_v2 __cuMemcpy2D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2D_v2') except: pass {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} try: global __cuMemcpy2DUnaligned_v2 __cuMemcpy2DUnaligned_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2') except: pass {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} try: global __cuMemcpy3D_v2 __cuMemcpy3D_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3D_v2') except: pass {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} try: global __cuMemcpy3DPeer __cuMemcpy3DPeer = win32api.GetProcAddress(handle, 'cuMemcpy3DPeer') except: pass {{endif}} {{if 'cuMemcpyAsync' in found_functions}} try: global __cuMemcpyAsync __cuMemcpyAsync = win32api.GetProcAddress(handle, 'cuMemcpyAsync') except: pass {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} try: global __cuMemcpyPeerAsync __cuMemcpyPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync') except: pass {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} try: global __cuMemcpyHtoDAsync_v2 __cuMemcpyHtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2') except: pass {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} try: global __cuMemcpyDtoHAsync_v2 __cuMemcpyDtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2') except: pass {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} try: global __cuMemcpyDtoDAsync_v2 __cuMemcpyDtoDAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2') except: pass {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} try: global __cuMemcpyHtoAAsync_v2 __cuMemcpyHtoAAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2') except: pass {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} try: global __cuMemcpyAtoHAsync_v2 __cuMemcpyAtoHAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2') except: pass {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} try: global __cuMemcpy2DAsync_v2 __cuMemcpy2DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2') except: pass {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} try: global __cuMemcpy3DAsync_v2 __cuMemcpy3DAsync_v2 = win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2') except: pass {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} try: global __cuMemcpy3DPeerAsync __cuMemcpy3DPeerAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync') except: pass {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} try: global __cuMemsetD8_v2 __cuMemsetD8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD8_v2') except: pass {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} try: global __cuMemsetD16_v2 __cuMemsetD16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD16_v2') except: pass {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} try: global __cuMemsetD32_v2 __cuMemsetD32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD32_v2') except: pass {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} try: global __cuMemsetD2D8_v2 __cuMemsetD2D8_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2') except: pass {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} try: global __cuMemsetD2D16_v2 __cuMemsetD2D16_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2') except: pass {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} try: global __cuMemsetD2D32_v2 __cuMemsetD2D32_v2 = win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2') except: pass {{endif}} {{if 'cuMemsetD8Async' in found_functions}} try: global __cuMemsetD8Async __cuMemsetD8Async = win32api.GetProcAddress(handle, 'cuMemsetD8Async') except: pass {{endif}} {{if 'cuMemsetD16Async' in found_functions}} try: global __cuMemsetD16Async __cuMemsetD16Async = win32api.GetProcAddress(handle, 'cuMemsetD16Async') except: pass {{endif}} {{if 'cuMemsetD32Async' in found_functions}} try: global __cuMemsetD32Async __cuMemsetD32Async = win32api.GetProcAddress(handle, 'cuMemsetD32Async') except: pass {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} try: global __cuMemsetD2D8Async __cuMemsetD2D8Async = win32api.GetProcAddress(handle, 'cuMemsetD2D8Async') except: pass {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} try: global __cuMemsetD2D16Async __cuMemsetD2D16Async = win32api.GetProcAddress(handle, 'cuMemsetD2D16Async') except: pass {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} try: global __cuMemsetD2D32Async __cuMemsetD2D32Async = win32api.GetProcAddress(handle, 'cuMemsetD2D32Async') except: pass {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} try: global __cuMemMapArrayAsync __cuMemMapArrayAsync = win32api.GetProcAddress(handle, 'cuMemMapArrayAsync') except: pass {{endif}} {{if 'cuMemFreeAsync' in found_functions}} try: global __cuMemFreeAsync __cuMemFreeAsync = win32api.GetProcAddress(handle, 'cuMemFreeAsync') except: pass {{endif}} {{if 'cuMemAllocAsync' in found_functions}} try: global __cuMemAllocAsync __cuMemAllocAsync = win32api.GetProcAddress(handle, 'cuMemAllocAsync') except: pass {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} try: global __cuMemAllocFromPoolAsync __cuMemAllocFromPoolAsync = win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync') except: pass {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} try: global __cuMemPrefetchAsync __cuMemPrefetchAsync = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync') except: pass {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} try: global __cuMemPrefetchAsync_v2 __cuMemPrefetchAsync_v2 = win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2') except: pass {{endif}} {{if 'cuStreamGetPriority' in found_functions}} try: global __cuStreamGetPriority __cuStreamGetPriority = win32api.GetProcAddress(handle, 'cuStreamGetPriority') except: pass {{endif}} {{if 'cuStreamGetFlags' in found_functions}} try: global __cuStreamGetFlags __cuStreamGetFlags = win32api.GetProcAddress(handle, 'cuStreamGetFlags') except: pass {{endif}} {{if 'cuStreamGetId' in found_functions}} try: global __cuStreamGetId __cuStreamGetId = win32api.GetProcAddress(handle, 'cuStreamGetId') except: pass {{endif}} {{if 'cuStreamGetCtx' in found_functions}} try: global __cuStreamGetCtx __cuStreamGetCtx = win32api.GetProcAddress(handle, 'cuStreamGetCtx') except: pass {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} try: global __cuStreamGetCtx_v2 __cuStreamGetCtx_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCtx_v2') except: pass {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} try: global __cuStreamWaitEvent __cuStreamWaitEvent = win32api.GetProcAddress(handle, 'cuStreamWaitEvent') except: pass {{endif}} {{if 'cuStreamAddCallback' in found_functions}} try: global __cuStreamAddCallback __cuStreamAddCallback = win32api.GetProcAddress(handle, 'cuStreamAddCallback') except: pass {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} try: global __cuStreamBeginCapture_v2 __cuStreamBeginCapture_v2 = win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2') except: pass {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} try: global __cuStreamBeginCaptureToGraph __cuStreamBeginCaptureToGraph = win32api.GetProcAddress(handle, 'cuStreamBeginCaptureToGraph') except: pass {{endif}} {{if 'cuStreamEndCapture' in found_functions}} try: global __cuStreamEndCapture __cuStreamEndCapture = win32api.GetProcAddress(handle, 'cuStreamEndCapture') except: pass {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} try: global __cuStreamIsCapturing __cuStreamIsCapturing = win32api.GetProcAddress(handle, 'cuStreamIsCapturing') except: pass {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} try: global __cuStreamGetCaptureInfo_v2 __cuStreamGetCaptureInfo_v2 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2') except: pass {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} try: global __cuStreamGetCaptureInfo_v3 __cuStreamGetCaptureInfo_v3 = win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v3') except: pass {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} try: global __cuStreamUpdateCaptureDependencies __cuStreamUpdateCaptureDependencies = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies') except: pass {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} try: global __cuStreamUpdateCaptureDependencies_v2 __cuStreamUpdateCaptureDependencies_v2 = win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_v2') except: pass {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} try: global __cuStreamAttachMemAsync __cuStreamAttachMemAsync = win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync') except: pass {{endif}} {{if 'cuStreamQuery' in found_functions}} try: global __cuStreamQuery __cuStreamQuery = win32api.GetProcAddress(handle, 'cuStreamQuery') except: pass {{endif}} {{if 'cuStreamSynchronize' in found_functions}} try: global __cuStreamSynchronize __cuStreamSynchronize = win32api.GetProcAddress(handle, 'cuStreamSynchronize') except: pass {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} try: global __cuStreamCopyAttributes __cuStreamCopyAttributes = win32api.GetProcAddress(handle, 'cuStreamCopyAttributes') except: pass {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} try: global __cuStreamGetAttribute __cuStreamGetAttribute = win32api.GetProcAddress(handle, 'cuStreamGetAttribute') except: pass {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} try: global __cuStreamSetAttribute __cuStreamSetAttribute = win32api.GetProcAddress(handle, 'cuStreamSetAttribute') except: pass {{endif}} {{if 'cuEventRecord' in found_functions}} try: global __cuEventRecord __cuEventRecord = win32api.GetProcAddress(handle, 'cuEventRecord') except: pass {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} try: global __cuEventRecordWithFlags __cuEventRecordWithFlags = win32api.GetProcAddress(handle, 'cuEventRecordWithFlags') except: pass {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} try: global __cuSignalExternalSemaphoresAsync __cuSignalExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync') except: pass {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} try: global __cuWaitExternalSemaphoresAsync __cuWaitExternalSemaphoresAsync = win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync') except: pass {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} try: global __cuStreamWaitValue32_v2 __cuStreamWaitValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2') except: pass {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} try: global __cuStreamWaitValue64_v2 __cuStreamWaitValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2') except: pass {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} try: global __cuStreamWriteValue32_v2 __cuStreamWriteValue32_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2') except: pass {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} try: global __cuStreamWriteValue64_v2 __cuStreamWriteValue64_v2 = win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2') except: pass {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} try: global __cuStreamBatchMemOp_v2 __cuStreamBatchMemOp_v2 = win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2') except: pass {{endif}} {{if 'cuLaunchKernel' in found_functions}} try: global __cuLaunchKernel __cuLaunchKernel = win32api.GetProcAddress(handle, 'cuLaunchKernel') except: pass {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} try: global __cuLaunchKernelEx __cuLaunchKernelEx = win32api.GetProcAddress(handle, 'cuLaunchKernelEx') except: pass {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} try: global __cuLaunchCooperativeKernel __cuLaunchCooperativeKernel = win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel') except: pass {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} try: global __cuLaunchHostFunc __cuLaunchHostFunc = win32api.GetProcAddress(handle, 'cuLaunchHostFunc') except: pass {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} try: global __cuGraphInstantiateWithParams __cuGraphInstantiateWithParams = win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams') except: pass {{endif}} {{if 'cuGraphUpload' in found_functions}} try: global __cuGraphUpload __cuGraphUpload = win32api.GetProcAddress(handle, 'cuGraphUpload') except: pass {{endif}} {{if 'cuGraphLaunch' in found_functions}} try: global __cuGraphLaunch __cuGraphLaunch = win32api.GetProcAddress(handle, 'cuGraphLaunch') except: pass {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} try: global __cuGraphicsMapResources __cuGraphicsMapResources = win32api.GetProcAddress(handle, 'cuGraphicsMapResources') except: pass {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} try: global __cuGraphicsUnmapResources __cuGraphicsUnmapResources = win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources') except: pass {{endif}} # Get remaining functions {{if 'cuGetErrorString' in found_functions}} try: global __cuGetErrorString __cuGetErrorString = win32api.GetProcAddress(handle, 'cuGetErrorString') except: pass {{endif}} {{if 'cuGetErrorName' in found_functions}} try: global __cuGetErrorName __cuGetErrorName = win32api.GetProcAddress(handle, 'cuGetErrorName') except: pass {{endif}} {{if 'cuInit' in found_functions}} try: global __cuInit __cuInit = win32api.GetProcAddress(handle, 'cuInit') except: pass {{endif}} {{if 'cuDriverGetVersion' in found_functions}} try: global __cuDriverGetVersion __cuDriverGetVersion = win32api.GetProcAddress(handle, 'cuDriverGetVersion') except: pass {{endif}} {{if 'cuDeviceGet' in found_functions}} try: global __cuDeviceGet __cuDeviceGet = win32api.GetProcAddress(handle, 'cuDeviceGet') except: pass {{endif}} {{if 'cuDeviceGetCount' in found_functions}} try: global __cuDeviceGetCount __cuDeviceGetCount = win32api.GetProcAddress(handle, 'cuDeviceGetCount') except: pass {{endif}} {{if 'cuDeviceGetName' in found_functions}} try: global __cuDeviceGetName __cuDeviceGetName = win32api.GetProcAddress(handle, 'cuDeviceGetName') except: pass {{endif}} {{if 'cuDeviceGetUuid' in found_functions}} try: global __cuDeviceGetUuid __cuDeviceGetUuid = win32api.GetProcAddress(handle, 'cuDeviceGetUuid') except: pass {{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}} try: global __cuDeviceGetUuid_v2 __cuDeviceGetUuid_v2 = win32api.GetProcAddress(handle, 'cuDeviceGetUuid_v2') except: pass {{endif}} {{if 'cuDeviceGetLuid' in found_functions}} try: global __cuDeviceGetLuid __cuDeviceGetLuid = win32api.GetProcAddress(handle, 'cuDeviceGetLuid') except: pass {{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}} try: global __cuDeviceTotalMem_v2 __cuDeviceTotalMem_v2 = win32api.GetProcAddress(handle, 'cuDeviceTotalMem_v2') except: pass {{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}} try: global __cuDeviceGetTexture1DLinearMaxWidth __cuDeviceGetTexture1DLinearMaxWidth = win32api.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth') except: pass {{endif}} {{if 'cuDeviceGetAttribute' in found_functions}} try: global __cuDeviceGetAttribute __cuDeviceGetAttribute = win32api.GetProcAddress(handle, 'cuDeviceGetAttribute') except: pass {{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}} try: global __cuDeviceGetNvSciSyncAttributes __cuDeviceGetNvSciSyncAttributes = win32api.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes') except: pass {{endif}} {{if 'cuDeviceSetMemPool' in found_functions}} try: global __cuDeviceSetMemPool __cuDeviceSetMemPool = win32api.GetProcAddress(handle, 'cuDeviceSetMemPool') except: pass {{endif}} {{if 'cuDeviceGetMemPool' in found_functions}} try: global __cuDeviceGetMemPool __cuDeviceGetMemPool = win32api.GetProcAddress(handle, 'cuDeviceGetMemPool') except: pass {{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}} try: global __cuDeviceGetDefaultMemPool __cuDeviceGetDefaultMemPool = win32api.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool') except: pass {{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}} try: global __cuDeviceGetExecAffinitySupport __cuDeviceGetExecAffinitySupport = win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport') except: pass {{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}} try: global __cuFlushGPUDirectRDMAWrites __cuFlushGPUDirectRDMAWrites = win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites') except: pass {{endif}} {{if 'cuDeviceGetProperties' in found_functions}} try: global __cuDeviceGetProperties __cuDeviceGetProperties = win32api.GetProcAddress(handle, 'cuDeviceGetProperties') except: pass {{endif}} {{if 'cuDeviceComputeCapability' in found_functions}} try: global __cuDeviceComputeCapability __cuDeviceComputeCapability = win32api.GetProcAddress(handle, 'cuDeviceComputeCapability') except: pass {{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}} try: global __cuDevicePrimaryCtxRetain __cuDevicePrimaryCtxRetain = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain') except: pass {{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}} try: global __cuDevicePrimaryCtxRelease_v2 __cuDevicePrimaryCtxRelease_v2 = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2') except: pass {{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}} try: global __cuDevicePrimaryCtxSetFlags_v2 __cuDevicePrimaryCtxSetFlags_v2 = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2') except: pass {{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}} try: global __cuDevicePrimaryCtxGetState __cuDevicePrimaryCtxGetState = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState') except: pass {{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}} try: global __cuDevicePrimaryCtxReset_v2 __cuDevicePrimaryCtxReset_v2 = win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2') except: pass {{endif}} {{if 'cuCtxCreate_v2' in found_functions}} try: global __cuCtxCreate_v2 __cuCtxCreate_v2 = win32api.GetProcAddress(handle, 'cuCtxCreate_v2') except: pass {{endif}} {{if 'cuCtxCreate_v3' in found_functions}} try: global __cuCtxCreate_v3 __cuCtxCreate_v3 = win32api.GetProcAddress(handle, 'cuCtxCreate_v3') except: pass {{endif}} {{if 'cuCtxCreate_v4' in found_functions}} try: global __cuCtxCreate_v4 __cuCtxCreate_v4 = win32api.GetProcAddress(handle, 'cuCtxCreate_v4') except: pass {{endif}} {{if 'cuCtxDestroy_v2' in found_functions}} try: global __cuCtxDestroy_v2 __cuCtxDestroy_v2 = win32api.GetProcAddress(handle, 'cuCtxDestroy_v2') except: pass {{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}} try: global __cuCtxPushCurrent_v2 __cuCtxPushCurrent_v2 = win32api.GetProcAddress(handle, 'cuCtxPushCurrent_v2') except: pass {{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}} try: global __cuCtxPopCurrent_v2 __cuCtxPopCurrent_v2 = win32api.GetProcAddress(handle, 'cuCtxPopCurrent_v2') except: pass {{endif}} {{if 'cuCtxSetCurrent' in found_functions}} try: global __cuCtxSetCurrent __cuCtxSetCurrent = win32api.GetProcAddress(handle, 'cuCtxSetCurrent') except: pass {{endif}} {{if 'cuCtxGetCurrent' in found_functions}} try: global __cuCtxGetCurrent __cuCtxGetCurrent = win32api.GetProcAddress(handle, 'cuCtxGetCurrent') except: pass {{endif}} {{if 'cuCtxGetDevice' in found_functions}} try: global __cuCtxGetDevice __cuCtxGetDevice = win32api.GetProcAddress(handle, 'cuCtxGetDevice') except: pass {{endif}} {{if 'cuCtxGetFlags' in found_functions}} try: global __cuCtxGetFlags __cuCtxGetFlags = win32api.GetProcAddress(handle, 'cuCtxGetFlags') except: pass {{endif}} {{if 'cuCtxSetFlags' in found_functions}} try: global __cuCtxSetFlags __cuCtxSetFlags = win32api.GetProcAddress(handle, 'cuCtxSetFlags') except: pass {{endif}} {{if 'cuCtxGetId' in found_functions}} try: global __cuCtxGetId __cuCtxGetId = win32api.GetProcAddress(handle, 'cuCtxGetId') except: pass {{endif}} {{if 'cuCtxSynchronize' in found_functions}} try: global __cuCtxSynchronize __cuCtxSynchronize = win32api.GetProcAddress(handle, 'cuCtxSynchronize') except: pass {{endif}} {{if 'cuCtxSetLimit' in found_functions}} try: global __cuCtxSetLimit __cuCtxSetLimit = win32api.GetProcAddress(handle, 'cuCtxSetLimit') except: pass {{endif}} {{if 'cuCtxGetLimit' in found_functions}} try: global __cuCtxGetLimit __cuCtxGetLimit = win32api.GetProcAddress(handle, 'cuCtxGetLimit') except: pass {{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}} try: global __cuCtxGetCacheConfig __cuCtxGetCacheConfig = win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig') except: pass {{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}} try: global __cuCtxSetCacheConfig __cuCtxSetCacheConfig = win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig') except: pass {{endif}} {{if 'cuCtxGetApiVersion' in found_functions}} try: global __cuCtxGetApiVersion __cuCtxGetApiVersion = win32api.GetProcAddress(handle, 'cuCtxGetApiVersion') except: pass {{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}} try: global __cuCtxGetStreamPriorityRange __cuCtxGetStreamPriorityRange = win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange') except: pass {{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}} try: global __cuCtxResetPersistingL2Cache __cuCtxResetPersistingL2Cache = win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache') except: pass {{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}} try: global __cuCtxGetExecAffinity __cuCtxGetExecAffinity = win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity') except: pass {{endif}} {{if 'cuCtxRecordEvent' in found_functions}} try: global __cuCtxRecordEvent __cuCtxRecordEvent = win32api.GetProcAddress(handle, 'cuCtxRecordEvent') except: pass {{endif}} {{if 'cuCtxWaitEvent' in found_functions}} try: global __cuCtxWaitEvent __cuCtxWaitEvent = win32api.GetProcAddress(handle, 'cuCtxWaitEvent') except: pass {{endif}} {{if 'cuCtxAttach' in found_functions}} try: global __cuCtxAttach __cuCtxAttach = win32api.GetProcAddress(handle, 'cuCtxAttach') except: pass {{endif}} {{if 'cuCtxDetach' in found_functions}} try: global __cuCtxDetach __cuCtxDetach = win32api.GetProcAddress(handle, 'cuCtxDetach') except: pass {{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}} try: global __cuCtxGetSharedMemConfig __cuCtxGetSharedMemConfig = win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig') except: pass {{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}} try: global __cuCtxSetSharedMemConfig __cuCtxSetSharedMemConfig = win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig') except: pass {{endif}} {{if 'cuModuleLoad' in found_functions}} try: global __cuModuleLoad __cuModuleLoad = win32api.GetProcAddress(handle, 'cuModuleLoad') except: pass {{endif}} {{if 'cuModuleLoadData' in found_functions}} try: global __cuModuleLoadData __cuModuleLoadData = win32api.GetProcAddress(handle, 'cuModuleLoadData') except: pass {{endif}} {{if 'cuModuleLoadDataEx' in found_functions}} try: global __cuModuleLoadDataEx __cuModuleLoadDataEx = win32api.GetProcAddress(handle, 'cuModuleLoadDataEx') except: pass {{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}} try: global __cuModuleLoadFatBinary __cuModuleLoadFatBinary = win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary') except: pass {{endif}} {{if 'cuModuleUnload' in found_functions}} try: global __cuModuleUnload __cuModuleUnload = win32api.GetProcAddress(handle, 'cuModuleUnload') except: pass {{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}} try: global __cuModuleGetLoadingMode __cuModuleGetLoadingMode = win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode') except: pass {{endif}} {{if 'cuModuleGetFunction' in found_functions}} try: global __cuModuleGetFunction __cuModuleGetFunction = win32api.GetProcAddress(handle, 'cuModuleGetFunction') except: pass {{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}} try: global __cuModuleGetFunctionCount __cuModuleGetFunctionCount = win32api.GetProcAddress(handle, 'cuModuleGetFunctionCount') except: pass {{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}} try: global __cuModuleEnumerateFunctions __cuModuleEnumerateFunctions = win32api.GetProcAddress(handle, 'cuModuleEnumerateFunctions') except: pass {{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}} try: global __cuModuleGetGlobal_v2 __cuModuleGetGlobal_v2 = win32api.GetProcAddress(handle, 'cuModuleGetGlobal_v2') except: pass {{endif}} {{if 'cuLinkCreate_v2' in found_functions}} try: global __cuLinkCreate_v2 __cuLinkCreate_v2 = win32api.GetProcAddress(handle, 'cuLinkCreate_v2') except: pass {{endif}} {{if 'cuLinkAddData_v2' in found_functions}} try: global __cuLinkAddData_v2 __cuLinkAddData_v2 = win32api.GetProcAddress(handle, 'cuLinkAddData_v2') except: pass {{endif}} {{if 'cuLinkAddFile_v2' in found_functions}} try: global __cuLinkAddFile_v2 __cuLinkAddFile_v2 = win32api.GetProcAddress(handle, 'cuLinkAddFile_v2') except: pass {{endif}} {{if 'cuLinkComplete' in found_functions}} try: global __cuLinkComplete __cuLinkComplete = win32api.GetProcAddress(handle, 'cuLinkComplete') except: pass {{endif}} {{if 'cuLinkDestroy' in found_functions}} try: global __cuLinkDestroy __cuLinkDestroy = win32api.GetProcAddress(handle, 'cuLinkDestroy') except: pass {{endif}} {{if 'cuModuleGetTexRef' in found_functions}} try: global __cuModuleGetTexRef __cuModuleGetTexRef = win32api.GetProcAddress(handle, 'cuModuleGetTexRef') except: pass {{endif}} {{if 'cuModuleGetSurfRef' in found_functions}} try: global __cuModuleGetSurfRef __cuModuleGetSurfRef = win32api.GetProcAddress(handle, 'cuModuleGetSurfRef') except: pass {{endif}} {{if 'cuLibraryLoadData' in found_functions}} try: global __cuLibraryLoadData __cuLibraryLoadData = win32api.GetProcAddress(handle, 'cuLibraryLoadData') except: pass {{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}} try: global __cuLibraryLoadFromFile __cuLibraryLoadFromFile = win32api.GetProcAddress(handle, 'cuLibraryLoadFromFile') except: pass {{endif}} {{if 'cuLibraryUnload' in found_functions}} try: global __cuLibraryUnload __cuLibraryUnload = win32api.GetProcAddress(handle, 'cuLibraryUnload') except: pass {{endif}} {{if 'cuLibraryGetKernel' in found_functions}} try: global __cuLibraryGetKernel __cuLibraryGetKernel = win32api.GetProcAddress(handle, 'cuLibraryGetKernel') except: pass {{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}} try: global __cuLibraryGetKernelCount __cuLibraryGetKernelCount = win32api.GetProcAddress(handle, 'cuLibraryGetKernelCount') except: pass {{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}} try: global __cuLibraryEnumerateKernels __cuLibraryEnumerateKernels = win32api.GetProcAddress(handle, 'cuLibraryEnumerateKernels') except: pass {{endif}} {{if 'cuLibraryGetModule' in found_functions}} try: global __cuLibraryGetModule __cuLibraryGetModule = win32api.GetProcAddress(handle, 'cuLibraryGetModule') except: pass {{endif}} {{if 'cuKernelGetFunction' in found_functions}} try: global __cuKernelGetFunction __cuKernelGetFunction = win32api.GetProcAddress(handle, 'cuKernelGetFunction') except: pass {{endif}} {{if 'cuKernelGetLibrary' in found_functions}} try: global __cuKernelGetLibrary __cuKernelGetLibrary = win32api.GetProcAddress(handle, 'cuKernelGetLibrary') except: pass {{endif}} {{if 'cuLibraryGetGlobal' in found_functions}} try: global __cuLibraryGetGlobal __cuLibraryGetGlobal = win32api.GetProcAddress(handle, 'cuLibraryGetGlobal') except: pass {{endif}} {{if 'cuLibraryGetManaged' in found_functions}} try: global __cuLibraryGetManaged __cuLibraryGetManaged = win32api.GetProcAddress(handle, 'cuLibraryGetManaged') except: pass {{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}} try: global __cuLibraryGetUnifiedFunction __cuLibraryGetUnifiedFunction = win32api.GetProcAddress(handle, 'cuLibraryGetUnifiedFunction') except: pass {{endif}} {{if 'cuKernelGetAttribute' in found_functions}} try: global __cuKernelGetAttribute __cuKernelGetAttribute = win32api.GetProcAddress(handle, 'cuKernelGetAttribute') except: pass {{endif}} {{if 'cuKernelSetAttribute' in found_functions}} try: global __cuKernelSetAttribute __cuKernelSetAttribute = win32api.GetProcAddress(handle, 'cuKernelSetAttribute') except: pass {{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}} try: global __cuKernelSetCacheConfig __cuKernelSetCacheConfig = win32api.GetProcAddress(handle, 'cuKernelSetCacheConfig') except: pass {{endif}} {{if 'cuKernelGetName' in found_functions}} try: global __cuKernelGetName __cuKernelGetName = win32api.GetProcAddress(handle, 'cuKernelGetName') except: pass {{endif}} {{if 'cuKernelGetParamInfo' in found_functions}} try: global __cuKernelGetParamInfo __cuKernelGetParamInfo = win32api.GetProcAddress(handle, 'cuKernelGetParamInfo') except: pass {{endif}} {{if 'cuMemGetInfo_v2' in found_functions}} try: global __cuMemGetInfo_v2 __cuMemGetInfo_v2 = win32api.GetProcAddress(handle, 'cuMemGetInfo_v2') except: pass {{endif}} {{if 'cuMemAlloc_v2' in found_functions}} try: global __cuMemAlloc_v2 __cuMemAlloc_v2 = win32api.GetProcAddress(handle, 'cuMemAlloc_v2') except: pass {{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}} try: global __cuMemAllocPitch_v2 __cuMemAllocPitch_v2 = win32api.GetProcAddress(handle, 'cuMemAllocPitch_v2') except: pass {{endif}} {{if 'cuMemFree_v2' in found_functions}} try: global __cuMemFree_v2 __cuMemFree_v2 = win32api.GetProcAddress(handle, 'cuMemFree_v2') except: pass {{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}} try: global __cuMemGetAddressRange_v2 __cuMemGetAddressRange_v2 = win32api.GetProcAddress(handle, 'cuMemGetAddressRange_v2') except: pass {{endif}} {{if 'cuMemAllocHost_v2' in found_functions}} try: global __cuMemAllocHost_v2 __cuMemAllocHost_v2 = win32api.GetProcAddress(handle, 'cuMemAllocHost_v2') except: pass {{endif}} {{if 'cuMemFreeHost' in found_functions}} try: global __cuMemFreeHost __cuMemFreeHost = win32api.GetProcAddress(handle, 'cuMemFreeHost') except: pass {{endif}} {{if 'cuMemHostAlloc' in found_functions}} try: global __cuMemHostAlloc __cuMemHostAlloc = win32api.GetProcAddress(handle, 'cuMemHostAlloc') except: pass {{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}} try: global __cuMemHostGetDevicePointer_v2 __cuMemHostGetDevicePointer_v2 = win32api.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2') except: pass {{endif}} {{if 'cuMemHostGetFlags' in found_functions}} try: global __cuMemHostGetFlags __cuMemHostGetFlags = win32api.GetProcAddress(handle, 'cuMemHostGetFlags') except: pass {{endif}} {{if 'cuMemAllocManaged' in found_functions}} try: global __cuMemAllocManaged __cuMemAllocManaged = win32api.GetProcAddress(handle, 'cuMemAllocManaged') except: pass {{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}} try: global __cuDeviceRegisterAsyncNotification __cuDeviceRegisterAsyncNotification = win32api.GetProcAddress(handle, 'cuDeviceRegisterAsyncNotification') except: pass {{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}} try: global __cuDeviceUnregisterAsyncNotification __cuDeviceUnregisterAsyncNotification = win32api.GetProcAddress(handle, 'cuDeviceUnregisterAsyncNotification') except: pass {{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}} try: global __cuDeviceGetByPCIBusId __cuDeviceGetByPCIBusId = win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId') except: pass {{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}} try: global __cuDeviceGetPCIBusId __cuDeviceGetPCIBusId = win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId') except: pass {{endif}} {{if 'cuIpcGetEventHandle' in found_functions}} try: global __cuIpcGetEventHandle __cuIpcGetEventHandle = win32api.GetProcAddress(handle, 'cuIpcGetEventHandle') except: pass {{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}} try: global __cuIpcOpenEventHandle __cuIpcOpenEventHandle = win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle') except: pass {{endif}} {{if 'cuIpcGetMemHandle' in found_functions}} try: global __cuIpcGetMemHandle __cuIpcGetMemHandle = win32api.GetProcAddress(handle, 'cuIpcGetMemHandle') except: pass {{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}} try: global __cuIpcOpenMemHandle_v2 __cuIpcOpenMemHandle_v2 = win32api.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2') except: pass {{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}} try: global __cuIpcCloseMemHandle __cuIpcCloseMemHandle = win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle') except: pass {{endif}} {{if 'cuMemHostRegister_v2' in found_functions}} try: global __cuMemHostRegister_v2 __cuMemHostRegister_v2 = win32api.GetProcAddress(handle, 'cuMemHostRegister_v2') except: pass {{endif}} {{if 'cuMemHostUnregister' in found_functions}} try: global __cuMemHostUnregister __cuMemHostUnregister = win32api.GetProcAddress(handle, 'cuMemHostUnregister') except: pass {{endif}} {{if 'cuArrayCreate_v2' in found_functions}} try: global __cuArrayCreate_v2 __cuArrayCreate_v2 = win32api.GetProcAddress(handle, 'cuArrayCreate_v2') except: pass {{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}} try: global __cuArrayGetDescriptor_v2 __cuArrayGetDescriptor_v2 = win32api.GetProcAddress(handle, 'cuArrayGetDescriptor_v2') except: pass {{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}} try: global __cuArrayGetSparseProperties __cuArrayGetSparseProperties = win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties') except: pass {{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}} try: global __cuMipmappedArrayGetSparseProperties __cuMipmappedArrayGetSparseProperties = win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties') except: pass {{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}} try: global __cuArrayGetMemoryRequirements __cuArrayGetMemoryRequirements = win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements') except: pass {{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}} try: global __cuMipmappedArrayGetMemoryRequirements __cuMipmappedArrayGetMemoryRequirements = win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements') except: pass {{endif}} {{if 'cuArrayGetPlane' in found_functions}} try: global __cuArrayGetPlane __cuArrayGetPlane = win32api.GetProcAddress(handle, 'cuArrayGetPlane') except: pass {{endif}} {{if 'cuArrayDestroy' in found_functions}} try: global __cuArrayDestroy __cuArrayDestroy = win32api.GetProcAddress(handle, 'cuArrayDestroy') except: pass {{endif}} {{if 'cuArray3DCreate_v2' in found_functions}} try: global __cuArray3DCreate_v2 __cuArray3DCreate_v2 = win32api.GetProcAddress(handle, 'cuArray3DCreate_v2') except: pass {{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}} try: global __cuArray3DGetDescriptor_v2 __cuArray3DGetDescriptor_v2 = win32api.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2') except: pass {{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}} try: global __cuMipmappedArrayCreate __cuMipmappedArrayCreate = win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate') except: pass {{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}} try: global __cuMipmappedArrayGetLevel __cuMipmappedArrayGetLevel = win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel') except: pass {{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}} try: global __cuMipmappedArrayDestroy __cuMipmappedArrayDestroy = win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy') except: pass {{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}} try: global __cuMemGetHandleForAddressRange __cuMemGetHandleForAddressRange = win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange') except: pass {{endif}} {{if 'cuMemAddressReserve' in found_functions}} try: global __cuMemAddressReserve __cuMemAddressReserve = win32api.GetProcAddress(handle, 'cuMemAddressReserve') except: pass {{endif}} {{if 'cuMemAddressFree' in found_functions}} try: global __cuMemAddressFree __cuMemAddressFree = win32api.GetProcAddress(handle, 'cuMemAddressFree') except: pass {{endif}} {{if 'cuMemCreate' in found_functions}} try: global __cuMemCreate __cuMemCreate = win32api.GetProcAddress(handle, 'cuMemCreate') except: pass {{endif}} {{if 'cuMemRelease' in found_functions}} try: global __cuMemRelease __cuMemRelease = win32api.GetProcAddress(handle, 'cuMemRelease') except: pass {{endif}} {{if 'cuMemMap' in found_functions}} try: global __cuMemMap __cuMemMap = win32api.GetProcAddress(handle, 'cuMemMap') except: pass {{endif}} {{if 'cuMemUnmap' in found_functions}} try: global __cuMemUnmap __cuMemUnmap = win32api.GetProcAddress(handle, 'cuMemUnmap') except: pass {{endif}} {{if 'cuMemSetAccess' in found_functions}} try: global __cuMemSetAccess __cuMemSetAccess = win32api.GetProcAddress(handle, 'cuMemSetAccess') except: pass {{endif}} {{if 'cuMemGetAccess' in found_functions}} try: global __cuMemGetAccess __cuMemGetAccess = win32api.GetProcAddress(handle, 'cuMemGetAccess') except: pass {{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}} try: global __cuMemExportToShareableHandle __cuMemExportToShareableHandle = win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle') except: pass {{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}} try: global __cuMemImportFromShareableHandle __cuMemImportFromShareableHandle = win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle') except: pass {{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}} try: global __cuMemGetAllocationGranularity __cuMemGetAllocationGranularity = win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity') except: pass {{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}} try: global __cuMemGetAllocationPropertiesFromHandle __cuMemGetAllocationPropertiesFromHandle = win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle') except: pass {{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}} try: global __cuMemRetainAllocationHandle __cuMemRetainAllocationHandle = win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle') except: pass {{endif}} {{if 'cuMemPoolTrimTo' in found_functions}} try: global __cuMemPoolTrimTo __cuMemPoolTrimTo = win32api.GetProcAddress(handle, 'cuMemPoolTrimTo') except: pass {{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}} try: global __cuMemPoolSetAttribute __cuMemPoolSetAttribute = win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute') except: pass {{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}} try: global __cuMemPoolGetAttribute __cuMemPoolGetAttribute = win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute') except: pass {{endif}} {{if 'cuMemPoolSetAccess' in found_functions}} try: global __cuMemPoolSetAccess __cuMemPoolSetAccess = win32api.GetProcAddress(handle, 'cuMemPoolSetAccess') except: pass {{endif}} {{if 'cuMemPoolGetAccess' in found_functions}} try: global __cuMemPoolGetAccess __cuMemPoolGetAccess = win32api.GetProcAddress(handle, 'cuMemPoolGetAccess') except: pass {{endif}} {{if 'cuMemPoolCreate' in found_functions}} try: global __cuMemPoolCreate __cuMemPoolCreate = win32api.GetProcAddress(handle, 'cuMemPoolCreate') except: pass {{endif}} {{if 'cuMemPoolDestroy' in found_functions}} try: global __cuMemPoolDestroy __cuMemPoolDestroy = win32api.GetProcAddress(handle, 'cuMemPoolDestroy') except: pass {{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}} try: global __cuMemPoolExportToShareableHandle __cuMemPoolExportToShareableHandle = win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle') except: pass {{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}} try: global __cuMemPoolImportFromShareableHandle __cuMemPoolImportFromShareableHandle = win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle') except: pass {{endif}} {{if 'cuMemPoolExportPointer' in found_functions}} try: global __cuMemPoolExportPointer __cuMemPoolExportPointer = win32api.GetProcAddress(handle, 'cuMemPoolExportPointer') except: pass {{endif}} {{if 'cuMemPoolImportPointer' in found_functions}} try: global __cuMemPoolImportPointer __cuMemPoolImportPointer = win32api.GetProcAddress(handle, 'cuMemPoolImportPointer') except: pass {{endif}} {{if 'cuMulticastCreate' in found_functions}} try: global __cuMulticastCreate __cuMulticastCreate = win32api.GetProcAddress(handle, 'cuMulticastCreate') except: pass {{endif}} {{if 'cuMulticastAddDevice' in found_functions}} try: global __cuMulticastAddDevice __cuMulticastAddDevice = win32api.GetProcAddress(handle, 'cuMulticastAddDevice') except: pass {{endif}} {{if 'cuMulticastBindMem' in found_functions}} try: global __cuMulticastBindMem __cuMulticastBindMem = win32api.GetProcAddress(handle, 'cuMulticastBindMem') except: pass {{endif}} {{if 'cuMulticastBindAddr' in found_functions}} try: global __cuMulticastBindAddr __cuMulticastBindAddr = win32api.GetProcAddress(handle, 'cuMulticastBindAddr') except: pass {{endif}} {{if 'cuMulticastUnbind' in found_functions}} try: global __cuMulticastUnbind __cuMulticastUnbind = win32api.GetProcAddress(handle, 'cuMulticastUnbind') except: pass {{endif}} {{if 'cuMulticastGetGranularity' in found_functions}} try: global __cuMulticastGetGranularity __cuMulticastGetGranularity = win32api.GetProcAddress(handle, 'cuMulticastGetGranularity') except: pass {{endif}} {{if 'cuPointerGetAttribute' in found_functions}} try: global __cuPointerGetAttribute __cuPointerGetAttribute = win32api.GetProcAddress(handle, 'cuPointerGetAttribute') except: pass {{endif}} {{if 'cuMemAdvise' in found_functions}} try: global __cuMemAdvise __cuMemAdvise = win32api.GetProcAddress(handle, 'cuMemAdvise') except: pass {{endif}} {{if 'cuMemAdvise_v2' in found_functions}} try: global __cuMemAdvise_v2 __cuMemAdvise_v2 = win32api.GetProcAddress(handle, 'cuMemAdvise_v2') except: pass {{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}} try: global __cuMemRangeGetAttribute __cuMemRangeGetAttribute = win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute') except: pass {{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}} try: global __cuMemRangeGetAttributes __cuMemRangeGetAttributes = win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes') except: pass {{endif}} {{if 'cuPointerSetAttribute' in found_functions}} try: global __cuPointerSetAttribute __cuPointerSetAttribute = win32api.GetProcAddress(handle, 'cuPointerSetAttribute') except: pass {{endif}} {{if 'cuPointerGetAttributes' in found_functions}} try: global __cuPointerGetAttributes __cuPointerGetAttributes = win32api.GetProcAddress(handle, 'cuPointerGetAttributes') except: pass {{endif}} {{if 'cuStreamCreate' in found_functions}} try: global __cuStreamCreate __cuStreamCreate = win32api.GetProcAddress(handle, 'cuStreamCreate') except: pass {{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}} try: global __cuStreamCreateWithPriority __cuStreamCreateWithPriority = win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority') except: pass {{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}} try: global __cuThreadExchangeStreamCaptureMode __cuThreadExchangeStreamCaptureMode = win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode') except: pass {{endif}} {{if 'cuStreamDestroy_v2' in found_functions}} try: global __cuStreamDestroy_v2 __cuStreamDestroy_v2 = win32api.GetProcAddress(handle, 'cuStreamDestroy_v2') except: pass {{endif}} {{if 'cuEventCreate' in found_functions}} try: global __cuEventCreate __cuEventCreate = win32api.GetProcAddress(handle, 'cuEventCreate') except: pass {{endif}} {{if 'cuEventQuery' in found_functions}} try: global __cuEventQuery __cuEventQuery = win32api.GetProcAddress(handle, 'cuEventQuery') except: pass {{endif}} {{if 'cuEventSynchronize' in found_functions}} try: global __cuEventSynchronize __cuEventSynchronize = win32api.GetProcAddress(handle, 'cuEventSynchronize') except: pass {{endif}} {{if 'cuEventDestroy_v2' in found_functions}} try: global __cuEventDestroy_v2 __cuEventDestroy_v2 = win32api.GetProcAddress(handle, 'cuEventDestroy_v2') except: pass {{endif}} {{if 'cuEventElapsedTime' in found_functions}} try: global __cuEventElapsedTime __cuEventElapsedTime = win32api.GetProcAddress(handle, 'cuEventElapsedTime') except: pass {{endif}} {{if 'cuImportExternalMemory' in found_functions}} try: global __cuImportExternalMemory __cuImportExternalMemory = win32api.GetProcAddress(handle, 'cuImportExternalMemory') except: pass {{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}} try: global __cuExternalMemoryGetMappedBuffer __cuExternalMemoryGetMappedBuffer = win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer') except: pass {{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}} try: global __cuExternalMemoryGetMappedMipmappedArray __cuExternalMemoryGetMappedMipmappedArray = win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray') except: pass {{endif}} {{if 'cuDestroyExternalMemory' in found_functions}} try: global __cuDestroyExternalMemory __cuDestroyExternalMemory = win32api.GetProcAddress(handle, 'cuDestroyExternalMemory') except: pass {{endif}} {{if 'cuImportExternalSemaphore' in found_functions}} try: global __cuImportExternalSemaphore __cuImportExternalSemaphore = win32api.GetProcAddress(handle, 'cuImportExternalSemaphore') except: pass {{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}} try: global __cuDestroyExternalSemaphore __cuDestroyExternalSemaphore = win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore') except: pass {{endif}} {{if 'cuFuncGetAttribute' in found_functions}} try: global __cuFuncGetAttribute __cuFuncGetAttribute = win32api.GetProcAddress(handle, 'cuFuncGetAttribute') except: pass {{endif}} {{if 'cuFuncSetAttribute' in found_functions}} try: global __cuFuncSetAttribute __cuFuncSetAttribute = win32api.GetProcAddress(handle, 'cuFuncSetAttribute') except: pass {{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}} try: global __cuFuncSetCacheConfig __cuFuncSetCacheConfig = win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig') except: pass {{endif}} {{if 'cuFuncGetModule' in found_functions}} try: global __cuFuncGetModule __cuFuncGetModule = win32api.GetProcAddress(handle, 'cuFuncGetModule') except: pass {{endif}} {{if 'cuFuncGetName' in found_functions}} try: global __cuFuncGetName __cuFuncGetName = win32api.GetProcAddress(handle, 'cuFuncGetName') except: pass {{endif}} {{if 'cuFuncGetParamInfo' in found_functions}} try: global __cuFuncGetParamInfo __cuFuncGetParamInfo = win32api.GetProcAddress(handle, 'cuFuncGetParamInfo') except: pass {{endif}} {{if 'cuFuncIsLoaded' in found_functions}} try: global __cuFuncIsLoaded __cuFuncIsLoaded = win32api.GetProcAddress(handle, 'cuFuncIsLoaded') except: pass {{endif}} {{if 'cuFuncLoad' in found_functions}} try: global __cuFuncLoad __cuFuncLoad = win32api.GetProcAddress(handle, 'cuFuncLoad') except: pass {{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}} try: global __cuLaunchCooperativeKernelMultiDevice __cuLaunchCooperativeKernelMultiDevice = win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice') except: pass {{endif}} {{if 'cuFuncSetBlockShape' in found_functions}} try: global __cuFuncSetBlockShape __cuFuncSetBlockShape = win32api.GetProcAddress(handle, 'cuFuncSetBlockShape') except: pass {{endif}} {{if 'cuFuncSetSharedSize' in found_functions}} try: global __cuFuncSetSharedSize __cuFuncSetSharedSize = win32api.GetProcAddress(handle, 'cuFuncSetSharedSize') except: pass {{endif}} {{if 'cuParamSetSize' in found_functions}} try: global __cuParamSetSize __cuParamSetSize = win32api.GetProcAddress(handle, 'cuParamSetSize') except: pass {{endif}} {{if 'cuParamSeti' in found_functions}} try: global __cuParamSeti __cuParamSeti = win32api.GetProcAddress(handle, 'cuParamSeti') except: pass {{endif}} {{if 'cuParamSetf' in found_functions}} try: global __cuParamSetf __cuParamSetf = win32api.GetProcAddress(handle, 'cuParamSetf') except: pass {{endif}} {{if 'cuParamSetv' in found_functions}} try: global __cuParamSetv __cuParamSetv = win32api.GetProcAddress(handle, 'cuParamSetv') except: pass {{endif}} {{if 'cuLaunch' in found_functions}} try: global __cuLaunch __cuLaunch = win32api.GetProcAddress(handle, 'cuLaunch') except: pass {{endif}} {{if 'cuLaunchGrid' in found_functions}} try: global __cuLaunchGrid __cuLaunchGrid = win32api.GetProcAddress(handle, 'cuLaunchGrid') except: pass {{endif}} {{if 'cuLaunchGridAsync' in found_functions}} try: global __cuLaunchGridAsync __cuLaunchGridAsync = win32api.GetProcAddress(handle, 'cuLaunchGridAsync') except: pass {{endif}} {{if 'cuParamSetTexRef' in found_functions}} try: global __cuParamSetTexRef __cuParamSetTexRef = win32api.GetProcAddress(handle, 'cuParamSetTexRef') except: pass {{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}} try: global __cuFuncSetSharedMemConfig __cuFuncSetSharedMemConfig = win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig') except: pass {{endif}} {{if 'cuGraphCreate' in found_functions}} try: global __cuGraphCreate __cuGraphCreate = win32api.GetProcAddress(handle, 'cuGraphCreate') except: pass {{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}} try: global __cuGraphAddKernelNode_v2 __cuGraphAddKernelNode_v2 = win32api.GetProcAddress(handle, 'cuGraphAddKernelNode_v2') except: pass {{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}} try: global __cuGraphKernelNodeGetParams_v2 __cuGraphKernelNodeGetParams_v2 = win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams_v2') except: pass {{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}} try: global __cuGraphKernelNodeSetParams_v2 __cuGraphKernelNodeSetParams_v2 = win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams_v2') except: pass {{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}} try: global __cuGraphAddMemcpyNode __cuGraphAddMemcpyNode = win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode') except: pass {{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}} try: global __cuGraphMemcpyNodeGetParams __cuGraphMemcpyNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams') except: pass {{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}} try: global __cuGraphMemcpyNodeSetParams __cuGraphMemcpyNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams') except: pass {{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}} try: global __cuGraphAddMemsetNode __cuGraphAddMemsetNode = win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode') except: pass {{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}} try: global __cuGraphMemsetNodeGetParams __cuGraphMemsetNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams') except: pass {{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}} try: global __cuGraphMemsetNodeSetParams __cuGraphMemsetNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams') except: pass {{endif}} {{if 'cuGraphAddHostNode' in found_functions}} try: global __cuGraphAddHostNode __cuGraphAddHostNode = win32api.GetProcAddress(handle, 'cuGraphAddHostNode') except: pass {{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}} try: global __cuGraphHostNodeGetParams __cuGraphHostNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams') except: pass {{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}} try: global __cuGraphHostNodeSetParams __cuGraphHostNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams') except: pass {{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}} try: global __cuGraphAddChildGraphNode __cuGraphAddChildGraphNode = win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode') except: pass {{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}} try: global __cuGraphChildGraphNodeGetGraph __cuGraphChildGraphNodeGetGraph = win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph') except: pass {{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}} try: global __cuGraphAddEmptyNode __cuGraphAddEmptyNode = win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode') except: pass {{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}} try: global __cuGraphAddEventRecordNode __cuGraphAddEventRecordNode = win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode') except: pass {{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}} try: global __cuGraphEventRecordNodeGetEvent __cuGraphEventRecordNodeGetEvent = win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent') except: pass {{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}} try: global __cuGraphEventRecordNodeSetEvent __cuGraphEventRecordNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent') except: pass {{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}} try: global __cuGraphAddEventWaitNode __cuGraphAddEventWaitNode = win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode') except: pass {{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}} try: global __cuGraphEventWaitNodeGetEvent __cuGraphEventWaitNodeGetEvent = win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent') except: pass {{endif}} {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} try: global __cuGraphEventWaitNodeSetEvent __cuGraphEventWaitNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent') except: pass {{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}} try: global __cuGraphAddExternalSemaphoresSignalNode __cuGraphAddExternalSemaphoresSignalNode = win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode') except: pass {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} try: global __cuGraphExternalSemaphoresSignalNodeGetParams __cuGraphExternalSemaphoresSignalNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') except: pass {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} try: global __cuGraphExternalSemaphoresSignalNodeSetParams __cuGraphExternalSemaphoresSignalNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') except: pass {{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}} try: global __cuGraphAddExternalSemaphoresWaitNode __cuGraphAddExternalSemaphoresWaitNode = win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode') except: pass {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} try: global __cuGraphExternalSemaphoresWaitNodeGetParams __cuGraphExternalSemaphoresWaitNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') except: pass {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} try: global __cuGraphExternalSemaphoresWaitNodeSetParams __cuGraphExternalSemaphoresWaitNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') except: pass {{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}} try: global __cuGraphAddBatchMemOpNode __cuGraphAddBatchMemOpNode = win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode') except: pass {{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}} try: global __cuGraphBatchMemOpNodeGetParams __cuGraphBatchMemOpNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams') except: pass {{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}} try: global __cuGraphBatchMemOpNodeSetParams __cuGraphBatchMemOpNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams') except: pass {{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}} try: global __cuGraphExecBatchMemOpNodeSetParams __cuGraphExecBatchMemOpNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams') except: pass {{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}} try: global __cuGraphAddMemAllocNode __cuGraphAddMemAllocNode = win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode') except: pass {{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}} try: global __cuGraphMemAllocNodeGetParams __cuGraphMemAllocNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams') except: pass {{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}} try: global __cuGraphAddMemFreeNode __cuGraphAddMemFreeNode = win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode') except: pass {{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}} try: global __cuGraphMemFreeNodeGetParams __cuGraphMemFreeNodeGetParams = win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams') except: pass {{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}} try: global __cuDeviceGraphMemTrim __cuDeviceGraphMemTrim = win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim') except: pass {{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}} try: global __cuDeviceGetGraphMemAttribute __cuDeviceGetGraphMemAttribute = win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute') except: pass {{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}} try: global __cuDeviceSetGraphMemAttribute __cuDeviceSetGraphMemAttribute = win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute') except: pass {{endif}} {{if 'cuGraphClone' in found_functions}} try: global __cuGraphClone __cuGraphClone = win32api.GetProcAddress(handle, 'cuGraphClone') except: pass {{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}} try: global __cuGraphNodeFindInClone __cuGraphNodeFindInClone = win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone') except: pass {{endif}} {{if 'cuGraphNodeGetType' in found_functions}} try: global __cuGraphNodeGetType __cuGraphNodeGetType = win32api.GetProcAddress(handle, 'cuGraphNodeGetType') except: pass {{endif}} {{if 'cuGraphGetNodes' in found_functions}} try: global __cuGraphGetNodes __cuGraphGetNodes = win32api.GetProcAddress(handle, 'cuGraphGetNodes') except: pass {{endif}} {{if 'cuGraphGetRootNodes' in found_functions}} try: global __cuGraphGetRootNodes __cuGraphGetRootNodes = win32api.GetProcAddress(handle, 'cuGraphGetRootNodes') except: pass {{endif}} {{if 'cuGraphGetEdges' in found_functions}} try: global __cuGraphGetEdges __cuGraphGetEdges = win32api.GetProcAddress(handle, 'cuGraphGetEdges') except: pass {{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}} try: global __cuGraphGetEdges_v2 __cuGraphGetEdges_v2 = win32api.GetProcAddress(handle, 'cuGraphGetEdges_v2') except: pass {{endif}} {{if 'cuGraphNodeGetDependencies' in found_functions}} try: global __cuGraphNodeGetDependencies __cuGraphNodeGetDependencies = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies') except: pass {{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}} try: global __cuGraphNodeGetDependencies_v2 __cuGraphNodeGetDependencies_v2 = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies_v2') except: pass {{endif}} {{if 'cuGraphNodeGetDependentNodes' in found_functions}} try: global __cuGraphNodeGetDependentNodes __cuGraphNodeGetDependentNodes = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes') except: pass {{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}} try: global __cuGraphNodeGetDependentNodes_v2 __cuGraphNodeGetDependentNodes_v2 = win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes_v2') except: pass {{endif}} {{if 'cuGraphAddDependencies' in found_functions}} try: global __cuGraphAddDependencies __cuGraphAddDependencies = win32api.GetProcAddress(handle, 'cuGraphAddDependencies') except: pass {{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}} try: global __cuGraphAddDependencies_v2 __cuGraphAddDependencies_v2 = win32api.GetProcAddress(handle, 'cuGraphAddDependencies_v2') except: pass {{endif}} {{if 'cuGraphRemoveDependencies' in found_functions}} try: global __cuGraphRemoveDependencies __cuGraphRemoveDependencies = win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies') except: pass {{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}} try: global __cuGraphRemoveDependencies_v2 __cuGraphRemoveDependencies_v2 = win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies_v2') except: pass {{endif}} {{if 'cuGraphDestroyNode' in found_functions}} try: global __cuGraphDestroyNode __cuGraphDestroyNode = win32api.GetProcAddress(handle, 'cuGraphDestroyNode') except: pass {{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}} try: global __cuGraphInstantiateWithFlags __cuGraphInstantiateWithFlags = win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags') except: pass {{endif}} {{if 'cuGraphExecGetFlags' in found_functions}} try: global __cuGraphExecGetFlags __cuGraphExecGetFlags = win32api.GetProcAddress(handle, 'cuGraphExecGetFlags') except: pass {{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}} try: global __cuGraphExecKernelNodeSetParams_v2 __cuGraphExecKernelNodeSetParams_v2 = win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams_v2') except: pass {{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}} try: global __cuGraphExecMemcpyNodeSetParams __cuGraphExecMemcpyNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams') except: pass {{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}} try: global __cuGraphExecMemsetNodeSetParams __cuGraphExecMemsetNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams') except: pass {{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}} try: global __cuGraphExecHostNodeSetParams __cuGraphExecHostNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams') except: pass {{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}} try: global __cuGraphExecChildGraphNodeSetParams __cuGraphExecChildGraphNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams') except: pass {{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}} try: global __cuGraphExecEventRecordNodeSetEvent __cuGraphExecEventRecordNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent') except: pass {{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}} try: global __cuGraphExecEventWaitNodeSetEvent __cuGraphExecEventWaitNodeSetEvent = win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent') except: pass {{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} try: global __cuGraphExecExternalSemaphoresSignalNodeSetParams __cuGraphExecExternalSemaphoresSignalNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') except: pass {{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} try: global __cuGraphExecExternalSemaphoresWaitNodeSetParams __cuGraphExecExternalSemaphoresWaitNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') except: pass {{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}} try: global __cuGraphNodeSetEnabled __cuGraphNodeSetEnabled = win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled') except: pass {{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}} try: global __cuGraphNodeGetEnabled __cuGraphNodeGetEnabled = win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled') except: pass {{endif}} {{if 'cuGraphExecDestroy' in found_functions}} try: global __cuGraphExecDestroy __cuGraphExecDestroy = win32api.GetProcAddress(handle, 'cuGraphExecDestroy') except: pass {{endif}} {{if 'cuGraphDestroy' in found_functions}} try: global __cuGraphDestroy __cuGraphDestroy = win32api.GetProcAddress(handle, 'cuGraphDestroy') except: pass {{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}} try: global __cuGraphExecUpdate_v2 __cuGraphExecUpdate_v2 = win32api.GetProcAddress(handle, 'cuGraphExecUpdate_v2') except: pass {{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}} try: global __cuGraphKernelNodeCopyAttributes __cuGraphKernelNodeCopyAttributes = win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes') except: pass {{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}} try: global __cuGraphKernelNodeGetAttribute __cuGraphKernelNodeGetAttribute = win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute') except: pass {{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}} try: global __cuGraphKernelNodeSetAttribute __cuGraphKernelNodeSetAttribute = win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute') except: pass {{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}} try: global __cuGraphDebugDotPrint __cuGraphDebugDotPrint = win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint') except: pass {{endif}} {{if 'cuUserObjectCreate' in found_functions}} try: global __cuUserObjectCreate __cuUserObjectCreate = win32api.GetProcAddress(handle, 'cuUserObjectCreate') except: pass {{endif}} {{if 'cuUserObjectRetain' in found_functions}} try: global __cuUserObjectRetain __cuUserObjectRetain = win32api.GetProcAddress(handle, 'cuUserObjectRetain') except: pass {{endif}} {{if 'cuUserObjectRelease' in found_functions}} try: global __cuUserObjectRelease __cuUserObjectRelease = win32api.GetProcAddress(handle, 'cuUserObjectRelease') except: pass {{endif}} {{if 'cuGraphRetainUserObject' in found_functions}} try: global __cuGraphRetainUserObject __cuGraphRetainUserObject = win32api.GetProcAddress(handle, 'cuGraphRetainUserObject') except: pass {{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}} try: global __cuGraphReleaseUserObject __cuGraphReleaseUserObject = win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject') except: pass {{endif}} {{if 'cuGraphAddNode' in found_functions}} try: global __cuGraphAddNode __cuGraphAddNode = win32api.GetProcAddress(handle, 'cuGraphAddNode') except: pass {{endif}} {{if 'cuGraphAddNode_v2' in found_functions}} try: global __cuGraphAddNode_v2 __cuGraphAddNode_v2 = win32api.GetProcAddress(handle, 'cuGraphAddNode_v2') except: pass {{endif}} {{if 'cuGraphNodeSetParams' in found_functions}} try: global __cuGraphNodeSetParams __cuGraphNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphNodeSetParams') except: pass {{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}} try: global __cuGraphExecNodeSetParams __cuGraphExecNodeSetParams = win32api.GetProcAddress(handle, 'cuGraphExecNodeSetParams') except: pass {{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}} try: global __cuGraphConditionalHandleCreate __cuGraphConditionalHandleCreate = win32api.GetProcAddress(handle, 'cuGraphConditionalHandleCreate') except: pass {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} try: global __cuOccupancyMaxActiveBlocksPerMultiprocessor __cuOccupancyMaxActiveBlocksPerMultiprocessor = win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') except: pass {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} try: global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') except: pass {{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}} try: global __cuOccupancyMaxPotentialBlockSize __cuOccupancyMaxPotentialBlockSize = win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize') except: pass {{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}} try: global __cuOccupancyMaxPotentialBlockSizeWithFlags __cuOccupancyMaxPotentialBlockSizeWithFlags = win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') except: pass {{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}} try: global __cuOccupancyAvailableDynamicSMemPerBlock __cuOccupancyAvailableDynamicSMemPerBlock = win32api.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') except: pass {{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}} try: global __cuOccupancyMaxPotentialClusterSize __cuOccupancyMaxPotentialClusterSize = win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize') except: pass {{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}} try: global __cuOccupancyMaxActiveClusters __cuOccupancyMaxActiveClusters = win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters') except: pass {{endif}} {{if 'cuTexRefSetArray' in found_functions}} try: global __cuTexRefSetArray __cuTexRefSetArray = win32api.GetProcAddress(handle, 'cuTexRefSetArray') except: pass {{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}} try: global __cuTexRefSetMipmappedArray __cuTexRefSetMipmappedArray = win32api.GetProcAddress(handle, 'cuTexRefSetMipmappedArray') except: pass {{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}} try: global __cuTexRefSetAddress_v2 __cuTexRefSetAddress_v2 = win32api.GetProcAddress(handle, 'cuTexRefSetAddress_v2') except: pass {{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}} try: global __cuTexRefSetAddress2D_v3 __cuTexRefSetAddress2D_v3 = win32api.GetProcAddress(handle, 'cuTexRefSetAddress2D_v3') except: pass {{endif}} {{if 'cuTexRefSetFormat' in found_functions}} try: global __cuTexRefSetFormat __cuTexRefSetFormat = win32api.GetProcAddress(handle, 'cuTexRefSetFormat') except: pass {{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}} try: global __cuTexRefSetAddressMode __cuTexRefSetAddressMode = win32api.GetProcAddress(handle, 'cuTexRefSetAddressMode') except: pass {{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}} try: global __cuTexRefSetFilterMode __cuTexRefSetFilterMode = win32api.GetProcAddress(handle, 'cuTexRefSetFilterMode') except: pass {{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}} try: global __cuTexRefSetMipmapFilterMode __cuTexRefSetMipmapFilterMode = win32api.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode') except: pass {{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}} try: global __cuTexRefSetMipmapLevelBias __cuTexRefSetMipmapLevelBias = win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias') except: pass {{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}} try: global __cuTexRefSetMipmapLevelClamp __cuTexRefSetMipmapLevelClamp = win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp') except: pass {{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}} try: global __cuTexRefSetMaxAnisotropy __cuTexRefSetMaxAnisotropy = win32api.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy') except: pass {{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}} try: global __cuTexRefSetBorderColor __cuTexRefSetBorderColor = win32api.GetProcAddress(handle, 'cuTexRefSetBorderColor') except: pass {{endif}} {{if 'cuTexRefSetFlags' in found_functions}} try: global __cuTexRefSetFlags __cuTexRefSetFlags = win32api.GetProcAddress(handle, 'cuTexRefSetFlags') except: pass {{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}} try: global __cuTexRefGetAddress_v2 __cuTexRefGetAddress_v2 = win32api.GetProcAddress(handle, 'cuTexRefGetAddress_v2') except: pass {{endif}} {{if 'cuTexRefGetArray' in found_functions}} try: global __cuTexRefGetArray __cuTexRefGetArray = win32api.GetProcAddress(handle, 'cuTexRefGetArray') except: pass {{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}} try: global __cuTexRefGetMipmappedArray __cuTexRefGetMipmappedArray = win32api.GetProcAddress(handle, 'cuTexRefGetMipmappedArray') except: pass {{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}} try: global __cuTexRefGetAddressMode __cuTexRefGetAddressMode = win32api.GetProcAddress(handle, 'cuTexRefGetAddressMode') except: pass {{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}} try: global __cuTexRefGetFilterMode __cuTexRefGetFilterMode = win32api.GetProcAddress(handle, 'cuTexRefGetFilterMode') except: pass {{endif}} {{if 'cuTexRefGetFormat' in found_functions}} try: global __cuTexRefGetFormat __cuTexRefGetFormat = win32api.GetProcAddress(handle, 'cuTexRefGetFormat') except: pass {{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}} try: global __cuTexRefGetMipmapFilterMode __cuTexRefGetMipmapFilterMode = win32api.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode') except: pass {{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}} try: global __cuTexRefGetMipmapLevelBias __cuTexRefGetMipmapLevelBias = win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias') except: pass {{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}} try: global __cuTexRefGetMipmapLevelClamp __cuTexRefGetMipmapLevelClamp = win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp') except: pass {{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}} try: global __cuTexRefGetMaxAnisotropy __cuTexRefGetMaxAnisotropy = win32api.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy') except: pass {{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}} try: global __cuTexRefGetBorderColor __cuTexRefGetBorderColor = win32api.GetProcAddress(handle, 'cuTexRefGetBorderColor') except: pass {{endif}} {{if 'cuTexRefGetFlags' in found_functions}} try: global __cuTexRefGetFlags __cuTexRefGetFlags = win32api.GetProcAddress(handle, 'cuTexRefGetFlags') except: pass {{endif}} {{if 'cuTexRefCreate' in found_functions}} try: global __cuTexRefCreate __cuTexRefCreate = win32api.GetProcAddress(handle, 'cuTexRefCreate') except: pass {{endif}} {{if 'cuTexRefDestroy' in found_functions}} try: global __cuTexRefDestroy __cuTexRefDestroy = win32api.GetProcAddress(handle, 'cuTexRefDestroy') except: pass {{endif}} {{if 'cuSurfRefSetArray' in found_functions}} try: global __cuSurfRefSetArray __cuSurfRefSetArray = win32api.GetProcAddress(handle, 'cuSurfRefSetArray') except: pass {{endif}} {{if 'cuSurfRefGetArray' in found_functions}} try: global __cuSurfRefGetArray __cuSurfRefGetArray = win32api.GetProcAddress(handle, 'cuSurfRefGetArray') except: pass {{endif}} {{if 'cuTexObjectCreate' in found_functions}} try: global __cuTexObjectCreate __cuTexObjectCreate = win32api.GetProcAddress(handle, 'cuTexObjectCreate') except: pass {{endif}} {{if 'cuTexObjectDestroy' in found_functions}} try: global __cuTexObjectDestroy __cuTexObjectDestroy = win32api.GetProcAddress(handle, 'cuTexObjectDestroy') except: pass {{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}} try: global __cuTexObjectGetResourceDesc __cuTexObjectGetResourceDesc = win32api.GetProcAddress(handle, 'cuTexObjectGetResourceDesc') except: pass {{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}} try: global __cuTexObjectGetTextureDesc __cuTexObjectGetTextureDesc = win32api.GetProcAddress(handle, 'cuTexObjectGetTextureDesc') except: pass {{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}} try: global __cuTexObjectGetResourceViewDesc __cuTexObjectGetResourceViewDesc = win32api.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc') except: pass {{endif}} {{if 'cuSurfObjectCreate' in found_functions}} try: global __cuSurfObjectCreate __cuSurfObjectCreate = win32api.GetProcAddress(handle, 'cuSurfObjectCreate') except: pass {{endif}} {{if 'cuSurfObjectDestroy' in found_functions}} try: global __cuSurfObjectDestroy __cuSurfObjectDestroy = win32api.GetProcAddress(handle, 'cuSurfObjectDestroy') except: pass {{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}} try: global __cuSurfObjectGetResourceDesc __cuSurfObjectGetResourceDesc = win32api.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc') except: pass {{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}} try: global __cuTensorMapEncodeTiled __cuTensorMapEncodeTiled = win32api.GetProcAddress(handle, 'cuTensorMapEncodeTiled') except: pass {{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}} try: global __cuTensorMapEncodeIm2col __cuTensorMapEncodeIm2col = win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2col') except: pass {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} try: global __cuTensorMapReplaceAddress __cuTensorMapReplaceAddress = win32api.GetProcAddress(handle, 'cuTensorMapReplaceAddress') except: pass {{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}} try: global __cuDeviceCanAccessPeer __cuDeviceCanAccessPeer = win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer') except: pass {{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}} try: global __cuCtxEnablePeerAccess __cuCtxEnablePeerAccess = win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess') except: pass {{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}} try: global __cuCtxDisablePeerAccess __cuCtxDisablePeerAccess = win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess') except: pass {{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}} try: global __cuDeviceGetP2PAttribute __cuDeviceGetP2PAttribute = win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute') except: pass {{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}} try: global __cuGraphicsUnregisterResource __cuGraphicsUnregisterResource = win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource') except: pass {{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}} try: global __cuGraphicsSubResourceGetMappedArray __cuGraphicsSubResourceGetMappedArray = win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray') except: pass {{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}} try: global __cuGraphicsResourceGetMappedMipmappedArray __cuGraphicsResourceGetMappedMipmappedArray = win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray') except: pass {{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}} try: global __cuGraphicsResourceGetMappedPointer_v2 __cuGraphicsResourceGetMappedPointer_v2 = win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_v2') except: pass {{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}} try: global __cuGraphicsResourceSetMapFlags_v2 __cuGraphicsResourceSetMapFlags_v2 = win32api.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_v2') except: pass {{endif}} {{if 'cuGetProcAddress_v2' in found_functions}} try: global __cuGetProcAddress_v2 __cuGetProcAddress_v2 = win32api.GetProcAddress(handle, 'cuGetProcAddress_v2') except: pass {{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}} try: global __cuCoredumpGetAttribute __cuCoredumpGetAttribute = win32api.GetProcAddress(handle, 'cuCoredumpGetAttribute') except: pass {{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}} try: global __cuCoredumpGetAttributeGlobal __cuCoredumpGetAttributeGlobal = win32api.GetProcAddress(handle, 'cuCoredumpGetAttributeGlobal') except: pass {{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}} try: global __cuCoredumpSetAttribute __cuCoredumpSetAttribute = win32api.GetProcAddress(handle, 'cuCoredumpSetAttribute') except: pass {{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}} try: global __cuCoredumpSetAttributeGlobal __cuCoredumpSetAttributeGlobal = win32api.GetProcAddress(handle, 'cuCoredumpSetAttributeGlobal') except: pass {{endif}} {{if 'cuGetExportTable' in found_functions}} try: global __cuGetExportTable __cuGetExportTable = win32api.GetProcAddress(handle, 'cuGetExportTable') except: pass {{endif}} {{if 'cuGreenCtxCreate' in found_functions}} try: global __cuGreenCtxCreate __cuGreenCtxCreate = win32api.GetProcAddress(handle, 'cuGreenCtxCreate') except: pass {{endif}} {{if 'cuGreenCtxDestroy' in found_functions}} try: global __cuGreenCtxDestroy __cuGreenCtxDestroy = win32api.GetProcAddress(handle, 'cuGreenCtxDestroy') except: pass {{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}} try: global __cuCtxFromGreenCtx __cuCtxFromGreenCtx = win32api.GetProcAddress(handle, 'cuCtxFromGreenCtx') except: pass {{endif}} {{if 'cuDeviceGetDevResource' in found_functions}} try: global __cuDeviceGetDevResource __cuDeviceGetDevResource = win32api.GetProcAddress(handle, 'cuDeviceGetDevResource') except: pass {{endif}} {{if 'cuCtxGetDevResource' in found_functions}} try: global __cuCtxGetDevResource __cuCtxGetDevResource = win32api.GetProcAddress(handle, 'cuCtxGetDevResource') except: pass {{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}} try: global __cuGreenCtxGetDevResource __cuGreenCtxGetDevResource = win32api.GetProcAddress(handle, 'cuGreenCtxGetDevResource') except: pass {{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}} try: global __cuDevSmResourceSplitByCount __cuDevSmResourceSplitByCount = win32api.GetProcAddress(handle, 'cuDevSmResourceSplitByCount') except: pass {{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}} try: global __cuDevResourceGenerateDesc __cuDevResourceGenerateDesc = win32api.GetProcAddress(handle, 'cuDevResourceGenerateDesc') except: pass {{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}} try: global __cuGreenCtxRecordEvent __cuGreenCtxRecordEvent = win32api.GetProcAddress(handle, 'cuGreenCtxRecordEvent') except: pass {{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}} try: global __cuGreenCtxWaitEvent __cuGreenCtxWaitEvent = win32api.GetProcAddress(handle, 'cuGreenCtxWaitEvent') except: pass {{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}} try: global __cuStreamGetGreenCtx __cuStreamGetGreenCtx = win32api.GetProcAddress(handle, 'cuStreamGetGreenCtx') except: pass {{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}} try: global __cuGreenCtxStreamCreate __cuGreenCtxStreamCreate = win32api.GetProcAddress(handle, 'cuGreenCtxStreamCreate') except: pass {{endif}} {{if 'cuProfilerStart' in found_functions}} try: global __cuProfilerStart __cuProfilerStart = win32api.GetProcAddress(handle, 'cuProfilerStart') except: pass {{endif}} {{if 'cuProfilerStop' in found_functions}} try: global __cuProfilerStop __cuProfilerStop = win32api.GetProcAddress(handle, 'cuProfilerStop') except: pass {{endif}} {{if True}} try: global __cuGraphicsEGLRegisterImage __cuGraphicsEGLRegisterImage = win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage') except: pass {{endif}} {{if True}} try: global __cuEGLStreamConsumerConnect __cuEGLStreamConsumerConnect = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect') except: pass {{endif}} {{if True}} try: global __cuEGLStreamConsumerConnectWithFlags __cuEGLStreamConsumerConnectWithFlags = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags') except: pass {{endif}} {{if True}} try: global __cuEGLStreamConsumerDisconnect __cuEGLStreamConsumerDisconnect = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect') except: pass {{endif}} {{if True}} try: global __cuEGLStreamConsumerAcquireFrame __cuEGLStreamConsumerAcquireFrame = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame') except: pass {{endif}} {{if True}} try: global __cuEGLStreamConsumerReleaseFrame __cuEGLStreamConsumerReleaseFrame = win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame') except: pass {{endif}} {{if True}} try: global __cuEGLStreamProducerConnect __cuEGLStreamProducerConnect = win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect') except: pass {{endif}} {{if True}} try: global __cuEGLStreamProducerDisconnect __cuEGLStreamProducerDisconnect = win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect') except: pass {{endif}} {{if True}} try: global __cuEGLStreamProducerPresentFrame __cuEGLStreamProducerPresentFrame = win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame') except: pass {{endif}} {{if True}} try: global __cuEGLStreamProducerReturnFrame __cuEGLStreamProducerReturnFrame = win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame') except: pass {{endif}} {{if True}} try: global __cuGraphicsResourceGetMappedEglFrame __cuGraphicsResourceGetMappedEglFrame = win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame') except: pass {{endif}} {{if True}} try: global __cuEventCreateFromEGLSync __cuEventCreateFromEGLSync = win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync') except: pass {{endif}} {{if True}} try: global __cuGraphicsGLRegisterBuffer __cuGraphicsGLRegisterBuffer = win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer') except: pass {{endif}} {{if True}} try: global __cuGraphicsGLRegisterImage __cuGraphicsGLRegisterImage = win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage') except: pass {{endif}} {{if True}} try: global __cuGLGetDevices_v2 __cuGLGetDevices_v2 = win32api.GetProcAddress(handle, 'cuGLGetDevices_v2') except: pass {{endif}} {{if True}} try: global __cuVDPAUGetDevice __cuVDPAUGetDevice = win32api.GetProcAddress(handle, 'cuVDPAUGetDevice') except: pass {{endif}} {{if True}} try: global __cuVDPAUCtxCreate_v2 __cuVDPAUCtxCreate_v2 = win32api.GetProcAddress(handle, 'cuVDPAUCtxCreate_v2') except: pass {{endif}} {{if True}} try: global __cuGraphicsVDPAURegisterVideoSurface __cuGraphicsVDPAURegisterVideoSurface = win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface') except: pass {{endif}} {{if True}} try: global __cuGraphicsVDPAURegisterOutputSurface __cuGraphicsVDPAURegisterOutputSurface = win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface') except: pass {{endif}} {{else}} # Load using dlsym if usePTDS: # Get all PTDS version of functions pass {{if 'cuMemcpy' in found_functions}} global __cuMemcpy __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds') {{endif}} {{if 'cuMemcpyPeer' in found_functions}} global __cuMemcpyPeer __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds') {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} global __cuMemcpyHtoD_v2 __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds') {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} global __cuMemcpyDtoH_v2 __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds') {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} global __cuMemcpyDtoD_v2 __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds') {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} global __cuMemcpyDtoA_v2 __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds') {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} global __cuMemcpyAtoD_v2 __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds') {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} global __cuMemcpyHtoA_v2 __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds') {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} global __cuMemcpyAtoH_v2 __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds') {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} global __cuMemcpyAtoA_v2 __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds') {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} global __cuMemcpy2D_v2 __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds') {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} global __cuMemcpy2DUnaligned_v2 __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds') {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} global __cuMemcpy3D_v2 __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds') {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} global __cuMemcpy3DPeer __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds') {{endif}} {{if 'cuMemcpyAsync' in found_functions}} global __cuMemcpyAsync __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz') {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} global __cuMemcpyPeerAsync __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz') {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} global __cuMemcpyHtoDAsync_v2 __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} global __cuMemcpyDtoHAsync_v2 __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} global __cuMemcpyDtoDAsync_v2 __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} global __cuMemcpyHtoAAsync_v2 __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz') {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} global __cuMemcpyAtoHAsync_v2 __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz') {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} global __cuMemcpy2DAsync_v2 __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz') {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} global __cuMemcpy3DAsync_v2 __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz') {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} global __cuMemcpy3DPeerAsync __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz') {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds') {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} global __cuMemsetD16_v2 __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds') {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} global __cuMemsetD32_v2 __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds') {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} global __cuMemsetD2D8_v2 __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds') {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} global __cuMemsetD2D16_v2 __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds') {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} global __cuMemsetD2D32_v2 __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds') {{endif}} {{if 'cuMemsetD8Async' in found_functions}} global __cuMemsetD8Async __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz') {{endif}} {{if 'cuMemsetD16Async' in found_functions}} global __cuMemsetD16Async __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz') {{endif}} {{if 'cuMemsetD32Async' in found_functions}} global __cuMemsetD32Async __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz') {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} global __cuMemsetD2D8Async __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz') {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} global __cuMemsetD2D16Async __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz') {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} global __cuMemsetD2D32Async __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz') {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz') {{endif}} {{if 'cuMemFreeAsync' in found_functions}} global __cuMemFreeAsync __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz') {{endif}} {{if 'cuMemAllocAsync' in found_functions}} global __cuMemAllocAsync __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz') {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} global __cuMemAllocFromPoolAsync __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz') {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} global __cuMemPrefetchAsync __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz') {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} global __cuMemPrefetchAsync_v2 __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2_ptsz') {{endif}} {{if 'cuStreamGetPriority' in found_functions}} global __cuStreamGetPriority __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz') {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz') {{endif}} {{if 'cuStreamGetId' in found_functions}} global __cuStreamGetId __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId_ptsz') {{endif}} {{if 'cuStreamGetCtx' in found_functions}} global __cuStreamGetCtx __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz') {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} global __cuStreamGetCtx_v2 __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2_ptsz') {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} global __cuStreamWaitEvent __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz') {{endif}} {{if 'cuStreamAddCallback' in found_functions}} global __cuStreamAddCallback __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz') {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} global __cuStreamBeginCapture_v2 __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz') {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} global __cuStreamBeginCaptureToGraph __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph_ptsz') {{endif}} {{if 'cuStreamEndCapture' in found_functions}} global __cuStreamEndCapture __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz') {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} global __cuStreamIsCapturing __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz') {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} global __cuStreamGetCaptureInfo_v2 __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz') {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} global __cuStreamGetCaptureInfo_v3 __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3_ptsz') {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} global __cuStreamUpdateCaptureDependencies __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz') {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} global __cuStreamUpdateCaptureDependencies_v2 __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} global __cuStreamAttachMemAsync __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz') {{endif}} {{if 'cuStreamQuery' in found_functions}} global __cuStreamQuery __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz') {{endif}} {{if 'cuStreamSynchronize' in found_functions}} global __cuStreamSynchronize __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz') {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} global __cuStreamCopyAttributes __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz') {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} global __cuStreamGetAttribute __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz') {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} global __cuStreamSetAttribute __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz') {{endif}} {{if 'cuEventRecord' in found_functions}} global __cuEventRecord __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz') {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} global __cuEventRecordWithFlags __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz') {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} global __cuSignalExternalSemaphoresAsync __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz') {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} global __cuWaitExternalSemaphoresAsync __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz') {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} global __cuStreamWaitValue32_v2 __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2_ptsz') {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} global __cuStreamWaitValue64_v2 __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2_ptsz') {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} global __cuStreamWriteValue32_v2 __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2_ptsz') {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} global __cuStreamWriteValue64_v2 __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2_ptsz') {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} global __cuStreamBatchMemOp_v2 __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2_ptsz') {{endif}} {{if 'cuLaunchKernel' in found_functions}} global __cuLaunchKernel __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz') {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} global __cuLaunchKernelEx __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx_ptsz') {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} global __cuLaunchCooperativeKernel __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz') {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} global __cuLaunchHostFunc __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz') {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} global __cuGraphInstantiateWithParams __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams_ptsz') {{endif}} {{if 'cuGraphUpload' in found_functions}} global __cuGraphUpload __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz') {{endif}} {{if 'cuGraphLaunch' in found_functions}} global __cuGraphLaunch __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz') {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} global __cuGraphicsMapResources __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz') {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} global __cuGraphicsUnmapResources __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources_ptsz') {{endif}} else: # Else get the regular version pass {{if 'cuMemcpy' in found_functions}} global __cuMemcpy __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy') {{endif}} {{if 'cuMemcpyPeer' in found_functions}} global __cuMemcpyPeer __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer') {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} global __cuMemcpyHtoD_v2 __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2') {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} global __cuMemcpyDtoH_v2 __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2') {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} global __cuMemcpyDtoD_v2 __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2') {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} global __cuMemcpyDtoA_v2 __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2') {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} global __cuMemcpyAtoD_v2 __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2') {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} global __cuMemcpyHtoA_v2 __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2') {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} global __cuMemcpyAtoH_v2 __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2') {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} global __cuMemcpyAtoA_v2 __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2') {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} global __cuMemcpy2D_v2 __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2') {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} global __cuMemcpy2DUnaligned_v2 __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2') {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} global __cuMemcpy3D_v2 __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2') {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} global __cuMemcpy3DPeer __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer') {{endif}} {{if 'cuMemcpyAsync' in found_functions}} global __cuMemcpyAsync __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync') {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} global __cuMemcpyPeerAsync __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync') {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} global __cuMemcpyHtoDAsync_v2 __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2') {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} global __cuMemcpyDtoHAsync_v2 __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2') {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} global __cuMemcpyDtoDAsync_v2 __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2') {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} global __cuMemcpyHtoAAsync_v2 __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2') {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} global __cuMemcpyAtoHAsync_v2 __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2') {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} global __cuMemcpy2DAsync_v2 __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2') {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} global __cuMemcpy3DAsync_v2 __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2') {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} global __cuMemcpy3DPeerAsync __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync') {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2') {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} global __cuMemsetD16_v2 __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2') {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} global __cuMemsetD32_v2 __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2') {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} global __cuMemsetD2D8_v2 __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2') {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} global __cuMemsetD2D16_v2 __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2') {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} global __cuMemsetD2D32_v2 __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2') {{endif}} {{if 'cuMemsetD8Async' in found_functions}} global __cuMemsetD8Async __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async') {{endif}} {{if 'cuMemsetD16Async' in found_functions}} global __cuMemsetD16Async __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async') {{endif}} {{if 'cuMemsetD32Async' in found_functions}} global __cuMemsetD32Async __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async') {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} global __cuMemsetD2D8Async __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async') {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} global __cuMemsetD2D16Async __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async') {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} global __cuMemsetD2D32Async __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async') {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync') {{endif}} {{if 'cuMemFreeAsync' in found_functions}} global __cuMemFreeAsync __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync') {{endif}} {{if 'cuMemAllocAsync' in found_functions}} global __cuMemAllocAsync __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync') {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} global __cuMemAllocFromPoolAsync __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync') {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} global __cuMemPrefetchAsync __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync') {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} global __cuMemPrefetchAsync_v2 __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2') {{endif}} {{if 'cuStreamGetPriority' in found_functions}} global __cuStreamGetPriority __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority') {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags') {{endif}} {{if 'cuStreamGetId' in found_functions}} global __cuStreamGetId __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId') {{endif}} {{if 'cuStreamGetCtx' in found_functions}} global __cuStreamGetCtx __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx') {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} global __cuStreamGetCtx_v2 __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2') {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} global __cuStreamWaitEvent __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent') {{endif}} {{if 'cuStreamAddCallback' in found_functions}} global __cuStreamAddCallback __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback') {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} global __cuStreamBeginCapture_v2 __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2') {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} global __cuStreamBeginCaptureToGraph __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph') {{endif}} {{if 'cuStreamEndCapture' in found_functions}} global __cuStreamEndCapture __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture') {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} global __cuStreamIsCapturing __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing') {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} global __cuStreamGetCaptureInfo_v2 __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2') {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} global __cuStreamGetCaptureInfo_v3 __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3') {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} global __cuStreamUpdateCaptureDependencies __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies') {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} global __cuStreamUpdateCaptureDependencies_v2 __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2') {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} global __cuStreamAttachMemAsync __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync') {{endif}} {{if 'cuStreamQuery' in found_functions}} global __cuStreamQuery __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery') {{endif}} {{if 'cuStreamSynchronize' in found_functions}} global __cuStreamSynchronize __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize') {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} global __cuStreamCopyAttributes __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes') {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} global __cuStreamGetAttribute __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute') {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} global __cuStreamSetAttribute __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute') {{endif}} {{if 'cuEventRecord' in found_functions}} global __cuEventRecord __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord') {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} global __cuEventRecordWithFlags __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags') {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} global __cuSignalExternalSemaphoresAsync __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync') {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} global __cuWaitExternalSemaphoresAsync __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync') {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} global __cuStreamWaitValue32_v2 __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2') {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} global __cuStreamWaitValue64_v2 __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2') {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} global __cuStreamWriteValue32_v2 __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2') {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} global __cuStreamWriteValue64_v2 __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2') {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} global __cuStreamBatchMemOp_v2 __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2') {{endif}} {{if 'cuLaunchKernel' in found_functions}} global __cuLaunchKernel __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel') {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} global __cuLaunchKernelEx __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx') {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} global __cuLaunchCooperativeKernel __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel') {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} global __cuLaunchHostFunc __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc') {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} global __cuGraphInstantiateWithParams __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams') {{endif}} {{if 'cuGraphUpload' in found_functions}} global __cuGraphUpload __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload') {{endif}} {{if 'cuGraphLaunch' in found_functions}} global __cuGraphLaunch __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch') {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} global __cuGraphicsMapResources __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources') {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} global __cuGraphicsUnmapResources __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources') {{endif}} # Get remaining functions {{if 'cuGetErrorString' in found_functions}} global __cuGetErrorString __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString') {{endif}} {{if 'cuGetErrorName' in found_functions}} global __cuGetErrorName __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName') {{endif}} {{if 'cuInit' in found_functions}} global __cuInit __cuInit = dlfcn.dlsym(handle, 'cuInit') {{endif}} {{if 'cuDriverGetVersion' in found_functions}} global __cuDriverGetVersion __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion') {{endif}} {{if 'cuDeviceGet' in found_functions}} global __cuDeviceGet __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet') {{endif}} {{if 'cuDeviceGetCount' in found_functions}} global __cuDeviceGetCount __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount') {{endif}} {{if 'cuDeviceGetName' in found_functions}} global __cuDeviceGetName __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName') {{endif}} {{if 'cuDeviceGetUuid' in found_functions}} global __cuDeviceGetUuid __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid') {{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}} global __cuDeviceGetUuid_v2 __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2') {{endif}} {{if 'cuDeviceGetLuid' in found_functions}} global __cuDeviceGetLuid __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid') {{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}} global __cuDeviceTotalMem_v2 __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2') {{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}} global __cuDeviceGetTexture1DLinearMaxWidth __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth') {{endif}} {{if 'cuDeviceGetAttribute' in found_functions}} global __cuDeviceGetAttribute __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute') {{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}} global __cuDeviceGetNvSciSyncAttributes __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes') {{endif}} {{if 'cuDeviceSetMemPool' in found_functions}} global __cuDeviceSetMemPool __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool') {{endif}} {{if 'cuDeviceGetMemPool' in found_functions}} global __cuDeviceGetMemPool __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool') {{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}} global __cuDeviceGetDefaultMemPool __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool') {{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}} global __cuDeviceGetExecAffinitySupport __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport') {{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}} global __cuFlushGPUDirectRDMAWrites __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites') {{endif}} {{if 'cuDeviceGetProperties' in found_functions}} global __cuDeviceGetProperties __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties') {{endif}} {{if 'cuDeviceComputeCapability' in found_functions}} global __cuDeviceComputeCapability __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability') {{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}} global __cuDevicePrimaryCtxRetain __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain') {{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}} global __cuDevicePrimaryCtxRelease_v2 __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2') {{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}} global __cuDevicePrimaryCtxSetFlags_v2 __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2') {{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}} global __cuDevicePrimaryCtxGetState __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState') {{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}} global __cuDevicePrimaryCtxReset_v2 __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2') {{endif}} {{if 'cuCtxCreate_v2' in found_functions}} global __cuCtxCreate_v2 __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2') {{endif}} {{if 'cuCtxCreate_v3' in found_functions}} global __cuCtxCreate_v3 __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3') {{endif}} {{if 'cuCtxCreate_v4' in found_functions}} global __cuCtxCreate_v4 __cuCtxCreate_v4 = dlfcn.dlsym(handle, 'cuCtxCreate_v4') {{endif}} {{if 'cuCtxDestroy_v2' in found_functions}} global __cuCtxDestroy_v2 __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2') {{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}} global __cuCtxPushCurrent_v2 __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2') {{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}} global __cuCtxPopCurrent_v2 __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2') {{endif}} {{if 'cuCtxSetCurrent' in found_functions}} global __cuCtxSetCurrent __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent') {{endif}} {{if 'cuCtxGetCurrent' in found_functions}} global __cuCtxGetCurrent __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent') {{endif}} {{if 'cuCtxGetDevice' in found_functions}} global __cuCtxGetDevice __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice') {{endif}} {{if 'cuCtxGetFlags' in found_functions}} global __cuCtxGetFlags __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags') {{endif}} {{if 'cuCtxSetFlags' in found_functions}} global __cuCtxSetFlags __cuCtxSetFlags = dlfcn.dlsym(handle, 'cuCtxSetFlags') {{endif}} {{if 'cuCtxGetId' in found_functions}} global __cuCtxGetId __cuCtxGetId = dlfcn.dlsym(handle, 'cuCtxGetId') {{endif}} {{if 'cuCtxSynchronize' in found_functions}} global __cuCtxSynchronize __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize') {{endif}} {{if 'cuCtxSetLimit' in found_functions}} global __cuCtxSetLimit __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit') {{endif}} {{if 'cuCtxGetLimit' in found_functions}} global __cuCtxGetLimit __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit') {{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}} global __cuCtxGetCacheConfig __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig') {{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}} global __cuCtxSetCacheConfig __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig') {{endif}} {{if 'cuCtxGetApiVersion' in found_functions}} global __cuCtxGetApiVersion __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion') {{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}} global __cuCtxGetStreamPriorityRange __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange') {{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}} global __cuCtxResetPersistingL2Cache __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache') {{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}} global __cuCtxGetExecAffinity __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity') {{endif}} {{if 'cuCtxRecordEvent' in found_functions}} global __cuCtxRecordEvent __cuCtxRecordEvent = dlfcn.dlsym(handle, 'cuCtxRecordEvent') {{endif}} {{if 'cuCtxWaitEvent' in found_functions}} global __cuCtxWaitEvent __cuCtxWaitEvent = dlfcn.dlsym(handle, 'cuCtxWaitEvent') {{endif}} {{if 'cuCtxAttach' in found_functions}} global __cuCtxAttach __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach') {{endif}} {{if 'cuCtxDetach' in found_functions}} global __cuCtxDetach __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach') {{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}} global __cuCtxGetSharedMemConfig __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig') {{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}} global __cuCtxSetSharedMemConfig __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig') {{endif}} {{if 'cuModuleLoad' in found_functions}} global __cuModuleLoad __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad') {{endif}} {{if 'cuModuleLoadData' in found_functions}} global __cuModuleLoadData __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData') {{endif}} {{if 'cuModuleLoadDataEx' in found_functions}} global __cuModuleLoadDataEx __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx') {{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}} global __cuModuleLoadFatBinary __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary') {{endif}} {{if 'cuModuleUnload' in found_functions}} global __cuModuleUnload __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload') {{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}} global __cuModuleGetLoadingMode __cuModuleGetLoadingMode = dlfcn.dlsym(handle, 'cuModuleGetLoadingMode') {{endif}} {{if 'cuModuleGetFunction' in found_functions}} global __cuModuleGetFunction __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction') {{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}} global __cuModuleGetFunctionCount __cuModuleGetFunctionCount = dlfcn.dlsym(handle, 'cuModuleGetFunctionCount') {{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}} global __cuModuleEnumerateFunctions __cuModuleEnumerateFunctions = dlfcn.dlsym(handle, 'cuModuleEnumerateFunctions') {{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}} global __cuModuleGetGlobal_v2 __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2') {{endif}} {{if 'cuLinkCreate_v2' in found_functions}} global __cuLinkCreate_v2 __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2') {{endif}} {{if 'cuLinkAddData_v2' in found_functions}} global __cuLinkAddData_v2 __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2') {{endif}} {{if 'cuLinkAddFile_v2' in found_functions}} global __cuLinkAddFile_v2 __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2') {{endif}} {{if 'cuLinkComplete' in found_functions}} global __cuLinkComplete __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete') {{endif}} {{if 'cuLinkDestroy' in found_functions}} global __cuLinkDestroy __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy') {{endif}} {{if 'cuModuleGetTexRef' in found_functions}} global __cuModuleGetTexRef __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef') {{endif}} {{if 'cuModuleGetSurfRef' in found_functions}} global __cuModuleGetSurfRef __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef') {{endif}} {{if 'cuLibraryLoadData' in found_functions}} global __cuLibraryLoadData __cuLibraryLoadData = dlfcn.dlsym(handle, 'cuLibraryLoadData') {{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}} global __cuLibraryLoadFromFile __cuLibraryLoadFromFile = dlfcn.dlsym(handle, 'cuLibraryLoadFromFile') {{endif}} {{if 'cuLibraryUnload' in found_functions}} global __cuLibraryUnload __cuLibraryUnload = dlfcn.dlsym(handle, 'cuLibraryUnload') {{endif}} {{if 'cuLibraryGetKernel' in found_functions}} global __cuLibraryGetKernel __cuLibraryGetKernel = dlfcn.dlsym(handle, 'cuLibraryGetKernel') {{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}} global __cuLibraryGetKernelCount __cuLibraryGetKernelCount = dlfcn.dlsym(handle, 'cuLibraryGetKernelCount') {{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}} global __cuLibraryEnumerateKernels __cuLibraryEnumerateKernels = dlfcn.dlsym(handle, 'cuLibraryEnumerateKernels') {{endif}} {{if 'cuLibraryGetModule' in found_functions}} global __cuLibraryGetModule __cuLibraryGetModule = dlfcn.dlsym(handle, 'cuLibraryGetModule') {{endif}} {{if 'cuKernelGetFunction' in found_functions}} global __cuKernelGetFunction __cuKernelGetFunction = dlfcn.dlsym(handle, 'cuKernelGetFunction') {{endif}} {{if 'cuKernelGetLibrary' in found_functions}} global __cuKernelGetLibrary __cuKernelGetLibrary = dlfcn.dlsym(handle, 'cuKernelGetLibrary') {{endif}} {{if 'cuLibraryGetGlobal' in found_functions}} global __cuLibraryGetGlobal __cuLibraryGetGlobal = dlfcn.dlsym(handle, 'cuLibraryGetGlobal') {{endif}} {{if 'cuLibraryGetManaged' in found_functions}} global __cuLibraryGetManaged __cuLibraryGetManaged = dlfcn.dlsym(handle, 'cuLibraryGetManaged') {{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}} global __cuLibraryGetUnifiedFunction __cuLibraryGetUnifiedFunction = dlfcn.dlsym(handle, 'cuLibraryGetUnifiedFunction') {{endif}} {{if 'cuKernelGetAttribute' in found_functions}} global __cuKernelGetAttribute __cuKernelGetAttribute = dlfcn.dlsym(handle, 'cuKernelGetAttribute') {{endif}} {{if 'cuKernelSetAttribute' in found_functions}} global __cuKernelSetAttribute __cuKernelSetAttribute = dlfcn.dlsym(handle, 'cuKernelSetAttribute') {{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}} global __cuKernelSetCacheConfig __cuKernelSetCacheConfig = dlfcn.dlsym(handle, 'cuKernelSetCacheConfig') {{endif}} {{if 'cuKernelGetName' in found_functions}} global __cuKernelGetName __cuKernelGetName = dlfcn.dlsym(handle, 'cuKernelGetName') {{endif}} {{if 'cuKernelGetParamInfo' in found_functions}} global __cuKernelGetParamInfo __cuKernelGetParamInfo = dlfcn.dlsym(handle, 'cuKernelGetParamInfo') {{endif}} {{if 'cuMemGetInfo_v2' in found_functions}} global __cuMemGetInfo_v2 __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2') {{endif}} {{if 'cuMemAlloc_v2' in found_functions}} global __cuMemAlloc_v2 __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2') {{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}} global __cuMemAllocPitch_v2 __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2') {{endif}} {{if 'cuMemFree_v2' in found_functions}} global __cuMemFree_v2 __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2') {{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}} global __cuMemGetAddressRange_v2 __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2') {{endif}} {{if 'cuMemAllocHost_v2' in found_functions}} global __cuMemAllocHost_v2 __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2') {{endif}} {{if 'cuMemFreeHost' in found_functions}} global __cuMemFreeHost __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost') {{endif}} {{if 'cuMemHostAlloc' in found_functions}} global __cuMemHostAlloc __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc') {{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}} global __cuMemHostGetDevicePointer_v2 __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2') {{endif}} {{if 'cuMemHostGetFlags' in found_functions}} global __cuMemHostGetFlags __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags') {{endif}} {{if 'cuMemAllocManaged' in found_functions}} global __cuMemAllocManaged __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged') {{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}} global __cuDeviceRegisterAsyncNotification __cuDeviceRegisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceRegisterAsyncNotification') {{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}} global __cuDeviceUnregisterAsyncNotification __cuDeviceUnregisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceUnregisterAsyncNotification') {{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}} global __cuDeviceGetByPCIBusId __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId') {{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}} global __cuDeviceGetPCIBusId __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId') {{endif}} {{if 'cuIpcGetEventHandle' in found_functions}} global __cuIpcGetEventHandle __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle') {{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}} global __cuIpcOpenEventHandle __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle') {{endif}} {{if 'cuIpcGetMemHandle' in found_functions}} global __cuIpcGetMemHandle __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle') {{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}} global __cuIpcOpenMemHandle_v2 __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2') {{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}} global __cuIpcCloseMemHandle __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle') {{endif}} {{if 'cuMemHostRegister_v2' in found_functions}} global __cuMemHostRegister_v2 __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2') {{endif}} {{if 'cuMemHostUnregister' in found_functions}} global __cuMemHostUnregister __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister') {{endif}} {{if 'cuArrayCreate_v2' in found_functions}} global __cuArrayCreate_v2 __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2') {{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}} global __cuArrayGetDescriptor_v2 __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2') {{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}} global __cuArrayGetSparseProperties __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties') {{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}} global __cuMipmappedArrayGetSparseProperties __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties') {{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}} global __cuArrayGetMemoryRequirements __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements') {{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}} global __cuMipmappedArrayGetMemoryRequirements __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements') {{endif}} {{if 'cuArrayGetPlane' in found_functions}} global __cuArrayGetPlane __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane') {{endif}} {{if 'cuArrayDestroy' in found_functions}} global __cuArrayDestroy __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy') {{endif}} {{if 'cuArray3DCreate_v2' in found_functions}} global __cuArray3DCreate_v2 __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2') {{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}} global __cuArray3DGetDescriptor_v2 __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2') {{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}} global __cuMipmappedArrayCreate __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate') {{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}} global __cuMipmappedArrayGetLevel __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel') {{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}} global __cuMipmappedArrayDestroy __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy') {{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}} global __cuMemGetHandleForAddressRange __cuMemGetHandleForAddressRange = dlfcn.dlsym(handle, 'cuMemGetHandleForAddressRange') {{endif}} {{if 'cuMemAddressReserve' in found_functions}} global __cuMemAddressReserve __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve') {{endif}} {{if 'cuMemAddressFree' in found_functions}} global __cuMemAddressFree __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree') {{endif}} {{if 'cuMemCreate' in found_functions}} global __cuMemCreate __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate') {{endif}} {{if 'cuMemRelease' in found_functions}} global __cuMemRelease __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease') {{endif}} {{if 'cuMemMap' in found_functions}} global __cuMemMap __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap') {{endif}} {{if 'cuMemUnmap' in found_functions}} global __cuMemUnmap __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap') {{endif}} {{if 'cuMemSetAccess' in found_functions}} global __cuMemSetAccess __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess') {{endif}} {{if 'cuMemGetAccess' in found_functions}} global __cuMemGetAccess __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess') {{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}} global __cuMemExportToShareableHandle __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle') {{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}} global __cuMemImportFromShareableHandle __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle') {{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}} global __cuMemGetAllocationGranularity __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity') {{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}} global __cuMemGetAllocationPropertiesFromHandle __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle') {{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}} global __cuMemRetainAllocationHandle __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle') {{endif}} {{if 'cuMemPoolTrimTo' in found_functions}} global __cuMemPoolTrimTo __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo') {{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}} global __cuMemPoolSetAttribute __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute') {{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}} global __cuMemPoolGetAttribute __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute') {{endif}} {{if 'cuMemPoolSetAccess' in found_functions}} global __cuMemPoolSetAccess __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess') {{endif}} {{if 'cuMemPoolGetAccess' in found_functions}} global __cuMemPoolGetAccess __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess') {{endif}} {{if 'cuMemPoolCreate' in found_functions}} global __cuMemPoolCreate __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate') {{endif}} {{if 'cuMemPoolDestroy' in found_functions}} global __cuMemPoolDestroy __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy') {{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}} global __cuMemPoolExportToShareableHandle __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle') {{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}} global __cuMemPoolImportFromShareableHandle __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle') {{endif}} {{if 'cuMemPoolExportPointer' in found_functions}} global __cuMemPoolExportPointer __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer') {{endif}} {{if 'cuMemPoolImportPointer' in found_functions}} global __cuMemPoolImportPointer __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer') {{endif}} {{if 'cuMulticastCreate' in found_functions}} global __cuMulticastCreate __cuMulticastCreate = dlfcn.dlsym(handle, 'cuMulticastCreate') {{endif}} {{if 'cuMulticastAddDevice' in found_functions}} global __cuMulticastAddDevice __cuMulticastAddDevice = dlfcn.dlsym(handle, 'cuMulticastAddDevice') {{endif}} {{if 'cuMulticastBindMem' in found_functions}} global __cuMulticastBindMem __cuMulticastBindMem = dlfcn.dlsym(handle, 'cuMulticastBindMem') {{endif}} {{if 'cuMulticastBindAddr' in found_functions}} global __cuMulticastBindAddr __cuMulticastBindAddr = dlfcn.dlsym(handle, 'cuMulticastBindAddr') {{endif}} {{if 'cuMulticastUnbind' in found_functions}} global __cuMulticastUnbind __cuMulticastUnbind = dlfcn.dlsym(handle, 'cuMulticastUnbind') {{endif}} {{if 'cuMulticastGetGranularity' in found_functions}} global __cuMulticastGetGranularity __cuMulticastGetGranularity = dlfcn.dlsym(handle, 'cuMulticastGetGranularity') {{endif}} {{if 'cuPointerGetAttribute' in found_functions}} global __cuPointerGetAttribute __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute') {{endif}} {{if 'cuMemAdvise' in found_functions}} global __cuMemAdvise __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise') {{endif}} {{if 'cuMemAdvise_v2' in found_functions}} global __cuMemAdvise_v2 __cuMemAdvise_v2 = dlfcn.dlsym(handle, 'cuMemAdvise_v2') {{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}} global __cuMemRangeGetAttribute __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute') {{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}} global __cuMemRangeGetAttributes __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes') {{endif}} {{if 'cuPointerSetAttribute' in found_functions}} global __cuPointerSetAttribute __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute') {{endif}} {{if 'cuPointerGetAttributes' in found_functions}} global __cuPointerGetAttributes __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes') {{endif}} {{if 'cuStreamCreate' in found_functions}} global __cuStreamCreate __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate') {{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}} global __cuStreamCreateWithPriority __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority') {{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}} global __cuThreadExchangeStreamCaptureMode __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode') {{endif}} {{if 'cuStreamDestroy_v2' in found_functions}} global __cuStreamDestroy_v2 __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2') {{endif}} {{if 'cuEventCreate' in found_functions}} global __cuEventCreate __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate') {{endif}} {{if 'cuEventQuery' in found_functions}} global __cuEventQuery __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery') {{endif}} {{if 'cuEventSynchronize' in found_functions}} global __cuEventSynchronize __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize') {{endif}} {{if 'cuEventDestroy_v2' in found_functions}} global __cuEventDestroy_v2 __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2') {{endif}} {{if 'cuEventElapsedTime' in found_functions}} global __cuEventElapsedTime __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime') {{endif}} {{if 'cuImportExternalMemory' in found_functions}} global __cuImportExternalMemory __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory') {{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}} global __cuExternalMemoryGetMappedBuffer __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer') {{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}} global __cuExternalMemoryGetMappedMipmappedArray __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray') {{endif}} {{if 'cuDestroyExternalMemory' in found_functions}} global __cuDestroyExternalMemory __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory') {{endif}} {{if 'cuImportExternalSemaphore' in found_functions}} global __cuImportExternalSemaphore __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore') {{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}} global __cuDestroyExternalSemaphore __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore') {{endif}} {{if 'cuFuncGetAttribute' in found_functions}} global __cuFuncGetAttribute __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute') {{endif}} {{if 'cuFuncSetAttribute' in found_functions}} global __cuFuncSetAttribute __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute') {{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}} global __cuFuncSetCacheConfig __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig') {{endif}} {{if 'cuFuncGetModule' in found_functions}} global __cuFuncGetModule __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule') {{endif}} {{if 'cuFuncGetName' in found_functions}} global __cuFuncGetName __cuFuncGetName = dlfcn.dlsym(handle, 'cuFuncGetName') {{endif}} {{if 'cuFuncGetParamInfo' in found_functions}} global __cuFuncGetParamInfo __cuFuncGetParamInfo = dlfcn.dlsym(handle, 'cuFuncGetParamInfo') {{endif}} {{if 'cuFuncIsLoaded' in found_functions}} global __cuFuncIsLoaded __cuFuncIsLoaded = dlfcn.dlsym(handle, 'cuFuncIsLoaded') {{endif}} {{if 'cuFuncLoad' in found_functions}} global __cuFuncLoad __cuFuncLoad = dlfcn.dlsym(handle, 'cuFuncLoad') {{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}} global __cuLaunchCooperativeKernelMultiDevice __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice') {{endif}} {{if 'cuFuncSetBlockShape' in found_functions}} global __cuFuncSetBlockShape __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape') {{endif}} {{if 'cuFuncSetSharedSize' in found_functions}} global __cuFuncSetSharedSize __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize') {{endif}} {{if 'cuParamSetSize' in found_functions}} global __cuParamSetSize __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize') {{endif}} {{if 'cuParamSeti' in found_functions}} global __cuParamSeti __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti') {{endif}} {{if 'cuParamSetf' in found_functions}} global __cuParamSetf __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf') {{endif}} {{if 'cuParamSetv' in found_functions}} global __cuParamSetv __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv') {{endif}} {{if 'cuLaunch' in found_functions}} global __cuLaunch __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch') {{endif}} {{if 'cuLaunchGrid' in found_functions}} global __cuLaunchGrid __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid') {{endif}} {{if 'cuLaunchGridAsync' in found_functions}} global __cuLaunchGridAsync __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync') {{endif}} {{if 'cuParamSetTexRef' in found_functions}} global __cuParamSetTexRef __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef') {{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}} global __cuFuncSetSharedMemConfig __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig') {{endif}} {{if 'cuGraphCreate' in found_functions}} global __cuGraphCreate __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate') {{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}} global __cuGraphAddKernelNode_v2 __cuGraphAddKernelNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddKernelNode_v2') {{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}} global __cuGraphKernelNodeGetParams_v2 __cuGraphKernelNodeGetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams_v2') {{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}} global __cuGraphKernelNodeSetParams_v2 __cuGraphKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams_v2') {{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}} global __cuGraphAddMemcpyNode __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode') {{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}} global __cuGraphMemcpyNodeGetParams __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams') {{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}} global __cuGraphMemcpyNodeSetParams __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams') {{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}} global __cuGraphAddMemsetNode __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode') {{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}} global __cuGraphMemsetNodeGetParams __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams') {{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}} global __cuGraphMemsetNodeSetParams __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams') {{endif}} {{if 'cuGraphAddHostNode' in found_functions}} global __cuGraphAddHostNode __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode') {{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}} global __cuGraphHostNodeGetParams __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams') {{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}} global __cuGraphHostNodeSetParams __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams') {{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}} global __cuGraphAddChildGraphNode __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode') {{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}} global __cuGraphChildGraphNodeGetGraph __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph') {{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}} global __cuGraphAddEmptyNode __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode') {{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}} global __cuGraphAddEventRecordNode __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode') {{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}} global __cuGraphEventRecordNodeGetEvent __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent') {{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}} global __cuGraphEventRecordNodeSetEvent __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent') {{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}} global __cuGraphAddEventWaitNode __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode') {{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}} global __cuGraphEventWaitNodeGetEvent __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent') {{endif}} {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} global __cuGraphEventWaitNodeSetEvent __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent') {{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}} global __cuGraphAddExternalSemaphoresSignalNode __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode') {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} global __cuGraphExternalSemaphoresSignalNodeGetParams __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} global __cuGraphExternalSemaphoresSignalNodeSetParams __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') {{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}} global __cuGraphAddExternalSemaphoresWaitNode __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode') {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} global __cuGraphExternalSemaphoresWaitNodeGetParams __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} global __cuGraphExternalSemaphoresWaitNodeSetParams __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') {{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}} global __cuGraphAddBatchMemOpNode __cuGraphAddBatchMemOpNode = dlfcn.dlsym(handle, 'cuGraphAddBatchMemOpNode') {{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}} global __cuGraphBatchMemOpNodeGetParams __cuGraphBatchMemOpNodeGetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeGetParams') {{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}} global __cuGraphBatchMemOpNodeSetParams __cuGraphBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeSetParams') {{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}} global __cuGraphExecBatchMemOpNodeSetParams __cuGraphExecBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecBatchMemOpNodeSetParams') {{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}} global __cuGraphAddMemAllocNode __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode') {{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}} global __cuGraphMemAllocNodeGetParams __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams') {{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}} global __cuGraphAddMemFreeNode __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode') {{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}} global __cuGraphMemFreeNodeGetParams __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams') {{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}} global __cuDeviceGraphMemTrim __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim') {{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}} global __cuDeviceGetGraphMemAttribute __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute') {{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}} global __cuDeviceSetGraphMemAttribute __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute') {{endif}} {{if 'cuGraphClone' in found_functions}} global __cuGraphClone __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone') {{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}} global __cuGraphNodeFindInClone __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone') {{endif}} {{if 'cuGraphNodeGetType' in found_functions}} global __cuGraphNodeGetType __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType') {{endif}} {{if 'cuGraphGetNodes' in found_functions}} global __cuGraphGetNodes __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes') {{endif}} {{if 'cuGraphGetRootNodes' in found_functions}} global __cuGraphGetRootNodes __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes') {{endif}} {{if 'cuGraphGetEdges' in found_functions}} global __cuGraphGetEdges __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges') {{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}} global __cuGraphGetEdges_v2 __cuGraphGetEdges_v2 = dlfcn.dlsym(handle, 'cuGraphGetEdges_v2') {{endif}} {{if 'cuGraphNodeGetDependencies' in found_functions}} global __cuGraphNodeGetDependencies __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies') {{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}} global __cuGraphNodeGetDependencies_v2 __cuGraphNodeGetDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies_v2') {{endif}} {{if 'cuGraphNodeGetDependentNodes' in found_functions}} global __cuGraphNodeGetDependentNodes __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes') {{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}} global __cuGraphNodeGetDependentNodes_v2 __cuGraphNodeGetDependentNodes_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes_v2') {{endif}} {{if 'cuGraphAddDependencies' in found_functions}} global __cuGraphAddDependencies __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies') {{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}} global __cuGraphAddDependencies_v2 __cuGraphAddDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphAddDependencies_v2') {{endif}} {{if 'cuGraphRemoveDependencies' in found_functions}} global __cuGraphRemoveDependencies __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies') {{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}} global __cuGraphRemoveDependencies_v2 __cuGraphRemoveDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies_v2') {{endif}} {{if 'cuGraphDestroyNode' in found_functions}} global __cuGraphDestroyNode __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode') {{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}} global __cuGraphInstantiateWithFlags __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags') {{endif}} {{if 'cuGraphExecGetFlags' in found_functions}} global __cuGraphExecGetFlags __cuGraphExecGetFlags = dlfcn.dlsym(handle, 'cuGraphExecGetFlags') {{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}} global __cuGraphExecKernelNodeSetParams_v2 __cuGraphExecKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams_v2') {{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}} global __cuGraphExecMemcpyNodeSetParams __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams') {{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}} global __cuGraphExecMemsetNodeSetParams __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams') {{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}} global __cuGraphExecHostNodeSetParams __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams') {{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}} global __cuGraphExecChildGraphNodeSetParams __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams') {{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}} global __cuGraphExecEventRecordNodeSetEvent __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent') {{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}} global __cuGraphExecEventWaitNodeSetEvent __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent') {{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} global __cuGraphExecExternalSemaphoresSignalNodeSetParams __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') {{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} global __cuGraphExecExternalSemaphoresWaitNodeSetParams __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') {{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}} global __cuGraphNodeSetEnabled __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled') {{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}} global __cuGraphNodeGetEnabled __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled') {{endif}} {{if 'cuGraphExecDestroy' in found_functions}} global __cuGraphExecDestroy __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy') {{endif}} {{if 'cuGraphDestroy' in found_functions}} global __cuGraphDestroy __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy') {{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}} global __cuGraphExecUpdate_v2 __cuGraphExecUpdate_v2 = dlfcn.dlsym(handle, 'cuGraphExecUpdate_v2') {{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}} global __cuGraphKernelNodeCopyAttributes __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes') {{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}} global __cuGraphKernelNodeGetAttribute __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute') {{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}} global __cuGraphKernelNodeSetAttribute __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute') {{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}} global __cuGraphDebugDotPrint __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint') {{endif}} {{if 'cuUserObjectCreate' in found_functions}} global __cuUserObjectCreate __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate') {{endif}} {{if 'cuUserObjectRetain' in found_functions}} global __cuUserObjectRetain __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain') {{endif}} {{if 'cuUserObjectRelease' in found_functions}} global __cuUserObjectRelease __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease') {{endif}} {{if 'cuGraphRetainUserObject' in found_functions}} global __cuGraphRetainUserObject __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject') {{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}} global __cuGraphReleaseUserObject __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject') {{endif}} {{if 'cuGraphAddNode' in found_functions}} global __cuGraphAddNode __cuGraphAddNode = dlfcn.dlsym(handle, 'cuGraphAddNode') {{endif}} {{if 'cuGraphAddNode_v2' in found_functions}} global __cuGraphAddNode_v2 __cuGraphAddNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddNode_v2') {{endif}} {{if 'cuGraphNodeSetParams' in found_functions}} global __cuGraphNodeSetParams __cuGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphNodeSetParams') {{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}} global __cuGraphExecNodeSetParams __cuGraphExecNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecNodeSetParams') {{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}} global __cuGraphConditionalHandleCreate __cuGraphConditionalHandleCreate = dlfcn.dlsym(handle, 'cuGraphConditionalHandleCreate') {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} global __cuOccupancyMaxActiveBlocksPerMultiprocessor __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') {{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}} global __cuOccupancyMaxPotentialBlockSize __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize') {{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}} global __cuOccupancyMaxPotentialBlockSizeWithFlags __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') {{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}} global __cuOccupancyAvailableDynamicSMemPerBlock __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') {{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}} global __cuOccupancyMaxPotentialClusterSize __cuOccupancyMaxPotentialClusterSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialClusterSize') {{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}} global __cuOccupancyMaxActiveClusters __cuOccupancyMaxActiveClusters = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveClusters') {{endif}} {{if 'cuTexRefSetArray' in found_functions}} global __cuTexRefSetArray __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray') {{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}} global __cuTexRefSetMipmappedArray __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray') {{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}} global __cuTexRefSetAddress_v2 __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2') {{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}} global __cuTexRefSetAddress2D_v3 __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3') {{endif}} {{if 'cuTexRefSetFormat' in found_functions}} global __cuTexRefSetFormat __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat') {{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}} global __cuTexRefSetAddressMode __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode') {{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}} global __cuTexRefSetFilterMode __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode') {{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}} global __cuTexRefSetMipmapFilterMode __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode') {{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}} global __cuTexRefSetMipmapLevelBias __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias') {{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}} global __cuTexRefSetMipmapLevelClamp __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp') {{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}} global __cuTexRefSetMaxAnisotropy __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy') {{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}} global __cuTexRefSetBorderColor __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor') {{endif}} {{if 'cuTexRefSetFlags' in found_functions}} global __cuTexRefSetFlags __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags') {{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}} global __cuTexRefGetAddress_v2 __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2') {{endif}} {{if 'cuTexRefGetArray' in found_functions}} global __cuTexRefGetArray __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray') {{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}} global __cuTexRefGetMipmappedArray __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray') {{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}} global __cuTexRefGetAddressMode __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode') {{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}} global __cuTexRefGetFilterMode __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode') {{endif}} {{if 'cuTexRefGetFormat' in found_functions}} global __cuTexRefGetFormat __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat') {{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}} global __cuTexRefGetMipmapFilterMode __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode') {{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}} global __cuTexRefGetMipmapLevelBias __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias') {{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}} global __cuTexRefGetMipmapLevelClamp __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp') {{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}} global __cuTexRefGetMaxAnisotropy __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy') {{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}} global __cuTexRefGetBorderColor __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor') {{endif}} {{if 'cuTexRefGetFlags' in found_functions}} global __cuTexRefGetFlags __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags') {{endif}} {{if 'cuTexRefCreate' in found_functions}} global __cuTexRefCreate __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate') {{endif}} {{if 'cuTexRefDestroy' in found_functions}} global __cuTexRefDestroy __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy') {{endif}} {{if 'cuSurfRefSetArray' in found_functions}} global __cuSurfRefSetArray __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray') {{endif}} {{if 'cuSurfRefGetArray' in found_functions}} global __cuSurfRefGetArray __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray') {{endif}} {{if 'cuTexObjectCreate' in found_functions}} global __cuTexObjectCreate __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate') {{endif}} {{if 'cuTexObjectDestroy' in found_functions}} global __cuTexObjectDestroy __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy') {{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}} global __cuTexObjectGetResourceDesc __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc') {{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}} global __cuTexObjectGetTextureDesc __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc') {{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}} global __cuTexObjectGetResourceViewDesc __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc') {{endif}} {{if 'cuSurfObjectCreate' in found_functions}} global __cuSurfObjectCreate __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate') {{endif}} {{if 'cuSurfObjectDestroy' in found_functions}} global __cuSurfObjectDestroy __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy') {{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}} global __cuSurfObjectGetResourceDesc __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc') {{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}} global __cuTensorMapEncodeTiled __cuTensorMapEncodeTiled = dlfcn.dlsym(handle, 'cuTensorMapEncodeTiled') {{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}} global __cuTensorMapEncodeIm2col __cuTensorMapEncodeIm2col = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2col') {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} global __cuTensorMapReplaceAddress __cuTensorMapReplaceAddress = dlfcn.dlsym(handle, 'cuTensorMapReplaceAddress') {{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}} global __cuDeviceCanAccessPeer __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer') {{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}} global __cuCtxEnablePeerAccess __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess') {{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}} global __cuCtxDisablePeerAccess __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess') {{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}} global __cuDeviceGetP2PAttribute __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute') {{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}} global __cuGraphicsUnregisterResource __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource') {{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}} global __cuGraphicsSubResourceGetMappedArray __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray') {{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}} global __cuGraphicsResourceGetMappedMipmappedArray __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray') {{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}} global __cuGraphicsResourceGetMappedPointer_v2 __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2') {{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}} global __cuGraphicsResourceSetMapFlags_v2 __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2') {{endif}} {{if 'cuGetProcAddress_v2' in found_functions}} global __cuGetProcAddress_v2 __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') {{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}} global __cuCoredumpGetAttribute __cuCoredumpGetAttribute = dlfcn.dlsym(handle, 'cuCoredumpGetAttribute') {{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}} global __cuCoredumpGetAttributeGlobal __cuCoredumpGetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpGetAttributeGlobal') {{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}} global __cuCoredumpSetAttribute __cuCoredumpSetAttribute = dlfcn.dlsym(handle, 'cuCoredumpSetAttribute') {{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}} global __cuCoredumpSetAttributeGlobal __cuCoredumpSetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpSetAttributeGlobal') {{endif}} {{if 'cuGetExportTable' in found_functions}} global __cuGetExportTable __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable') {{endif}} {{if 'cuGreenCtxCreate' in found_functions}} global __cuGreenCtxCreate __cuGreenCtxCreate = dlfcn.dlsym(handle, 'cuGreenCtxCreate') {{endif}} {{if 'cuGreenCtxDestroy' in found_functions}} global __cuGreenCtxDestroy __cuGreenCtxDestroy = dlfcn.dlsym(handle, 'cuGreenCtxDestroy') {{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}} global __cuCtxFromGreenCtx __cuCtxFromGreenCtx = dlfcn.dlsym(handle, 'cuCtxFromGreenCtx') {{endif}} {{if 'cuDeviceGetDevResource' in found_functions}} global __cuDeviceGetDevResource __cuDeviceGetDevResource = dlfcn.dlsym(handle, 'cuDeviceGetDevResource') {{endif}} {{if 'cuCtxGetDevResource' in found_functions}} global __cuCtxGetDevResource __cuCtxGetDevResource = dlfcn.dlsym(handle, 'cuCtxGetDevResource') {{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}} global __cuGreenCtxGetDevResource __cuGreenCtxGetDevResource = dlfcn.dlsym(handle, 'cuGreenCtxGetDevResource') {{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}} global __cuDevSmResourceSplitByCount __cuDevSmResourceSplitByCount = dlfcn.dlsym(handle, 'cuDevSmResourceSplitByCount') {{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}} global __cuDevResourceGenerateDesc __cuDevResourceGenerateDesc = dlfcn.dlsym(handle, 'cuDevResourceGenerateDesc') {{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}} global __cuGreenCtxRecordEvent __cuGreenCtxRecordEvent = dlfcn.dlsym(handle, 'cuGreenCtxRecordEvent') {{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}} global __cuGreenCtxWaitEvent __cuGreenCtxWaitEvent = dlfcn.dlsym(handle, 'cuGreenCtxWaitEvent') {{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}} global __cuStreamGetGreenCtx __cuStreamGetGreenCtx = dlfcn.dlsym(handle, 'cuStreamGetGreenCtx') {{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}} global __cuGreenCtxStreamCreate __cuGreenCtxStreamCreate = dlfcn.dlsym(handle, 'cuGreenCtxStreamCreate') {{endif}} {{if 'cuProfilerStart' in found_functions}} global __cuProfilerStart __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart') {{endif}} {{if 'cuProfilerStop' in found_functions}} global __cuProfilerStop __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop') {{endif}} {{if True}} global __cuGraphicsEGLRegisterImage __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage') {{endif}} {{if True}} global __cuEGLStreamConsumerConnect __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect') {{endif}} {{if True}} global __cuEGLStreamConsumerConnectWithFlags __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags') {{endif}} {{if True}} global __cuEGLStreamConsumerDisconnect __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect') {{endif}} {{if True}} global __cuEGLStreamConsumerAcquireFrame __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame') {{endif}} {{if True}} global __cuEGLStreamConsumerReleaseFrame __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame') {{endif}} {{if True}} global __cuEGLStreamProducerConnect __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect') {{endif}} {{if True}} global __cuEGLStreamProducerDisconnect __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect') {{endif}} {{if True}} global __cuEGLStreamProducerPresentFrame __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame') {{endif}} {{if True}} global __cuEGLStreamProducerReturnFrame __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame') {{endif}} {{if True}} global __cuGraphicsResourceGetMappedEglFrame __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame') {{endif}} {{if True}} global __cuEventCreateFromEGLSync __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync') {{endif}} {{if True}} global __cuGraphicsGLRegisterBuffer __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer') {{endif}} {{if True}} global __cuGraphicsGLRegisterImage __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage') {{endif}} {{if True}} global __cuGLGetDevices_v2 __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2') {{endif}} {{if True}} global __cuVDPAUGetDevice __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice') {{endif}} {{if True}} global __cuVDPAUCtxCreate_v2 __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2') {{endif}} {{if True}} global __cuGraphicsVDPAURegisterVideoSurface __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface') {{endif}} {{if True}} global __cuGraphicsVDPAURegisterOutputSurface __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface') {{endif}} {{endif}} {{if 'cuGetErrorString' in found_functions}} cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGetErrorString cuPythonInit() if __cuGetErrorString == NULL: with gil: raise RuntimeError('Function "cuGetErrorString" not found') err = ( __cuGetErrorString)(error, pStr) return err {{endif}} {{if 'cuGetErrorName' in found_functions}} cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGetErrorName cuPythonInit() if __cuGetErrorName == NULL: with gil: raise RuntimeError('Function "cuGetErrorName" not found') err = ( __cuGetErrorName)(error, pStr) return err {{endif}} {{if 'cuInit' in found_functions}} cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuInit cuPythonInit() if __cuInit == NULL: with gil: raise RuntimeError('Function "cuInit" not found') err = ( __cuInit)(Flags) return err {{endif}} {{if 'cuDriverGetVersion' in found_functions}} cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDriverGetVersion cuPythonInit() if __cuDriverGetVersion == NULL: with gil: raise RuntimeError('Function "cuDriverGetVersion" not found') err = ( __cuDriverGetVersion)(driverVersion) return err {{endif}} {{if 'cuDeviceGet' in found_functions}} cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGet cuPythonInit() if __cuDeviceGet == NULL: with gil: raise RuntimeError('Function "cuDeviceGet" not found') err = ( __cuDeviceGet)(device, ordinal) return err {{endif}} {{if 'cuDeviceGetCount' in found_functions}} cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetCount cuPythonInit() if __cuDeviceGetCount == NULL: with gil: raise RuntimeError('Function "cuDeviceGetCount" not found') err = ( __cuDeviceGetCount)(count) return err {{endif}} {{if 'cuDeviceGetName' in found_functions}} cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetName cuPythonInit() if __cuDeviceGetName == NULL: with gil: raise RuntimeError('Function "cuDeviceGetName" not found') err = ( __cuDeviceGetName)(name, length, dev) return err {{endif}} {{if 'cuDeviceGetUuid' in found_functions}} cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetUuid cuPythonInit() if __cuDeviceGetUuid == NULL: with gil: raise RuntimeError('Function "cuDeviceGetUuid" not found') err = ( __cuDeviceGetUuid)(uuid, dev) return err {{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}} cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetUuid_v2 cuPythonInit() if __cuDeviceGetUuid_v2 == NULL: with gil: raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') err = ( __cuDeviceGetUuid_v2)(uuid, dev) return err {{endif}} {{if 'cuDeviceGetLuid' in found_functions}} cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetLuid cuPythonInit() if __cuDeviceGetLuid == NULL: with gil: raise RuntimeError('Function "cuDeviceGetLuid" not found') err = ( __cuDeviceGetLuid)(luid, deviceNodeMask, dev) return err {{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}} cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceTotalMem_v2 cuPythonInit() if __cuDeviceTotalMem_v2 == NULL: with gil: raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') err = ( __cuDeviceTotalMem_v2)(numbytes, dev) return err {{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}} cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetTexture1DLinearMaxWidth cuPythonInit() if __cuDeviceGetTexture1DLinearMaxWidth == NULL: with gil: raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') err = ( __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev) return err {{endif}} {{if 'cuDeviceGetAttribute' in found_functions}} cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetAttribute cuPythonInit() if __cuDeviceGetAttribute == NULL: with gil: raise RuntimeError('Function "cuDeviceGetAttribute" not found') err = ( __cuDeviceGetAttribute)(pi, attrib, dev) return err {{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}} cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetNvSciSyncAttributes cuPythonInit() if __cuDeviceGetNvSciSyncAttributes == NULL: with gil: raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') err = ( __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags) return err {{endif}} {{if 'cuDeviceSetMemPool' in found_functions}} cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceSetMemPool cuPythonInit() if __cuDeviceSetMemPool == NULL: with gil: raise RuntimeError('Function "cuDeviceSetMemPool" not found') err = ( __cuDeviceSetMemPool)(dev, pool) return err {{endif}} {{if 'cuDeviceGetMemPool' in found_functions}} cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetMemPool cuPythonInit() if __cuDeviceGetMemPool == NULL: with gil: raise RuntimeError('Function "cuDeviceGetMemPool" not found') err = ( __cuDeviceGetMemPool)(pool, dev) return err {{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}} cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetDefaultMemPool cuPythonInit() if __cuDeviceGetDefaultMemPool == NULL: with gil: raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') err = ( __cuDeviceGetDefaultMemPool)(pool_out, dev) return err {{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}} cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetExecAffinitySupport cuPythonInit() if __cuDeviceGetExecAffinitySupport == NULL: with gil: raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') err = ( __cuDeviceGetExecAffinitySupport)(pi, typename, dev) return err {{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}} cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFlushGPUDirectRDMAWrites cuPythonInit() if __cuFlushGPUDirectRDMAWrites == NULL: with gil: raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') err = ( __cuFlushGPUDirectRDMAWrites)(target, scope) return err {{endif}} {{if 'cuDeviceGetProperties' in found_functions}} cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetProperties cuPythonInit() if __cuDeviceGetProperties == NULL: with gil: raise RuntimeError('Function "cuDeviceGetProperties" not found') err = ( __cuDeviceGetProperties)(prop, dev) return err {{endif}} {{if 'cuDeviceComputeCapability' in found_functions}} cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceComputeCapability cuPythonInit() if __cuDeviceComputeCapability == NULL: with gil: raise RuntimeError('Function "cuDeviceComputeCapability" not found') err = ( __cuDeviceComputeCapability)(major, minor, dev) return err {{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}} cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDevicePrimaryCtxRetain cuPythonInit() if __cuDevicePrimaryCtxRetain == NULL: with gil: raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') err = ( __cuDevicePrimaryCtxRetain)(pctx, dev) return err {{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}} cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDevicePrimaryCtxRelease_v2 cuPythonInit() if __cuDevicePrimaryCtxRelease_v2 == NULL: with gil: raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') err = ( __cuDevicePrimaryCtxRelease_v2)(dev) return err {{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}} cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDevicePrimaryCtxSetFlags_v2 cuPythonInit() if __cuDevicePrimaryCtxSetFlags_v2 == NULL: with gil: raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') err = ( __cuDevicePrimaryCtxSetFlags_v2)(dev, flags) return err {{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}} cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDevicePrimaryCtxGetState cuPythonInit() if __cuDevicePrimaryCtxGetState == NULL: with gil: raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') err = ( __cuDevicePrimaryCtxGetState)(dev, flags, active) return err {{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}} cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDevicePrimaryCtxReset_v2 cuPythonInit() if __cuDevicePrimaryCtxReset_v2 == NULL: with gil: raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') err = ( __cuDevicePrimaryCtxReset_v2)(dev) return err {{endif}} {{if 'cuCtxCreate_v2' in found_functions}} cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxCreate_v2 cuPythonInit() if __cuCtxCreate_v2 == NULL: with gil: raise RuntimeError('Function "cuCtxCreate_v2" not found') err = ( __cuCtxCreate_v2)(pctx, flags, dev) return err {{endif}} {{if 'cuCtxCreate_v3' in found_functions}} cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxCreate_v3 cuPythonInit() if __cuCtxCreate_v3 == NULL: with gil: raise RuntimeError('Function "cuCtxCreate_v3" not found') err = ( __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev) return err {{endif}} {{if 'cuCtxCreate_v4' in found_functions}} cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxCreate_v4 cuPythonInit() if __cuCtxCreate_v4 == NULL: with gil: raise RuntimeError('Function "cuCtxCreate_v4" not found') err = ( __cuCtxCreate_v4)(pctx, ctxCreateParams, flags, dev) return err {{endif}} {{if 'cuCtxDestroy_v2' in found_functions}} cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxDestroy_v2 cuPythonInit() if __cuCtxDestroy_v2 == NULL: with gil: raise RuntimeError('Function "cuCtxDestroy_v2" not found') err = ( __cuCtxDestroy_v2)(ctx) return err {{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}} cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxPushCurrent_v2 cuPythonInit() if __cuCtxPushCurrent_v2 == NULL: with gil: raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') err = ( __cuCtxPushCurrent_v2)(ctx) return err {{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}} cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxPopCurrent_v2 cuPythonInit() if __cuCtxPopCurrent_v2 == NULL: with gil: raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') err = ( __cuCtxPopCurrent_v2)(pctx) return err {{endif}} {{if 'cuCtxSetCurrent' in found_functions}} cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxSetCurrent cuPythonInit() if __cuCtxSetCurrent == NULL: with gil: raise RuntimeError('Function "cuCtxSetCurrent" not found') err = ( __cuCtxSetCurrent)(ctx) return err {{endif}} {{if 'cuCtxGetCurrent' in found_functions}} cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetCurrent cuPythonInit() if __cuCtxGetCurrent == NULL: with gil: raise RuntimeError('Function "cuCtxGetCurrent" not found') err = ( __cuCtxGetCurrent)(pctx) return err {{endif}} {{if 'cuCtxGetDevice' in found_functions}} cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetDevice cuPythonInit() if __cuCtxGetDevice == NULL: with gil: raise RuntimeError('Function "cuCtxGetDevice" not found') err = ( __cuCtxGetDevice)(device) return err {{endif}} {{if 'cuCtxGetFlags' in found_functions}} cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetFlags cuPythonInit() if __cuCtxGetFlags == NULL: with gil: raise RuntimeError('Function "cuCtxGetFlags" not found') err = ( __cuCtxGetFlags)(flags) return err {{endif}} {{if 'cuCtxSetFlags' in found_functions}} cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxSetFlags cuPythonInit() if __cuCtxSetFlags == NULL: with gil: raise RuntimeError('Function "cuCtxSetFlags" not found') err = ( __cuCtxSetFlags)(flags) return err {{endif}} {{if 'cuCtxGetId' in found_functions}} cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetId cuPythonInit() if __cuCtxGetId == NULL: with gil: raise RuntimeError('Function "cuCtxGetId" not found') err = ( __cuCtxGetId)(ctx, ctxId) return err {{endif}} {{if 'cuCtxSynchronize' in found_functions}} cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxSynchronize cuPythonInit() if __cuCtxSynchronize == NULL: with gil: raise RuntimeError('Function "cuCtxSynchronize" not found') err = ( __cuCtxSynchronize)() return err {{endif}} {{if 'cuCtxSetLimit' in found_functions}} cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxSetLimit cuPythonInit() if __cuCtxSetLimit == NULL: with gil: raise RuntimeError('Function "cuCtxSetLimit" not found') err = ( __cuCtxSetLimit)(limit, value) return err {{endif}} {{if 'cuCtxGetLimit' in found_functions}} cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetLimit cuPythonInit() if __cuCtxGetLimit == NULL: with gil: raise RuntimeError('Function "cuCtxGetLimit" not found') err = ( __cuCtxGetLimit)(pvalue, limit) return err {{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}} cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetCacheConfig cuPythonInit() if __cuCtxGetCacheConfig == NULL: with gil: raise RuntimeError('Function "cuCtxGetCacheConfig" not found') err = ( __cuCtxGetCacheConfig)(pconfig) return err {{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}} cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxSetCacheConfig cuPythonInit() if __cuCtxSetCacheConfig == NULL: with gil: raise RuntimeError('Function "cuCtxSetCacheConfig" not found') err = ( __cuCtxSetCacheConfig)(config) return err {{endif}} {{if 'cuCtxGetApiVersion' in found_functions}} cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetApiVersion cuPythonInit() if __cuCtxGetApiVersion == NULL: with gil: raise RuntimeError('Function "cuCtxGetApiVersion" not found') err = ( __cuCtxGetApiVersion)(ctx, version) return err {{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}} cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetStreamPriorityRange cuPythonInit() if __cuCtxGetStreamPriorityRange == NULL: with gil: raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') err = ( __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority) return err {{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}} cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxResetPersistingL2Cache cuPythonInit() if __cuCtxResetPersistingL2Cache == NULL: with gil: raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') err = ( __cuCtxResetPersistingL2Cache)() return err {{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}} cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetExecAffinity cuPythonInit() if __cuCtxGetExecAffinity == NULL: with gil: raise RuntimeError('Function "cuCtxGetExecAffinity" not found') err = ( __cuCtxGetExecAffinity)(pExecAffinity, typename) return err {{endif}} {{if 'cuCtxRecordEvent' in found_functions}} cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxRecordEvent cuPythonInit() if __cuCtxRecordEvent == NULL: with gil: raise RuntimeError('Function "cuCtxRecordEvent" not found') err = ( __cuCtxRecordEvent)(hCtx, hEvent) return err {{endif}} {{if 'cuCtxWaitEvent' in found_functions}} cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxWaitEvent cuPythonInit() if __cuCtxWaitEvent == NULL: with gil: raise RuntimeError('Function "cuCtxWaitEvent" not found') err = ( __cuCtxWaitEvent)(hCtx, hEvent) return err {{endif}} {{if 'cuCtxAttach' in found_functions}} cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxAttach cuPythonInit() if __cuCtxAttach == NULL: with gil: raise RuntimeError('Function "cuCtxAttach" not found') err = ( __cuCtxAttach)(pctx, flags) return err {{endif}} {{if 'cuCtxDetach' in found_functions}} cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxDetach cuPythonInit() if __cuCtxDetach == NULL: with gil: raise RuntimeError('Function "cuCtxDetach" not found') err = ( __cuCtxDetach)(ctx) return err {{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}} cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetSharedMemConfig cuPythonInit() if __cuCtxGetSharedMemConfig == NULL: with gil: raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') err = ( __cuCtxGetSharedMemConfig)(pConfig) return err {{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}} cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxSetSharedMemConfig cuPythonInit() if __cuCtxSetSharedMemConfig == NULL: with gil: raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') err = ( __cuCtxSetSharedMemConfig)(config) return err {{endif}} {{if 'cuModuleLoad' in found_functions}} cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleLoad cuPythonInit() if __cuModuleLoad == NULL: with gil: raise RuntimeError('Function "cuModuleLoad" not found') err = ( __cuModuleLoad)(module, fname) return err {{endif}} {{if 'cuModuleLoadData' in found_functions}} cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleLoadData cuPythonInit() if __cuModuleLoadData == NULL: with gil: raise RuntimeError('Function "cuModuleLoadData" not found') err = ( __cuModuleLoadData)(module, image) return err {{endif}} {{if 'cuModuleLoadDataEx' in found_functions}} cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleLoadDataEx cuPythonInit() if __cuModuleLoadDataEx == NULL: with gil: raise RuntimeError('Function "cuModuleLoadDataEx" not found') err = ( __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues) return err {{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}} cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleLoadFatBinary cuPythonInit() if __cuModuleLoadFatBinary == NULL: with gil: raise RuntimeError('Function "cuModuleLoadFatBinary" not found') err = ( __cuModuleLoadFatBinary)(module, fatCubin) return err {{endif}} {{if 'cuModuleUnload' in found_functions}} cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleUnload cuPythonInit() if __cuModuleUnload == NULL: with gil: raise RuntimeError('Function "cuModuleUnload" not found') err = ( __cuModuleUnload)(hmod) return err {{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}} cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleGetLoadingMode cuPythonInit() if __cuModuleGetLoadingMode == NULL: with gil: raise RuntimeError('Function "cuModuleGetLoadingMode" not found') err = ( __cuModuleGetLoadingMode)(mode) return err {{endif}} {{if 'cuModuleGetFunction' in found_functions}} cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleGetFunction cuPythonInit() if __cuModuleGetFunction == NULL: with gil: raise RuntimeError('Function "cuModuleGetFunction" not found') err = ( __cuModuleGetFunction)(hfunc, hmod, name) return err {{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}} cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleGetFunctionCount cuPythonInit() if __cuModuleGetFunctionCount == NULL: with gil: raise RuntimeError('Function "cuModuleGetFunctionCount" not found') err = ( __cuModuleGetFunctionCount)(count, mod) return err {{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}} cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleEnumerateFunctions cuPythonInit() if __cuModuleEnumerateFunctions == NULL: with gil: raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') err = ( __cuModuleEnumerateFunctions)(functions, numFunctions, mod) return err {{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}} cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleGetGlobal_v2 cuPythonInit() if __cuModuleGetGlobal_v2 == NULL: with gil: raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') err = ( __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name) return err {{endif}} {{if 'cuLinkCreate_v2' in found_functions}} cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLinkCreate_v2 cuPythonInit() if __cuLinkCreate_v2 == NULL: with gil: raise RuntimeError('Function "cuLinkCreate_v2" not found') err = ( __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut) return err {{endif}} {{if 'cuLinkAddData_v2' in found_functions}} cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLinkAddData_v2 cuPythonInit() if __cuLinkAddData_v2 == NULL: with gil: raise RuntimeError('Function "cuLinkAddData_v2" not found') err = ( __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues) return err {{endif}} {{if 'cuLinkAddFile_v2' in found_functions}} cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLinkAddFile_v2 cuPythonInit() if __cuLinkAddFile_v2 == NULL: with gil: raise RuntimeError('Function "cuLinkAddFile_v2" not found') err = ( __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues) return err {{endif}} {{if 'cuLinkComplete' in found_functions}} cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLinkComplete cuPythonInit() if __cuLinkComplete == NULL: with gil: raise RuntimeError('Function "cuLinkComplete" not found') err = ( __cuLinkComplete)(state, cubinOut, sizeOut) return err {{endif}} {{if 'cuLinkDestroy' in found_functions}} cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLinkDestroy cuPythonInit() if __cuLinkDestroy == NULL: with gil: raise RuntimeError('Function "cuLinkDestroy" not found') err = ( __cuLinkDestroy)(state) return err {{endif}} {{if 'cuModuleGetTexRef' in found_functions}} cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleGetTexRef cuPythonInit() if __cuModuleGetTexRef == NULL: with gil: raise RuntimeError('Function "cuModuleGetTexRef" not found') err = ( __cuModuleGetTexRef)(pTexRef, hmod, name) return err {{endif}} {{if 'cuModuleGetSurfRef' in found_functions}} cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuModuleGetSurfRef cuPythonInit() if __cuModuleGetSurfRef == NULL: with gil: raise RuntimeError('Function "cuModuleGetSurfRef" not found') err = ( __cuModuleGetSurfRef)(pSurfRef, hmod, name) return err {{endif}} {{if 'cuLibraryLoadData' in found_functions}} cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryLoadData cuPythonInit() if __cuLibraryLoadData == NULL: with gil: raise RuntimeError('Function "cuLibraryLoadData" not found') err = ( __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) return err {{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}} cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryLoadFromFile cuPythonInit() if __cuLibraryLoadFromFile == NULL: with gil: raise RuntimeError('Function "cuLibraryLoadFromFile" not found') err = ( __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) return err {{endif}} {{if 'cuLibraryUnload' in found_functions}} cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryUnload cuPythonInit() if __cuLibraryUnload == NULL: with gil: raise RuntimeError('Function "cuLibraryUnload" not found') err = ( __cuLibraryUnload)(library) return err {{endif}} {{if 'cuLibraryGetKernel' in found_functions}} cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryGetKernel cuPythonInit() if __cuLibraryGetKernel == NULL: with gil: raise RuntimeError('Function "cuLibraryGetKernel" not found') err = ( __cuLibraryGetKernel)(pKernel, library, name) return err {{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}} cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryGetKernelCount cuPythonInit() if __cuLibraryGetKernelCount == NULL: with gil: raise RuntimeError('Function "cuLibraryGetKernelCount" not found') err = ( __cuLibraryGetKernelCount)(count, lib) return err {{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}} cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryEnumerateKernels cuPythonInit() if __cuLibraryEnumerateKernels == NULL: with gil: raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') err = ( __cuLibraryEnumerateKernels)(kernels, numKernels, lib) return err {{endif}} {{if 'cuLibraryGetModule' in found_functions}} cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryGetModule cuPythonInit() if __cuLibraryGetModule == NULL: with gil: raise RuntimeError('Function "cuLibraryGetModule" not found') err = ( __cuLibraryGetModule)(pMod, library) return err {{endif}} {{if 'cuKernelGetFunction' in found_functions}} cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuKernelGetFunction cuPythonInit() if __cuKernelGetFunction == NULL: with gil: raise RuntimeError('Function "cuKernelGetFunction" not found') err = ( __cuKernelGetFunction)(pFunc, kernel) return err {{endif}} {{if 'cuKernelGetLibrary' in found_functions}} cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuKernelGetLibrary cuPythonInit() if __cuKernelGetLibrary == NULL: with gil: raise RuntimeError('Function "cuKernelGetLibrary" not found') err = ( __cuKernelGetLibrary)(pLib, kernel) return err {{endif}} {{if 'cuLibraryGetGlobal' in found_functions}} cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryGetGlobal cuPythonInit() if __cuLibraryGetGlobal == NULL: with gil: raise RuntimeError('Function "cuLibraryGetGlobal" not found') err = ( __cuLibraryGetGlobal)(dptr, numbytes, library, name) return err {{endif}} {{if 'cuLibraryGetManaged' in found_functions}} cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryGetManaged cuPythonInit() if __cuLibraryGetManaged == NULL: with gil: raise RuntimeError('Function "cuLibraryGetManaged" not found') err = ( __cuLibraryGetManaged)(dptr, numbytes, library, name) return err {{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}} cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLibraryGetUnifiedFunction cuPythonInit() if __cuLibraryGetUnifiedFunction == NULL: with gil: raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') err = ( __cuLibraryGetUnifiedFunction)(fptr, library, symbol) return err {{endif}} {{if 'cuKernelGetAttribute' in found_functions}} cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuKernelGetAttribute cuPythonInit() if __cuKernelGetAttribute == NULL: with gil: raise RuntimeError('Function "cuKernelGetAttribute" not found') err = ( __cuKernelGetAttribute)(pi, attrib, kernel, dev) return err {{endif}} {{if 'cuKernelSetAttribute' in found_functions}} cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuKernelSetAttribute cuPythonInit() if __cuKernelSetAttribute == NULL: with gil: raise RuntimeError('Function "cuKernelSetAttribute" not found') err = ( __cuKernelSetAttribute)(attrib, val, kernel, dev) return err {{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}} cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuKernelSetCacheConfig cuPythonInit() if __cuKernelSetCacheConfig == NULL: with gil: raise RuntimeError('Function "cuKernelSetCacheConfig" not found') err = ( __cuKernelSetCacheConfig)(kernel, config, dev) return err {{endif}} {{if 'cuKernelGetName' in found_functions}} cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuKernelGetName cuPythonInit() if __cuKernelGetName == NULL: with gil: raise RuntimeError('Function "cuKernelGetName" not found') err = ( __cuKernelGetName)(name, hfunc) return err {{endif}} {{if 'cuKernelGetParamInfo' in found_functions}} cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuKernelGetParamInfo cuPythonInit() if __cuKernelGetParamInfo == NULL: with gil: raise RuntimeError('Function "cuKernelGetParamInfo" not found') err = ( __cuKernelGetParamInfo)(kernel, paramIndex, paramOffset, paramSize) return err {{endif}} {{if 'cuMemGetInfo_v2' in found_functions}} cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemGetInfo_v2 cuPythonInit() if __cuMemGetInfo_v2 == NULL: with gil: raise RuntimeError('Function "cuMemGetInfo_v2" not found') err = ( __cuMemGetInfo_v2)(free, total) return err {{endif}} {{if 'cuMemAlloc_v2' in found_functions}} cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAlloc_v2 cuPythonInit() if __cuMemAlloc_v2 == NULL: with gil: raise RuntimeError('Function "cuMemAlloc_v2" not found') err = ( __cuMemAlloc_v2)(dptr, bytesize) return err {{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}} cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAllocPitch_v2 cuPythonInit() if __cuMemAllocPitch_v2 == NULL: with gil: raise RuntimeError('Function "cuMemAllocPitch_v2" not found') err = ( __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) return err {{endif}} {{if 'cuMemFree_v2' in found_functions}} cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemFree_v2 cuPythonInit() if __cuMemFree_v2 == NULL: with gil: raise RuntimeError('Function "cuMemFree_v2" not found') err = ( __cuMemFree_v2)(dptr) return err {{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}} cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemGetAddressRange_v2 cuPythonInit() if __cuMemGetAddressRange_v2 == NULL: with gil: raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') err = ( __cuMemGetAddressRange_v2)(pbase, psize, dptr) return err {{endif}} {{if 'cuMemAllocHost_v2' in found_functions}} cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAllocHost_v2 cuPythonInit() if __cuMemAllocHost_v2 == NULL: with gil: raise RuntimeError('Function "cuMemAllocHost_v2" not found') err = ( __cuMemAllocHost_v2)(pp, bytesize) return err {{endif}} {{if 'cuMemFreeHost' in found_functions}} cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemFreeHost cuPythonInit() if __cuMemFreeHost == NULL: with gil: raise RuntimeError('Function "cuMemFreeHost" not found') err = ( __cuMemFreeHost)(p) return err {{endif}} {{if 'cuMemHostAlloc' in found_functions}} cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemHostAlloc cuPythonInit() if __cuMemHostAlloc == NULL: with gil: raise RuntimeError('Function "cuMemHostAlloc" not found') err = ( __cuMemHostAlloc)(pp, bytesize, Flags) return err {{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}} cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemHostGetDevicePointer_v2 cuPythonInit() if __cuMemHostGetDevicePointer_v2 == NULL: with gil: raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') err = ( __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags) return err {{endif}} {{if 'cuMemHostGetFlags' in found_functions}} cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemHostGetFlags cuPythonInit() if __cuMemHostGetFlags == NULL: with gil: raise RuntimeError('Function "cuMemHostGetFlags" not found') err = ( __cuMemHostGetFlags)(pFlags, p) return err {{endif}} {{if 'cuMemAllocManaged' in found_functions}} cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAllocManaged cuPythonInit() if __cuMemAllocManaged == NULL: with gil: raise RuntimeError('Function "cuMemAllocManaged" not found') err = ( __cuMemAllocManaged)(dptr, bytesize, flags) return err {{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}} cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceRegisterAsyncNotification cuPythonInit() if __cuDeviceRegisterAsyncNotification == NULL: with gil: raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') err = ( __cuDeviceRegisterAsyncNotification)(device, callbackFunc, userData, callback) return err {{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}} cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceUnregisterAsyncNotification cuPythonInit() if __cuDeviceUnregisterAsyncNotification == NULL: with gil: raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') err = ( __cuDeviceUnregisterAsyncNotification)(device, callback) return err {{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}} cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetByPCIBusId cuPythonInit() if __cuDeviceGetByPCIBusId == NULL: with gil: raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') err = ( __cuDeviceGetByPCIBusId)(dev, pciBusId) return err {{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}} cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetPCIBusId cuPythonInit() if __cuDeviceGetPCIBusId == NULL: with gil: raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') err = ( __cuDeviceGetPCIBusId)(pciBusId, length, dev) return err {{endif}} {{if 'cuIpcGetEventHandle' in found_functions}} cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuIpcGetEventHandle cuPythonInit() if __cuIpcGetEventHandle == NULL: with gil: raise RuntimeError('Function "cuIpcGetEventHandle" not found') err = ( __cuIpcGetEventHandle)(pHandle, event) return err {{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}} cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuIpcOpenEventHandle cuPythonInit() if __cuIpcOpenEventHandle == NULL: with gil: raise RuntimeError('Function "cuIpcOpenEventHandle" not found') err = ( __cuIpcOpenEventHandle)(phEvent, handle) return err {{endif}} {{if 'cuIpcGetMemHandle' in found_functions}} cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuIpcGetMemHandle cuPythonInit() if __cuIpcGetMemHandle == NULL: with gil: raise RuntimeError('Function "cuIpcGetMemHandle" not found') err = ( __cuIpcGetMemHandle)(pHandle, dptr) return err {{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}} cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuIpcOpenMemHandle_v2 cuPythonInit() if __cuIpcOpenMemHandle_v2 == NULL: with gil: raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') err = ( __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags) return err {{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}} cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuIpcCloseMemHandle cuPythonInit() if __cuIpcCloseMemHandle == NULL: with gil: raise RuntimeError('Function "cuIpcCloseMemHandle" not found') err = ( __cuIpcCloseMemHandle)(dptr) return err {{endif}} {{if 'cuMemHostRegister_v2' in found_functions}} cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemHostRegister_v2 cuPythonInit() if __cuMemHostRegister_v2 == NULL: with gil: raise RuntimeError('Function "cuMemHostRegister_v2" not found') err = ( __cuMemHostRegister_v2)(p, bytesize, Flags) return err {{endif}} {{if 'cuMemHostUnregister' in found_functions}} cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemHostUnregister cuPythonInit() if __cuMemHostUnregister == NULL: with gil: raise RuntimeError('Function "cuMemHostUnregister" not found') err = ( __cuMemHostUnregister)(p) return err {{endif}} {{if 'cuMemcpy' in found_functions}} cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy cuPythonInit() if __cuMemcpy == NULL: with gil: raise RuntimeError('Function "cuMemcpy" not found') err = ( __cuMemcpy)(dst, src, ByteCount) return err {{endif}} {{if 'cuMemcpyPeer' in found_functions}} cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyPeer cuPythonInit() if __cuMemcpyPeer == NULL: with gil: raise RuntimeError('Function "cuMemcpyPeer" not found') err = ( __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount) return err {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyHtoD_v2 cuPythonInit() if __cuMemcpyHtoD_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') err = ( __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount) return err {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyDtoH_v2 cuPythonInit() if __cuMemcpyDtoH_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') err = ( __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount) return err {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyDtoD_v2 cuPythonInit() if __cuMemcpyDtoD_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') err = ( __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount) return err {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyDtoA_v2 cuPythonInit() if __cuMemcpyDtoA_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') err = ( __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount) return err {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyAtoD_v2 cuPythonInit() if __cuMemcpyAtoD_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') err = ( __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount) return err {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyHtoA_v2 cuPythonInit() if __cuMemcpyHtoA_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') err = ( __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount) return err {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyAtoH_v2 cuPythonInit() if __cuMemcpyAtoH_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') err = ( __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount) return err {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyAtoA_v2 cuPythonInit() if __cuMemcpyAtoA_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') err = ( __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount) return err {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy2D_v2 cuPythonInit() if __cuMemcpy2D_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpy2D_v2" not found') err = ( __cuMemcpy2D_v2)(pCopy) return err {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy2DUnaligned_v2 cuPythonInit() if __cuMemcpy2DUnaligned_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') err = ( __cuMemcpy2DUnaligned_v2)(pCopy) return err {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy3D_v2 cuPythonInit() if __cuMemcpy3D_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpy3D_v2" not found') err = ( __cuMemcpy3D_v2)(pCopy) return err {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy3DPeer cuPythonInit() if __cuMemcpy3DPeer == NULL: with gil: raise RuntimeError('Function "cuMemcpy3DPeer" not found') err = ( __cuMemcpy3DPeer)(pCopy) return err {{endif}} {{if 'cuMemcpyAsync' in found_functions}} cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyAsync cuPythonInit() if __cuMemcpyAsync == NULL: with gil: raise RuntimeError('Function "cuMemcpyAsync" not found') err = ( __cuMemcpyAsync)(dst, src, ByteCount, hStream) return err {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyPeerAsync cuPythonInit() if __cuMemcpyPeerAsync == NULL: with gil: raise RuntimeError('Function "cuMemcpyPeerAsync" not found') err = ( __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) return err {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyHtoDAsync_v2 cuPythonInit() if __cuMemcpyHtoDAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') err = ( __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream) return err {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyDtoHAsync_v2 cuPythonInit() if __cuMemcpyDtoHAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') err = ( __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream) return err {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyDtoDAsync_v2 cuPythonInit() if __cuMemcpyDtoDAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') err = ( __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream) return err {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyHtoAAsync_v2 cuPythonInit() if __cuMemcpyHtoAAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') err = ( __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream) return err {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpyAtoHAsync_v2 cuPythonInit() if __cuMemcpyAtoHAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') err = ( __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream) return err {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy2DAsync_v2 cuPythonInit() if __cuMemcpy2DAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') err = ( __cuMemcpy2DAsync_v2)(pCopy, hStream) return err {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy3DAsync_v2 cuPythonInit() if __cuMemcpy3DAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') err = ( __cuMemcpy3DAsync_v2)(pCopy, hStream) return err {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemcpy3DPeerAsync cuPythonInit() if __cuMemcpy3DPeerAsync == NULL: with gil: raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') err = ( __cuMemcpy3DPeerAsync)(pCopy, hStream) return err {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD8_v2 cuPythonInit() if __cuMemsetD8_v2 == NULL: with gil: raise RuntimeError('Function "cuMemsetD8_v2" not found') err = ( __cuMemsetD8_v2)(dstDevice, uc, N) return err {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD16_v2 cuPythonInit() if __cuMemsetD16_v2 == NULL: with gil: raise RuntimeError('Function "cuMemsetD16_v2" not found') err = ( __cuMemsetD16_v2)(dstDevice, us, N) return err {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD32_v2 cuPythonInit() if __cuMemsetD32_v2 == NULL: with gil: raise RuntimeError('Function "cuMemsetD32_v2" not found') err = ( __cuMemsetD32_v2)(dstDevice, ui, N) return err {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD2D8_v2 cuPythonInit() if __cuMemsetD2D8_v2 == NULL: with gil: raise RuntimeError('Function "cuMemsetD2D8_v2" not found') err = ( __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height) return err {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD2D16_v2 cuPythonInit() if __cuMemsetD2D16_v2 == NULL: with gil: raise RuntimeError('Function "cuMemsetD2D16_v2" not found') err = ( __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height) return err {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD2D32_v2 cuPythonInit() if __cuMemsetD2D32_v2 == NULL: with gil: raise RuntimeError('Function "cuMemsetD2D32_v2" not found') err = ( __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height) return err {{endif}} {{if 'cuMemsetD8Async' in found_functions}} cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD8Async cuPythonInit() if __cuMemsetD8Async == NULL: with gil: raise RuntimeError('Function "cuMemsetD8Async" not found') err = ( __cuMemsetD8Async)(dstDevice, uc, N, hStream) return err {{endif}} {{if 'cuMemsetD16Async' in found_functions}} cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD16Async cuPythonInit() if __cuMemsetD16Async == NULL: with gil: raise RuntimeError('Function "cuMemsetD16Async" not found') err = ( __cuMemsetD16Async)(dstDevice, us, N, hStream) return err {{endif}} {{if 'cuMemsetD32Async' in found_functions}} cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD32Async cuPythonInit() if __cuMemsetD32Async == NULL: with gil: raise RuntimeError('Function "cuMemsetD32Async" not found') err = ( __cuMemsetD32Async)(dstDevice, ui, N, hStream) return err {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD2D8Async cuPythonInit() if __cuMemsetD2D8Async == NULL: with gil: raise RuntimeError('Function "cuMemsetD2D8Async" not found') err = ( __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream) return err {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD2D16Async cuPythonInit() if __cuMemsetD2D16Async == NULL: with gil: raise RuntimeError('Function "cuMemsetD2D16Async" not found') err = ( __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream) return err {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemsetD2D32Async cuPythonInit() if __cuMemsetD2D32Async == NULL: with gil: raise RuntimeError('Function "cuMemsetD2D32Async" not found') err = ( __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream) return err {{endif}} {{if 'cuArrayCreate_v2' in found_functions}} cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArrayCreate_v2 cuPythonInit() if __cuArrayCreate_v2 == NULL: with gil: raise RuntimeError('Function "cuArrayCreate_v2" not found') err = ( __cuArrayCreate_v2)(pHandle, pAllocateArray) return err {{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}} cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArrayGetDescriptor_v2 cuPythonInit() if __cuArrayGetDescriptor_v2 == NULL: with gil: raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') err = ( __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray) return err {{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}} cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArrayGetSparseProperties cuPythonInit() if __cuArrayGetSparseProperties == NULL: with gil: raise RuntimeError('Function "cuArrayGetSparseProperties" not found') err = ( __cuArrayGetSparseProperties)(sparseProperties, array) return err {{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}} cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMipmappedArrayGetSparseProperties cuPythonInit() if __cuMipmappedArrayGetSparseProperties == NULL: with gil: raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') err = ( __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap) return err {{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}} cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArrayGetMemoryRequirements cuPythonInit() if __cuArrayGetMemoryRequirements == NULL: with gil: raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') err = ( __cuArrayGetMemoryRequirements)(memoryRequirements, array, device) return err {{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}} cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMipmappedArrayGetMemoryRequirements cuPythonInit() if __cuMipmappedArrayGetMemoryRequirements == NULL: with gil: raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') err = ( __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device) return err {{endif}} {{if 'cuArrayGetPlane' in found_functions}} cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArrayGetPlane cuPythonInit() if __cuArrayGetPlane == NULL: with gil: raise RuntimeError('Function "cuArrayGetPlane" not found') err = ( __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx) return err {{endif}} {{if 'cuArrayDestroy' in found_functions}} cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArrayDestroy cuPythonInit() if __cuArrayDestroy == NULL: with gil: raise RuntimeError('Function "cuArrayDestroy" not found') err = ( __cuArrayDestroy)(hArray) return err {{endif}} {{if 'cuArray3DCreate_v2' in found_functions}} cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArray3DCreate_v2 cuPythonInit() if __cuArray3DCreate_v2 == NULL: with gil: raise RuntimeError('Function "cuArray3DCreate_v2" not found') err = ( __cuArray3DCreate_v2)(pHandle, pAllocateArray) return err {{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}} cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuArray3DGetDescriptor_v2 cuPythonInit() if __cuArray3DGetDescriptor_v2 == NULL: with gil: raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') err = ( __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray) return err {{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}} cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMipmappedArrayCreate cuPythonInit() if __cuMipmappedArrayCreate == NULL: with gil: raise RuntimeError('Function "cuMipmappedArrayCreate" not found') err = ( __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels) return err {{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}} cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMipmappedArrayGetLevel cuPythonInit() if __cuMipmappedArrayGetLevel == NULL: with gil: raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') err = ( __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level) return err {{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}} cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMipmappedArrayDestroy cuPythonInit() if __cuMipmappedArrayDestroy == NULL: with gil: raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') err = ( __cuMipmappedArrayDestroy)(hMipmappedArray) return err {{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}} cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemGetHandleForAddressRange cuPythonInit() if __cuMemGetHandleForAddressRange == NULL: with gil: raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') err = ( __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags) return err {{endif}} {{if 'cuMemAddressReserve' in found_functions}} cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAddressReserve cuPythonInit() if __cuMemAddressReserve == NULL: with gil: raise RuntimeError('Function "cuMemAddressReserve" not found') err = ( __cuMemAddressReserve)(ptr, size, alignment, addr, flags) return err {{endif}} {{if 'cuMemAddressFree' in found_functions}} cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAddressFree cuPythonInit() if __cuMemAddressFree == NULL: with gil: raise RuntimeError('Function "cuMemAddressFree" not found') err = ( __cuMemAddressFree)(ptr, size) return err {{endif}} {{if 'cuMemCreate' in found_functions}} cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemCreate cuPythonInit() if __cuMemCreate == NULL: with gil: raise RuntimeError('Function "cuMemCreate" not found') err = ( __cuMemCreate)(handle, size, prop, flags) return err {{endif}} {{if 'cuMemRelease' in found_functions}} cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemRelease cuPythonInit() if __cuMemRelease == NULL: with gil: raise RuntimeError('Function "cuMemRelease" not found') err = ( __cuMemRelease)(handle) return err {{endif}} {{if 'cuMemMap' in found_functions}} cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemMap cuPythonInit() if __cuMemMap == NULL: with gil: raise RuntimeError('Function "cuMemMap" not found') err = ( __cuMemMap)(ptr, size, offset, handle, flags) return err {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemMapArrayAsync cuPythonInit() if __cuMemMapArrayAsync == NULL: with gil: raise RuntimeError('Function "cuMemMapArrayAsync" not found') err = ( __cuMemMapArrayAsync)(mapInfoList, count, hStream) return err {{endif}} {{if 'cuMemUnmap' in found_functions}} cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemUnmap cuPythonInit() if __cuMemUnmap == NULL: with gil: raise RuntimeError('Function "cuMemUnmap" not found') err = ( __cuMemUnmap)(ptr, size) return err {{endif}} {{if 'cuMemSetAccess' in found_functions}} cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemSetAccess cuPythonInit() if __cuMemSetAccess == NULL: with gil: raise RuntimeError('Function "cuMemSetAccess" not found') err = ( __cuMemSetAccess)(ptr, size, desc, count) return err {{endif}} {{if 'cuMemGetAccess' in found_functions}} cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemGetAccess cuPythonInit() if __cuMemGetAccess == NULL: with gil: raise RuntimeError('Function "cuMemGetAccess" not found') err = ( __cuMemGetAccess)(flags, location, ptr) return err {{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}} cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemExportToShareableHandle cuPythonInit() if __cuMemExportToShareableHandle == NULL: with gil: raise RuntimeError('Function "cuMemExportToShareableHandle" not found') err = ( __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags) return err {{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}} cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemImportFromShareableHandle cuPythonInit() if __cuMemImportFromShareableHandle == NULL: with gil: raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') err = ( __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType) return err {{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}} cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemGetAllocationGranularity cuPythonInit() if __cuMemGetAllocationGranularity == NULL: with gil: raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') err = ( __cuMemGetAllocationGranularity)(granularity, prop, option) return err {{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}} cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemGetAllocationPropertiesFromHandle cuPythonInit() if __cuMemGetAllocationPropertiesFromHandle == NULL: with gil: raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') err = ( __cuMemGetAllocationPropertiesFromHandle)(prop, handle) return err {{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}} cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemRetainAllocationHandle cuPythonInit() if __cuMemRetainAllocationHandle == NULL: with gil: raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') err = ( __cuMemRetainAllocationHandle)(handle, addr) return err {{endif}} {{if 'cuMemFreeAsync' in found_functions}} cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemFreeAsync cuPythonInit() if __cuMemFreeAsync == NULL: with gil: raise RuntimeError('Function "cuMemFreeAsync" not found') err = ( __cuMemFreeAsync)(dptr, hStream) return err {{endif}} {{if 'cuMemAllocAsync' in found_functions}} cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAllocAsync cuPythonInit() if __cuMemAllocAsync == NULL: with gil: raise RuntimeError('Function "cuMemAllocAsync" not found') err = ( __cuMemAllocAsync)(dptr, bytesize, hStream) return err {{endif}} {{if 'cuMemPoolTrimTo' in found_functions}} cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolTrimTo cuPythonInit() if __cuMemPoolTrimTo == NULL: with gil: raise RuntimeError('Function "cuMemPoolTrimTo" not found') err = ( __cuMemPoolTrimTo)(pool, minBytesToKeep) return err {{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}} cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolSetAttribute cuPythonInit() if __cuMemPoolSetAttribute == NULL: with gil: raise RuntimeError('Function "cuMemPoolSetAttribute" not found') err = ( __cuMemPoolSetAttribute)(pool, attr, value) return err {{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}} cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolGetAttribute cuPythonInit() if __cuMemPoolGetAttribute == NULL: with gil: raise RuntimeError('Function "cuMemPoolGetAttribute" not found') err = ( __cuMemPoolGetAttribute)(pool, attr, value) return err {{endif}} {{if 'cuMemPoolSetAccess' in found_functions}} cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolSetAccess cuPythonInit() if __cuMemPoolSetAccess == NULL: with gil: raise RuntimeError('Function "cuMemPoolSetAccess" not found') err = ( __cuMemPoolSetAccess)(pool, map, count) return err {{endif}} {{if 'cuMemPoolGetAccess' in found_functions}} cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolGetAccess cuPythonInit() if __cuMemPoolGetAccess == NULL: with gil: raise RuntimeError('Function "cuMemPoolGetAccess" not found') err = ( __cuMemPoolGetAccess)(flags, memPool, location) return err {{endif}} {{if 'cuMemPoolCreate' in found_functions}} cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolCreate cuPythonInit() if __cuMemPoolCreate == NULL: with gil: raise RuntimeError('Function "cuMemPoolCreate" not found') err = ( __cuMemPoolCreate)(pool, poolProps) return err {{endif}} {{if 'cuMemPoolDestroy' in found_functions}} cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolDestroy cuPythonInit() if __cuMemPoolDestroy == NULL: with gil: raise RuntimeError('Function "cuMemPoolDestroy" not found') err = ( __cuMemPoolDestroy)(pool) return err {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAllocFromPoolAsync cuPythonInit() if __cuMemAllocFromPoolAsync == NULL: with gil: raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') err = ( __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream) return err {{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}} cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolExportToShareableHandle cuPythonInit() if __cuMemPoolExportToShareableHandle == NULL: with gil: raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') err = ( __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags) return err {{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}} cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolImportFromShareableHandle cuPythonInit() if __cuMemPoolImportFromShareableHandle == NULL: with gil: raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') err = ( __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags) return err {{endif}} {{if 'cuMemPoolExportPointer' in found_functions}} cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolExportPointer cuPythonInit() if __cuMemPoolExportPointer == NULL: with gil: raise RuntimeError('Function "cuMemPoolExportPointer" not found') err = ( __cuMemPoolExportPointer)(shareData_out, ptr) return err {{endif}} {{if 'cuMemPoolImportPointer' in found_functions}} cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPoolImportPointer cuPythonInit() if __cuMemPoolImportPointer == NULL: with gil: raise RuntimeError('Function "cuMemPoolImportPointer" not found') err = ( __cuMemPoolImportPointer)(ptr_out, pool, shareData) return err {{endif}} {{if 'cuMulticastCreate' in found_functions}} cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMulticastCreate cuPythonInit() if __cuMulticastCreate == NULL: with gil: raise RuntimeError('Function "cuMulticastCreate" not found') err = ( __cuMulticastCreate)(mcHandle, prop) return err {{endif}} {{if 'cuMulticastAddDevice' in found_functions}} cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMulticastAddDevice cuPythonInit() if __cuMulticastAddDevice == NULL: with gil: raise RuntimeError('Function "cuMulticastAddDevice" not found') err = ( __cuMulticastAddDevice)(mcHandle, dev) return err {{endif}} {{if 'cuMulticastBindMem' in found_functions}} cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMulticastBindMem cuPythonInit() if __cuMulticastBindMem == NULL: with gil: raise RuntimeError('Function "cuMulticastBindMem" not found') err = ( __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags) return err {{endif}} {{if 'cuMulticastBindAddr' in found_functions}} cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMulticastBindAddr cuPythonInit() if __cuMulticastBindAddr == NULL: with gil: raise RuntimeError('Function "cuMulticastBindAddr" not found') err = ( __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags) return err {{endif}} {{if 'cuMulticastUnbind' in found_functions}} cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMulticastUnbind cuPythonInit() if __cuMulticastUnbind == NULL: with gil: raise RuntimeError('Function "cuMulticastUnbind" not found') err = ( __cuMulticastUnbind)(mcHandle, dev, mcOffset, size) return err {{endif}} {{if 'cuMulticastGetGranularity' in found_functions}} cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMulticastGetGranularity cuPythonInit() if __cuMulticastGetGranularity == NULL: with gil: raise RuntimeError('Function "cuMulticastGetGranularity" not found') err = ( __cuMulticastGetGranularity)(granularity, prop, option) return err {{endif}} {{if 'cuPointerGetAttribute' in found_functions}} cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuPointerGetAttribute cuPythonInit() if __cuPointerGetAttribute == NULL: with gil: raise RuntimeError('Function "cuPointerGetAttribute" not found') err = ( __cuPointerGetAttribute)(data, attribute, ptr) return err {{endif}} {{if 'cuMemPrefetchAsync' in found_functions}} cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPrefetchAsync cuPythonInit() if __cuMemPrefetchAsync == NULL: with gil: raise RuntimeError('Function "cuMemPrefetchAsync" not found') err = ( __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream) return err {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemPrefetchAsync_v2 cuPythonInit() if __cuMemPrefetchAsync_v2 == NULL: with gil: raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') err = ( __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream) return err {{endif}} {{if 'cuMemAdvise' in found_functions}} cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAdvise cuPythonInit() if __cuMemAdvise == NULL: with gil: raise RuntimeError('Function "cuMemAdvise" not found') err = ( __cuMemAdvise)(devPtr, count, advice, device) return err {{endif}} {{if 'cuMemAdvise_v2' in found_functions}} cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemAdvise_v2 cuPythonInit() if __cuMemAdvise_v2 == NULL: with gil: raise RuntimeError('Function "cuMemAdvise_v2" not found') err = ( __cuMemAdvise_v2)(devPtr, count, advice, location) return err {{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}} cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemRangeGetAttribute cuPythonInit() if __cuMemRangeGetAttribute == NULL: with gil: raise RuntimeError('Function "cuMemRangeGetAttribute" not found') err = ( __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count) return err {{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}} cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuMemRangeGetAttributes cuPythonInit() if __cuMemRangeGetAttributes == NULL: with gil: raise RuntimeError('Function "cuMemRangeGetAttributes" not found') err = ( __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count) return err {{endif}} {{if 'cuPointerSetAttribute' in found_functions}} cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuPointerSetAttribute cuPythonInit() if __cuPointerSetAttribute == NULL: with gil: raise RuntimeError('Function "cuPointerSetAttribute" not found') err = ( __cuPointerSetAttribute)(value, attribute, ptr) return err {{endif}} {{if 'cuPointerGetAttributes' in found_functions}} cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuPointerGetAttributes cuPythonInit() if __cuPointerGetAttributes == NULL: with gil: raise RuntimeError('Function "cuPointerGetAttributes" not found') err = ( __cuPointerGetAttributes)(numAttributes, attributes, data, ptr) return err {{endif}} {{if 'cuStreamCreate' in found_functions}} cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamCreate cuPythonInit() if __cuStreamCreate == NULL: with gil: raise RuntimeError('Function "cuStreamCreate" not found') err = ( __cuStreamCreate)(phStream, Flags) return err {{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}} cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamCreateWithPriority cuPythonInit() if __cuStreamCreateWithPriority == NULL: with gil: raise RuntimeError('Function "cuStreamCreateWithPriority" not found') err = ( __cuStreamCreateWithPriority)(phStream, flags, priority) return err {{endif}} {{if 'cuStreamGetPriority' in found_functions}} cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetPriority cuPythonInit() if __cuStreamGetPriority == NULL: with gil: raise RuntimeError('Function "cuStreamGetPriority" not found') err = ( __cuStreamGetPriority)(hStream, priority) return err {{endif}} {{if 'cuStreamGetFlags' in found_functions}} cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetFlags cuPythonInit() if __cuStreamGetFlags == NULL: with gil: raise RuntimeError('Function "cuStreamGetFlags" not found') err = ( __cuStreamGetFlags)(hStream, flags) return err {{endif}} {{if 'cuStreamGetId' in found_functions}} cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetId cuPythonInit() if __cuStreamGetId == NULL: with gil: raise RuntimeError('Function "cuStreamGetId" not found') err = ( __cuStreamGetId)(hStream, streamId) return err {{endif}} {{if 'cuStreamGetCtx' in found_functions}} cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetCtx cuPythonInit() if __cuStreamGetCtx == NULL: with gil: raise RuntimeError('Function "cuStreamGetCtx" not found') err = ( __cuStreamGetCtx)(hStream, pctx) return err {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetCtx_v2 cuPythonInit() if __cuStreamGetCtx_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamGetCtx_v2" not found') err = ( __cuStreamGetCtx_v2)(hStream, pCtx, pGreenCtx) return err {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamWaitEvent cuPythonInit() if __cuStreamWaitEvent == NULL: with gil: raise RuntimeError('Function "cuStreamWaitEvent" not found') err = ( __cuStreamWaitEvent)(hStream, hEvent, Flags) return err {{endif}} {{if 'cuStreamAddCallback' in found_functions}} cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamAddCallback cuPythonInit() if __cuStreamAddCallback == NULL: with gil: raise RuntimeError('Function "cuStreamAddCallback" not found') err = ( __cuStreamAddCallback)(hStream, callback, userData, flags) return err {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamBeginCapture_v2 cuPythonInit() if __cuStreamBeginCapture_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') err = ( __cuStreamBeginCapture_v2)(hStream, mode) return err {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamBeginCaptureToGraph cuPythonInit() if __cuStreamBeginCaptureToGraph == NULL: with gil: raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') err = ( __cuStreamBeginCaptureToGraph)(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) return err {{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}} cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuThreadExchangeStreamCaptureMode cuPythonInit() if __cuThreadExchangeStreamCaptureMode == NULL: with gil: raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') err = ( __cuThreadExchangeStreamCaptureMode)(mode) return err {{endif}} {{if 'cuStreamEndCapture' in found_functions}} cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamEndCapture cuPythonInit() if __cuStreamEndCapture == NULL: with gil: raise RuntimeError('Function "cuStreamEndCapture" not found') err = ( __cuStreamEndCapture)(hStream, phGraph) return err {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamIsCapturing cuPythonInit() if __cuStreamIsCapturing == NULL: with gil: raise RuntimeError('Function "cuStreamIsCapturing" not found') err = ( __cuStreamIsCapturing)(hStream, captureStatus) return err {{endif}} {{if 'cuStreamGetCaptureInfo_v2' in found_functions}} cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetCaptureInfo_v2 cuPythonInit() if __cuStreamGetCaptureInfo_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') err = ( __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) return err {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetCaptureInfo_v3 cuPythonInit() if __cuStreamGetCaptureInfo_v3 == NULL: with gil: raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') err = ( __cuStreamGetCaptureInfo_v3)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) return err {{endif}} {{if 'cuStreamUpdateCaptureDependencies' in found_functions}} cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamUpdateCaptureDependencies cuPythonInit() if __cuStreamUpdateCaptureDependencies == NULL: with gil: raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') err = ( __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags) return err {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamUpdateCaptureDependencies_v2 cuPythonInit() if __cuStreamUpdateCaptureDependencies_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') err = ( __cuStreamUpdateCaptureDependencies_v2)(hStream, dependencies, dependencyData, numDependencies, flags) return err {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamAttachMemAsync cuPythonInit() if __cuStreamAttachMemAsync == NULL: with gil: raise RuntimeError('Function "cuStreamAttachMemAsync" not found') err = ( __cuStreamAttachMemAsync)(hStream, dptr, length, flags) return err {{endif}} {{if 'cuStreamQuery' in found_functions}} cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamQuery cuPythonInit() if __cuStreamQuery == NULL: with gil: raise RuntimeError('Function "cuStreamQuery" not found') err = ( __cuStreamQuery)(hStream) return err {{endif}} {{if 'cuStreamSynchronize' in found_functions}} cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamSynchronize cuPythonInit() if __cuStreamSynchronize == NULL: with gil: raise RuntimeError('Function "cuStreamSynchronize" not found') err = ( __cuStreamSynchronize)(hStream) return err {{endif}} {{if 'cuStreamDestroy_v2' in found_functions}} cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamDestroy_v2 cuPythonInit() if __cuStreamDestroy_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamDestroy_v2" not found') err = ( __cuStreamDestroy_v2)(hStream) return err {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamCopyAttributes cuPythonInit() if __cuStreamCopyAttributes == NULL: with gil: raise RuntimeError('Function "cuStreamCopyAttributes" not found') err = ( __cuStreamCopyAttributes)(dst, src) return err {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetAttribute cuPythonInit() if __cuStreamGetAttribute == NULL: with gil: raise RuntimeError('Function "cuStreamGetAttribute" not found') err = ( __cuStreamGetAttribute)(hStream, attr, value_out) return err {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamSetAttribute cuPythonInit() if __cuStreamSetAttribute == NULL: with gil: raise RuntimeError('Function "cuStreamSetAttribute" not found') err = ( __cuStreamSetAttribute)(hStream, attr, value) return err {{endif}} {{if 'cuEventCreate' in found_functions}} cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventCreate cuPythonInit() if __cuEventCreate == NULL: with gil: raise RuntimeError('Function "cuEventCreate" not found') err = ( __cuEventCreate)(phEvent, Flags) return err {{endif}} {{if 'cuEventRecord' in found_functions}} cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventRecord cuPythonInit() if __cuEventRecord == NULL: with gil: raise RuntimeError('Function "cuEventRecord" not found') err = ( __cuEventRecord)(hEvent, hStream) return err {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventRecordWithFlags cuPythonInit() if __cuEventRecordWithFlags == NULL: with gil: raise RuntimeError('Function "cuEventRecordWithFlags" not found') err = ( __cuEventRecordWithFlags)(hEvent, hStream, flags) return err {{endif}} {{if 'cuEventQuery' in found_functions}} cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventQuery cuPythonInit() if __cuEventQuery == NULL: with gil: raise RuntimeError('Function "cuEventQuery" not found') err = ( __cuEventQuery)(hEvent) return err {{endif}} {{if 'cuEventSynchronize' in found_functions}} cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventSynchronize cuPythonInit() if __cuEventSynchronize == NULL: with gil: raise RuntimeError('Function "cuEventSynchronize" not found') err = ( __cuEventSynchronize)(hEvent) return err {{endif}} {{if 'cuEventDestroy_v2' in found_functions}} cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventDestroy_v2 cuPythonInit() if __cuEventDestroy_v2 == NULL: with gil: raise RuntimeError('Function "cuEventDestroy_v2" not found') err = ( __cuEventDestroy_v2)(hEvent) return err {{endif}} {{if 'cuEventElapsedTime' in found_functions}} cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventElapsedTime cuPythonInit() if __cuEventElapsedTime == NULL: with gil: raise RuntimeError('Function "cuEventElapsedTime" not found') err = ( __cuEventElapsedTime)(pMilliseconds, hStart, hEnd) return err {{endif}} {{if 'cuImportExternalMemory' in found_functions}} cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuImportExternalMemory cuPythonInit() if __cuImportExternalMemory == NULL: with gil: raise RuntimeError('Function "cuImportExternalMemory" not found') err = ( __cuImportExternalMemory)(extMem_out, memHandleDesc) return err {{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}} cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuExternalMemoryGetMappedBuffer cuPythonInit() if __cuExternalMemoryGetMappedBuffer == NULL: with gil: raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') err = ( __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc) return err {{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}} cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuExternalMemoryGetMappedMipmappedArray cuPythonInit() if __cuExternalMemoryGetMappedMipmappedArray == NULL: with gil: raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') err = ( __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc) return err {{endif}} {{if 'cuDestroyExternalMemory' in found_functions}} cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDestroyExternalMemory cuPythonInit() if __cuDestroyExternalMemory == NULL: with gil: raise RuntimeError('Function "cuDestroyExternalMemory" not found') err = ( __cuDestroyExternalMemory)(extMem) return err {{endif}} {{if 'cuImportExternalSemaphore' in found_functions}} cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuImportExternalSemaphore cuPythonInit() if __cuImportExternalSemaphore == NULL: with gil: raise RuntimeError('Function "cuImportExternalSemaphore" not found') err = ( __cuImportExternalSemaphore)(extSem_out, semHandleDesc) return err {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuSignalExternalSemaphoresAsync cuPythonInit() if __cuSignalExternalSemaphoresAsync == NULL: with gil: raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') err = ( __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) return err {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuWaitExternalSemaphoresAsync cuPythonInit() if __cuWaitExternalSemaphoresAsync == NULL: with gil: raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') err = ( __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) return err {{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}} cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDestroyExternalSemaphore cuPythonInit() if __cuDestroyExternalSemaphore == NULL: with gil: raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') err = ( __cuDestroyExternalSemaphore)(extSem) return err {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamWaitValue32_v2 cuPythonInit() if __cuStreamWaitValue32_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') err = ( __cuStreamWaitValue32_v2)(stream, addr, value, flags) return err {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamWaitValue64_v2 cuPythonInit() if __cuStreamWaitValue64_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') err = ( __cuStreamWaitValue64_v2)(stream, addr, value, flags) return err {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamWriteValue32_v2 cuPythonInit() if __cuStreamWriteValue32_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') err = ( __cuStreamWriteValue32_v2)(stream, addr, value, flags) return err {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamWriteValue64_v2 cuPythonInit() if __cuStreamWriteValue64_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') err = ( __cuStreamWriteValue64_v2)(stream, addr, value, flags) return err {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamBatchMemOp_v2 cuPythonInit() if __cuStreamBatchMemOp_v2 == NULL: with gil: raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') err = ( __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags) return err {{endif}} {{if 'cuFuncGetAttribute' in found_functions}} cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncGetAttribute cuPythonInit() if __cuFuncGetAttribute == NULL: with gil: raise RuntimeError('Function "cuFuncGetAttribute" not found') err = ( __cuFuncGetAttribute)(pi, attrib, hfunc) return err {{endif}} {{if 'cuFuncSetAttribute' in found_functions}} cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncSetAttribute cuPythonInit() if __cuFuncSetAttribute == NULL: with gil: raise RuntimeError('Function "cuFuncSetAttribute" not found') err = ( __cuFuncSetAttribute)(hfunc, attrib, value) return err {{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}} cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncSetCacheConfig cuPythonInit() if __cuFuncSetCacheConfig == NULL: with gil: raise RuntimeError('Function "cuFuncSetCacheConfig" not found') err = ( __cuFuncSetCacheConfig)(hfunc, config) return err {{endif}} {{if 'cuFuncGetModule' in found_functions}} cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncGetModule cuPythonInit() if __cuFuncGetModule == NULL: with gil: raise RuntimeError('Function "cuFuncGetModule" not found') err = ( __cuFuncGetModule)(hmod, hfunc) return err {{endif}} {{if 'cuFuncGetName' in found_functions}} cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncGetName cuPythonInit() if __cuFuncGetName == NULL: with gil: raise RuntimeError('Function "cuFuncGetName" not found') err = ( __cuFuncGetName)(name, hfunc) return err {{endif}} {{if 'cuFuncGetParamInfo' in found_functions}} cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncGetParamInfo cuPythonInit() if __cuFuncGetParamInfo == NULL: with gil: raise RuntimeError('Function "cuFuncGetParamInfo" not found') err = ( __cuFuncGetParamInfo)(func, paramIndex, paramOffset, paramSize) return err {{endif}} {{if 'cuFuncIsLoaded' in found_functions}} cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncIsLoaded cuPythonInit() if __cuFuncIsLoaded == NULL: with gil: raise RuntimeError('Function "cuFuncIsLoaded" not found') err = ( __cuFuncIsLoaded)(state, function) return err {{endif}} {{if 'cuFuncLoad' in found_functions}} cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncLoad cuPythonInit() if __cuFuncLoad == NULL: with gil: raise RuntimeError('Function "cuFuncLoad" not found') err = ( __cuFuncLoad)(function) return err {{endif}} {{if 'cuLaunchKernel' in found_functions}} cdef CUresult _cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunchKernel cuPythonInit() if __cuLaunchKernel == NULL: with gil: raise RuntimeError('Function "cuLaunchKernel" not found') err = ( __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) return err {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunchKernelEx cuPythonInit() if __cuLaunchKernelEx == NULL: with gil: raise RuntimeError('Function "cuLaunchKernelEx" not found') err = ( __cuLaunchKernelEx)(config, f, kernelParams, extra) return err {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} cdef CUresult _cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunchCooperativeKernel cuPythonInit() if __cuLaunchCooperativeKernel == NULL: with gil: raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') err = ( __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) return err {{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}} cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunchCooperativeKernelMultiDevice cuPythonInit() if __cuLaunchCooperativeKernelMultiDevice == NULL: with gil: raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') err = ( __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags) return err {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunchHostFunc cuPythonInit() if __cuLaunchHostFunc == NULL: with gil: raise RuntimeError('Function "cuLaunchHostFunc" not found') err = ( __cuLaunchHostFunc)(hStream, fn, userData) return err {{endif}} {{if 'cuFuncSetBlockShape' in found_functions}} cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncSetBlockShape cuPythonInit() if __cuFuncSetBlockShape == NULL: with gil: raise RuntimeError('Function "cuFuncSetBlockShape" not found') err = ( __cuFuncSetBlockShape)(hfunc, x, y, z) return err {{endif}} {{if 'cuFuncSetSharedSize' in found_functions}} cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncSetSharedSize cuPythonInit() if __cuFuncSetSharedSize == NULL: with gil: raise RuntimeError('Function "cuFuncSetSharedSize" not found') err = ( __cuFuncSetSharedSize)(hfunc, numbytes) return err {{endif}} {{if 'cuParamSetSize' in found_functions}} cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuParamSetSize cuPythonInit() if __cuParamSetSize == NULL: with gil: raise RuntimeError('Function "cuParamSetSize" not found') err = ( __cuParamSetSize)(hfunc, numbytes) return err {{endif}} {{if 'cuParamSeti' in found_functions}} cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuParamSeti cuPythonInit() if __cuParamSeti == NULL: with gil: raise RuntimeError('Function "cuParamSeti" not found') err = ( __cuParamSeti)(hfunc, offset, value) return err {{endif}} {{if 'cuParamSetf' in found_functions}} cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuParamSetf cuPythonInit() if __cuParamSetf == NULL: with gil: raise RuntimeError('Function "cuParamSetf" not found') err = ( __cuParamSetf)(hfunc, offset, value) return err {{endif}} {{if 'cuParamSetv' in found_functions}} cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuParamSetv cuPythonInit() if __cuParamSetv == NULL: with gil: raise RuntimeError('Function "cuParamSetv" not found') err = ( __cuParamSetv)(hfunc, offset, ptr, numbytes) return err {{endif}} {{if 'cuLaunch' in found_functions}} cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunch cuPythonInit() if __cuLaunch == NULL: with gil: raise RuntimeError('Function "cuLaunch" not found') err = ( __cuLaunch)(f) return err {{endif}} {{if 'cuLaunchGrid' in found_functions}} cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunchGrid cuPythonInit() if __cuLaunchGrid == NULL: with gil: raise RuntimeError('Function "cuLaunchGrid" not found') err = ( __cuLaunchGrid)(f, grid_width, grid_height) return err {{endif}} {{if 'cuLaunchGridAsync' in found_functions}} cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuLaunchGridAsync cuPythonInit() if __cuLaunchGridAsync == NULL: with gil: raise RuntimeError('Function "cuLaunchGridAsync" not found') err = ( __cuLaunchGridAsync)(f, grid_width, grid_height, hStream) return err {{endif}} {{if 'cuParamSetTexRef' in found_functions}} cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuParamSetTexRef cuPythonInit() if __cuParamSetTexRef == NULL: with gil: raise RuntimeError('Function "cuParamSetTexRef" not found') err = ( __cuParamSetTexRef)(hfunc, texunit, hTexRef) return err {{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}} cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuFuncSetSharedMemConfig cuPythonInit() if __cuFuncSetSharedMemConfig == NULL: with gil: raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') err = ( __cuFuncSetSharedMemConfig)(hfunc, config) return err {{endif}} {{if 'cuGraphCreate' in found_functions}} cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphCreate cuPythonInit() if __cuGraphCreate == NULL: with gil: raise RuntimeError('Function "cuGraphCreate" not found') err = ( __cuGraphCreate)(phGraph, flags) return err {{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}} cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddKernelNode_v2 cuPythonInit() if __cuGraphAddKernelNode_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') err = ( __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}} cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphKernelNodeGetParams_v2 cuPythonInit() if __cuGraphKernelNodeGetParams_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') err = ( __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}} cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphKernelNodeSetParams_v2 cuPythonInit() if __cuGraphKernelNodeSetParams_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') err = ( __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}} cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddMemcpyNode cuPythonInit() if __cuGraphAddMemcpyNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') err = ( __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) return err {{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}} cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphMemcpyNodeGetParams cuPythonInit() if __cuGraphMemcpyNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') err = ( __cuGraphMemcpyNodeGetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}} cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphMemcpyNodeSetParams cuPythonInit() if __cuGraphMemcpyNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') err = ( __cuGraphMemcpyNodeSetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}} cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddMemsetNode cuPythonInit() if __cuGraphAddMemsetNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddMemsetNode" not found') err = ( __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) return err {{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}} cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphMemsetNodeGetParams cuPythonInit() if __cuGraphMemsetNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') err = ( __cuGraphMemsetNodeGetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}} cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphMemsetNodeSetParams cuPythonInit() if __cuGraphMemsetNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') err = ( __cuGraphMemsetNodeSetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphAddHostNode' in found_functions}} cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddHostNode cuPythonInit() if __cuGraphAddHostNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddHostNode" not found') err = ( __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}} cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphHostNodeGetParams cuPythonInit() if __cuGraphHostNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') err = ( __cuGraphHostNodeGetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}} cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphHostNodeSetParams cuPythonInit() if __cuGraphHostNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') err = ( __cuGraphHostNodeSetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}} cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddChildGraphNode cuPythonInit() if __cuGraphAddChildGraphNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') err = ( __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph) return err {{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}} cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphChildGraphNodeGetGraph cuPythonInit() if __cuGraphChildGraphNodeGetGraph == NULL: with gil: raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') err = ( __cuGraphChildGraphNodeGetGraph)(hNode, phGraph) return err {{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}} cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddEmptyNode cuPythonInit() if __cuGraphAddEmptyNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddEmptyNode" not found') err = ( __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies) return err {{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}} cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddEventRecordNode cuPythonInit() if __cuGraphAddEventRecordNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') err = ( __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event) return err {{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}} cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphEventRecordNodeGetEvent cuPythonInit() if __cuGraphEventRecordNodeGetEvent == NULL: with gil: raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') err = ( __cuGraphEventRecordNodeGetEvent)(hNode, event_out) return err {{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}} cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphEventRecordNodeSetEvent cuPythonInit() if __cuGraphEventRecordNodeSetEvent == NULL: with gil: raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') err = ( __cuGraphEventRecordNodeSetEvent)(hNode, event) return err {{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}} cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddEventWaitNode cuPythonInit() if __cuGraphAddEventWaitNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') err = ( __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event) return err {{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}} cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphEventWaitNodeGetEvent cuPythonInit() if __cuGraphEventWaitNodeGetEvent == NULL: with gil: raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') err = ( __cuGraphEventWaitNodeGetEvent)(hNode, event_out) return err {{endif}} {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphEventWaitNodeSetEvent cuPythonInit() if __cuGraphEventWaitNodeSetEvent == NULL: with gil: raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') err = ( __cuGraphEventWaitNodeSetEvent)(hNode, event) return err {{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}} cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddExternalSemaphoresSignalNode cuPythonInit() if __cuGraphAddExternalSemaphoresSignalNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') err = ( __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExternalSemaphoresSignalNodeGetParams cuPythonInit() if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') err = ( __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out) return err {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExternalSemaphoresSignalNodeSetParams cuPythonInit() if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') err = ( __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}} cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddExternalSemaphoresWaitNode cuPythonInit() if __cuGraphAddExternalSemaphoresWaitNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') err = ( __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExternalSemaphoresWaitNodeGetParams cuPythonInit() if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') err = ( __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out) return err {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExternalSemaphoresWaitNodeSetParams cuPythonInit() if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') err = ( __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}} cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddBatchMemOpNode cuPythonInit() if __cuGraphAddBatchMemOpNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') err = ( __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}} cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphBatchMemOpNodeGetParams cuPythonInit() if __cuGraphBatchMemOpNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') err = ( __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out) return err {{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}} cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphBatchMemOpNodeSetParams cuPythonInit() if __cuGraphBatchMemOpNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') err = ( __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecBatchMemOpNodeSetParams cuPythonInit() if __cuGraphExecBatchMemOpNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') err = ( __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams) return err {{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}} cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddMemAllocNode cuPythonInit() if __cuGraphAddMemAllocNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') err = ( __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}} cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphMemAllocNodeGetParams cuPythonInit() if __cuGraphMemAllocNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') err = ( __cuGraphMemAllocNodeGetParams)(hNode, params_out) return err {{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}} cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddMemFreeNode cuPythonInit() if __cuGraphAddMemFreeNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') err = ( __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr) return err {{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}} cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphMemFreeNodeGetParams cuPythonInit() if __cuGraphMemFreeNodeGetParams == NULL: with gil: raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') err = ( __cuGraphMemFreeNodeGetParams)(hNode, dptr_out) return err {{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}} cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGraphMemTrim cuPythonInit() if __cuDeviceGraphMemTrim == NULL: with gil: raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') err = ( __cuDeviceGraphMemTrim)(device) return err {{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}} cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetGraphMemAttribute cuPythonInit() if __cuDeviceGetGraphMemAttribute == NULL: with gil: raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') err = ( __cuDeviceGetGraphMemAttribute)(device, attr, value) return err {{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}} cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceSetGraphMemAttribute cuPythonInit() if __cuDeviceSetGraphMemAttribute == NULL: with gil: raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') err = ( __cuDeviceSetGraphMemAttribute)(device, attr, value) return err {{endif}} {{if 'cuGraphClone' in found_functions}} cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphClone cuPythonInit() if __cuGraphClone == NULL: with gil: raise RuntimeError('Function "cuGraphClone" not found') err = ( __cuGraphClone)(phGraphClone, originalGraph) return err {{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}} cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeFindInClone cuPythonInit() if __cuGraphNodeFindInClone == NULL: with gil: raise RuntimeError('Function "cuGraphNodeFindInClone" not found') err = ( __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph) return err {{endif}} {{if 'cuGraphNodeGetType' in found_functions}} cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeGetType cuPythonInit() if __cuGraphNodeGetType == NULL: with gil: raise RuntimeError('Function "cuGraphNodeGetType" not found') err = ( __cuGraphNodeGetType)(hNode, typename) return err {{endif}} {{if 'cuGraphGetNodes' in found_functions}} cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphGetNodes cuPythonInit() if __cuGraphGetNodes == NULL: with gil: raise RuntimeError('Function "cuGraphGetNodes" not found') err = ( __cuGraphGetNodes)(hGraph, nodes, numNodes) return err {{endif}} {{if 'cuGraphGetRootNodes' in found_functions}} cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphGetRootNodes cuPythonInit() if __cuGraphGetRootNodes == NULL: with gil: raise RuntimeError('Function "cuGraphGetRootNodes" not found') err = ( __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes) return err {{endif}} {{if 'cuGraphGetEdges' in found_functions}} cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphGetEdges cuPythonInit() if __cuGraphGetEdges == NULL: with gil: raise RuntimeError('Function "cuGraphGetEdges" not found') err = ( __cuGraphGetEdges)(hGraph, from_, to, numEdges) return err {{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}} cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphGetEdges_v2 cuPythonInit() if __cuGraphGetEdges_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphGetEdges_v2" not found') err = ( __cuGraphGetEdges_v2)(hGraph, from_, to, edgeData, numEdges) return err {{endif}} {{if 'cuGraphNodeGetDependencies' in found_functions}} cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeGetDependencies cuPythonInit() if __cuGraphNodeGetDependencies == NULL: with gil: raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') err = ( __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies) return err {{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}} cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeGetDependencies_v2 cuPythonInit() if __cuGraphNodeGetDependencies_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') err = ( __cuGraphNodeGetDependencies_v2)(hNode, dependencies, edgeData, numDependencies) return err {{endif}} {{if 'cuGraphNodeGetDependentNodes' in found_functions}} cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeGetDependentNodes cuPythonInit() if __cuGraphNodeGetDependentNodes == NULL: with gil: raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') err = ( __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes) return err {{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}} cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeGetDependentNodes_v2 cuPythonInit() if __cuGraphNodeGetDependentNodes_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') err = ( __cuGraphNodeGetDependentNodes_v2)(hNode, dependentNodes, edgeData, numDependentNodes) return err {{endif}} {{if 'cuGraphAddDependencies' in found_functions}} cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddDependencies cuPythonInit() if __cuGraphAddDependencies == NULL: with gil: raise RuntimeError('Function "cuGraphAddDependencies" not found') err = ( __cuGraphAddDependencies)(hGraph, from_, to, numDependencies) return err {{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}} cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddDependencies_v2 cuPythonInit() if __cuGraphAddDependencies_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') err = ( __cuGraphAddDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) return err {{endif}} {{if 'cuGraphRemoveDependencies' in found_functions}} cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphRemoveDependencies cuPythonInit() if __cuGraphRemoveDependencies == NULL: with gil: raise RuntimeError('Function "cuGraphRemoveDependencies" not found') err = ( __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies) return err {{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}} cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphRemoveDependencies_v2 cuPythonInit() if __cuGraphRemoveDependencies_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') err = ( __cuGraphRemoveDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) return err {{endif}} {{if 'cuGraphDestroyNode' in found_functions}} cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphDestroyNode cuPythonInit() if __cuGraphDestroyNode == NULL: with gil: raise RuntimeError('Function "cuGraphDestroyNode" not found') err = ( __cuGraphDestroyNode)(hNode) return err {{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}} cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphInstantiateWithFlags cuPythonInit() if __cuGraphInstantiateWithFlags == NULL: with gil: raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') err = ( __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags) return err {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphInstantiateWithParams cuPythonInit() if __cuGraphInstantiateWithParams == NULL: with gil: raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') err = ( __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams) return err {{endif}} {{if 'cuGraphExecGetFlags' in found_functions}} cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecGetFlags cuPythonInit() if __cuGraphExecGetFlags == NULL: with gil: raise RuntimeError('Function "cuGraphExecGetFlags" not found') err = ( __cuGraphExecGetFlags)(hGraphExec, flags) return err {{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}} cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecKernelNodeSetParams_v2 cuPythonInit() if __cuGraphExecKernelNodeSetParams_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') err = ( __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams) return err {{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecMemcpyNodeSetParams cuPythonInit() if __cuGraphExecMemcpyNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') err = ( __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx) return err {{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecMemsetNodeSetParams cuPythonInit() if __cuGraphExecMemsetNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') err = ( __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx) return err {{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecHostNodeSetParams cuPythonInit() if __cuGraphExecHostNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') err = ( __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams) return err {{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecChildGraphNodeSetParams cuPythonInit() if __cuGraphExecChildGraphNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') err = ( __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph) return err {{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}} cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecEventRecordNodeSetEvent cuPythonInit() if __cuGraphExecEventRecordNodeSetEvent == NULL: with gil: raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') err = ( __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event) return err {{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}} cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecEventWaitNodeSetEvent cuPythonInit() if __cuGraphExecEventWaitNodeSetEvent == NULL: with gil: raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') err = ( __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event) return err {{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecExternalSemaphoresSignalNodeSetParams cuPythonInit() if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') err = ( __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams) return err {{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecExternalSemaphoresWaitNodeSetParams cuPythonInit() if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') err = ( __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams) return err {{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}} cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeSetEnabled cuPythonInit() if __cuGraphNodeSetEnabled == NULL: with gil: raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') err = ( __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled) return err {{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}} cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeGetEnabled cuPythonInit() if __cuGraphNodeGetEnabled == NULL: with gil: raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') err = ( __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled) return err {{endif}} {{if 'cuGraphUpload' in found_functions}} cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphUpload cuPythonInit() if __cuGraphUpload == NULL: with gil: raise RuntimeError('Function "cuGraphUpload" not found') err = ( __cuGraphUpload)(hGraphExec, hStream) return err {{endif}} {{if 'cuGraphLaunch' in found_functions}} cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphLaunch cuPythonInit() if __cuGraphLaunch == NULL: with gil: raise RuntimeError('Function "cuGraphLaunch" not found') err = ( __cuGraphLaunch)(hGraphExec, hStream) return err {{endif}} {{if 'cuGraphExecDestroy' in found_functions}} cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecDestroy cuPythonInit() if __cuGraphExecDestroy == NULL: with gil: raise RuntimeError('Function "cuGraphExecDestroy" not found') err = ( __cuGraphExecDestroy)(hGraphExec) return err {{endif}} {{if 'cuGraphDestroy' in found_functions}} cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphDestroy cuPythonInit() if __cuGraphDestroy == NULL: with gil: raise RuntimeError('Function "cuGraphDestroy" not found') err = ( __cuGraphDestroy)(hGraph) return err {{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}} cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecUpdate_v2 cuPythonInit() if __cuGraphExecUpdate_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') err = ( __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo) return err {{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}} cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphKernelNodeCopyAttributes cuPythonInit() if __cuGraphKernelNodeCopyAttributes == NULL: with gil: raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') err = ( __cuGraphKernelNodeCopyAttributes)(dst, src) return err {{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}} cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphKernelNodeGetAttribute cuPythonInit() if __cuGraphKernelNodeGetAttribute == NULL: with gil: raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') err = ( __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out) return err {{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}} cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphKernelNodeSetAttribute cuPythonInit() if __cuGraphKernelNodeSetAttribute == NULL: with gil: raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') err = ( __cuGraphKernelNodeSetAttribute)(hNode, attr, value) return err {{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}} cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphDebugDotPrint cuPythonInit() if __cuGraphDebugDotPrint == NULL: with gil: raise RuntimeError('Function "cuGraphDebugDotPrint" not found') err = ( __cuGraphDebugDotPrint)(hGraph, path, flags) return err {{endif}} {{if 'cuUserObjectCreate' in found_functions}} cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuUserObjectCreate cuPythonInit() if __cuUserObjectCreate == NULL: with gil: raise RuntimeError('Function "cuUserObjectCreate" not found') err = ( __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags) return err {{endif}} {{if 'cuUserObjectRetain' in found_functions}} cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuUserObjectRetain cuPythonInit() if __cuUserObjectRetain == NULL: with gil: raise RuntimeError('Function "cuUserObjectRetain" not found') err = ( __cuUserObjectRetain)(object, count) return err {{endif}} {{if 'cuUserObjectRelease' in found_functions}} cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuUserObjectRelease cuPythonInit() if __cuUserObjectRelease == NULL: with gil: raise RuntimeError('Function "cuUserObjectRelease" not found') err = ( __cuUserObjectRelease)(object, count) return err {{endif}} {{if 'cuGraphRetainUserObject' in found_functions}} cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphRetainUserObject cuPythonInit() if __cuGraphRetainUserObject == NULL: with gil: raise RuntimeError('Function "cuGraphRetainUserObject" not found') err = ( __cuGraphRetainUserObject)(graph, object, count, flags) return err {{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}} cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphReleaseUserObject cuPythonInit() if __cuGraphReleaseUserObject == NULL: with gil: raise RuntimeError('Function "cuGraphReleaseUserObject" not found') err = ( __cuGraphReleaseUserObject)(graph, object, count) return err {{endif}} {{if 'cuGraphAddNode' in found_functions}} cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddNode cuPythonInit() if __cuGraphAddNode == NULL: with gil: raise RuntimeError('Function "cuGraphAddNode" not found') err = ( __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphAddNode_v2' in found_functions}} cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphAddNode_v2 cuPythonInit() if __cuGraphAddNode_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphAddNode_v2" not found') err = ( __cuGraphAddNode_v2)(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) return err {{endif}} {{if 'cuGraphNodeSetParams' in found_functions}} cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphNodeSetParams cuPythonInit() if __cuGraphNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphNodeSetParams" not found') err = ( __cuGraphNodeSetParams)(hNode, nodeParams) return err {{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}} cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphExecNodeSetParams cuPythonInit() if __cuGraphExecNodeSetParams == NULL: with gil: raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') err = ( __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams) return err {{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}} cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphConditionalHandleCreate cuPythonInit() if __cuGraphConditionalHandleCreate == NULL: with gil: raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') err = ( __cuGraphConditionalHandleCreate)(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) return err {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuOccupancyMaxActiveBlocksPerMultiprocessor cuPythonInit() if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: with gil: raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize) return err {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags cuPythonInit() if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: with gil: raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags) return err {{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}} cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuOccupancyMaxPotentialBlockSize cuPythonInit() if __cuOccupancyMaxPotentialBlockSize == NULL: with gil: raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') err = ( __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) return err {{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}} cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuOccupancyMaxPotentialBlockSizeWithFlags cuPythonInit() if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: with gil: raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') err = ( __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) return err {{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}} cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuOccupancyAvailableDynamicSMemPerBlock cuPythonInit() if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: with gil: raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') err = ( __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize) return err {{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}} cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuOccupancyMaxPotentialClusterSize cuPythonInit() if __cuOccupancyMaxPotentialClusterSize == NULL: with gil: raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') err = ( __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config) return err {{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}} cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuOccupancyMaxActiveClusters cuPythonInit() if __cuOccupancyMaxActiveClusters == NULL: with gil: raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') err = ( __cuOccupancyMaxActiveClusters)(numClusters, func, config) return err {{endif}} {{if 'cuTexRefSetArray' in found_functions}} cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetArray cuPythonInit() if __cuTexRefSetArray == NULL: with gil: raise RuntimeError('Function "cuTexRefSetArray" not found') err = ( __cuTexRefSetArray)(hTexRef, hArray, Flags) return err {{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}} cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetMipmappedArray cuPythonInit() if __cuTexRefSetMipmappedArray == NULL: with gil: raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') err = ( __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags) return err {{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}} cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetAddress_v2 cuPythonInit() if __cuTexRefSetAddress_v2 == NULL: with gil: raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') err = ( __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes) return err {{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}} cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetAddress2D_v3 cuPythonInit() if __cuTexRefSetAddress2D_v3 == NULL: with gil: raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') err = ( __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch) return err {{endif}} {{if 'cuTexRefSetFormat' in found_functions}} cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetFormat cuPythonInit() if __cuTexRefSetFormat == NULL: with gil: raise RuntimeError('Function "cuTexRefSetFormat" not found') err = ( __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents) return err {{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}} cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetAddressMode cuPythonInit() if __cuTexRefSetAddressMode == NULL: with gil: raise RuntimeError('Function "cuTexRefSetAddressMode" not found') err = ( __cuTexRefSetAddressMode)(hTexRef, dim, am) return err {{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}} cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetFilterMode cuPythonInit() if __cuTexRefSetFilterMode == NULL: with gil: raise RuntimeError('Function "cuTexRefSetFilterMode" not found') err = ( __cuTexRefSetFilterMode)(hTexRef, fm) return err {{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}} cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetMipmapFilterMode cuPythonInit() if __cuTexRefSetMipmapFilterMode == NULL: with gil: raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') err = ( __cuTexRefSetMipmapFilterMode)(hTexRef, fm) return err {{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}} cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetMipmapLevelBias cuPythonInit() if __cuTexRefSetMipmapLevelBias == NULL: with gil: raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') err = ( __cuTexRefSetMipmapLevelBias)(hTexRef, bias) return err {{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}} cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetMipmapLevelClamp cuPythonInit() if __cuTexRefSetMipmapLevelClamp == NULL: with gil: raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') err = ( __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) return err {{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}} cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetMaxAnisotropy cuPythonInit() if __cuTexRefSetMaxAnisotropy == NULL: with gil: raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') err = ( __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso) return err {{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}} cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetBorderColor cuPythonInit() if __cuTexRefSetBorderColor == NULL: with gil: raise RuntimeError('Function "cuTexRefSetBorderColor" not found') err = ( __cuTexRefSetBorderColor)(hTexRef, pBorderColor) return err {{endif}} {{if 'cuTexRefSetFlags' in found_functions}} cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefSetFlags cuPythonInit() if __cuTexRefSetFlags == NULL: with gil: raise RuntimeError('Function "cuTexRefSetFlags" not found') err = ( __cuTexRefSetFlags)(hTexRef, Flags) return err {{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}} cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetAddress_v2 cuPythonInit() if __cuTexRefGetAddress_v2 == NULL: with gil: raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') err = ( __cuTexRefGetAddress_v2)(pdptr, hTexRef) return err {{endif}} {{if 'cuTexRefGetArray' in found_functions}} cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetArray cuPythonInit() if __cuTexRefGetArray == NULL: with gil: raise RuntimeError('Function "cuTexRefGetArray" not found') err = ( __cuTexRefGetArray)(phArray, hTexRef) return err {{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}} cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetMipmappedArray cuPythonInit() if __cuTexRefGetMipmappedArray == NULL: with gil: raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') err = ( __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef) return err {{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}} cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetAddressMode cuPythonInit() if __cuTexRefGetAddressMode == NULL: with gil: raise RuntimeError('Function "cuTexRefGetAddressMode" not found') err = ( __cuTexRefGetAddressMode)(pam, hTexRef, dim) return err {{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}} cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetFilterMode cuPythonInit() if __cuTexRefGetFilterMode == NULL: with gil: raise RuntimeError('Function "cuTexRefGetFilterMode" not found') err = ( __cuTexRefGetFilterMode)(pfm, hTexRef) return err {{endif}} {{if 'cuTexRefGetFormat' in found_functions}} cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetFormat cuPythonInit() if __cuTexRefGetFormat == NULL: with gil: raise RuntimeError('Function "cuTexRefGetFormat" not found') err = ( __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef) return err {{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}} cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetMipmapFilterMode cuPythonInit() if __cuTexRefGetMipmapFilterMode == NULL: with gil: raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') err = ( __cuTexRefGetMipmapFilterMode)(pfm, hTexRef) return err {{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}} cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetMipmapLevelBias cuPythonInit() if __cuTexRefGetMipmapLevelBias == NULL: with gil: raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') err = ( __cuTexRefGetMipmapLevelBias)(pbias, hTexRef) return err {{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}} cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetMipmapLevelClamp cuPythonInit() if __cuTexRefGetMipmapLevelClamp == NULL: with gil: raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') err = ( __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) return err {{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}} cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetMaxAnisotropy cuPythonInit() if __cuTexRefGetMaxAnisotropy == NULL: with gil: raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') err = ( __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef) return err {{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}} cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetBorderColor cuPythonInit() if __cuTexRefGetBorderColor == NULL: with gil: raise RuntimeError('Function "cuTexRefGetBorderColor" not found') err = ( __cuTexRefGetBorderColor)(pBorderColor, hTexRef) return err {{endif}} {{if 'cuTexRefGetFlags' in found_functions}} cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefGetFlags cuPythonInit() if __cuTexRefGetFlags == NULL: with gil: raise RuntimeError('Function "cuTexRefGetFlags" not found') err = ( __cuTexRefGetFlags)(pFlags, hTexRef) return err {{endif}} {{if 'cuTexRefCreate' in found_functions}} cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefCreate cuPythonInit() if __cuTexRefCreate == NULL: with gil: raise RuntimeError('Function "cuTexRefCreate" not found') err = ( __cuTexRefCreate)(pTexRef) return err {{endif}} {{if 'cuTexRefDestroy' in found_functions}} cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexRefDestroy cuPythonInit() if __cuTexRefDestroy == NULL: with gil: raise RuntimeError('Function "cuTexRefDestroy" not found') err = ( __cuTexRefDestroy)(hTexRef) return err {{endif}} {{if 'cuSurfRefSetArray' in found_functions}} cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuSurfRefSetArray cuPythonInit() if __cuSurfRefSetArray == NULL: with gil: raise RuntimeError('Function "cuSurfRefSetArray" not found') err = ( __cuSurfRefSetArray)(hSurfRef, hArray, Flags) return err {{endif}} {{if 'cuSurfRefGetArray' in found_functions}} cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuSurfRefGetArray cuPythonInit() if __cuSurfRefGetArray == NULL: with gil: raise RuntimeError('Function "cuSurfRefGetArray" not found') err = ( __cuSurfRefGetArray)(phArray, hSurfRef) return err {{endif}} {{if 'cuTexObjectCreate' in found_functions}} cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexObjectCreate cuPythonInit() if __cuTexObjectCreate == NULL: with gil: raise RuntimeError('Function "cuTexObjectCreate" not found') err = ( __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc) return err {{endif}} {{if 'cuTexObjectDestroy' in found_functions}} cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexObjectDestroy cuPythonInit() if __cuTexObjectDestroy == NULL: with gil: raise RuntimeError('Function "cuTexObjectDestroy" not found') err = ( __cuTexObjectDestroy)(texObject) return err {{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}} cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexObjectGetResourceDesc cuPythonInit() if __cuTexObjectGetResourceDesc == NULL: with gil: raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') err = ( __cuTexObjectGetResourceDesc)(pResDesc, texObject) return err {{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}} cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexObjectGetTextureDesc cuPythonInit() if __cuTexObjectGetTextureDesc == NULL: with gil: raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') err = ( __cuTexObjectGetTextureDesc)(pTexDesc, texObject) return err {{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}} cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTexObjectGetResourceViewDesc cuPythonInit() if __cuTexObjectGetResourceViewDesc == NULL: with gil: raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') err = ( __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject) return err {{endif}} {{if 'cuSurfObjectCreate' in found_functions}} cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuSurfObjectCreate cuPythonInit() if __cuSurfObjectCreate == NULL: with gil: raise RuntimeError('Function "cuSurfObjectCreate" not found') err = ( __cuSurfObjectCreate)(pSurfObject, pResDesc) return err {{endif}} {{if 'cuSurfObjectDestroy' in found_functions}} cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuSurfObjectDestroy cuPythonInit() if __cuSurfObjectDestroy == NULL: with gil: raise RuntimeError('Function "cuSurfObjectDestroy" not found') err = ( __cuSurfObjectDestroy)(surfObject) return err {{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}} cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuSurfObjectGetResourceDesc cuPythonInit() if __cuSurfObjectGetResourceDesc == NULL: with gil: raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') err = ( __cuSurfObjectGetResourceDesc)(pResDesc, surfObject) return err {{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}} cdef CUresult _cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const cuuint32_t* boxDim, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTensorMapEncodeTiled cuPythonInit() if __cuTensorMapEncodeTiled == NULL: with gil: raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') err = ( __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) return err {{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}} cdef CUresult _cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTensorMapEncodeIm2col cuPythonInit() if __cuTensorMapEncodeIm2col == NULL: with gil: raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') err = ( __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) return err {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuTensorMapReplaceAddress cuPythonInit() if __cuTensorMapReplaceAddress == NULL: with gil: raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') err = ( __cuTensorMapReplaceAddress)(tensorMap, globalAddress) return err {{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}} cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceCanAccessPeer cuPythonInit() if __cuDeviceCanAccessPeer == NULL: with gil: raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') err = ( __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev) return err {{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}} cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxEnablePeerAccess cuPythonInit() if __cuCtxEnablePeerAccess == NULL: with gil: raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') err = ( __cuCtxEnablePeerAccess)(peerContext, Flags) return err {{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}} cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxDisablePeerAccess cuPythonInit() if __cuCtxDisablePeerAccess == NULL: with gil: raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') err = ( __cuCtxDisablePeerAccess)(peerContext) return err {{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}} cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetP2PAttribute cuPythonInit() if __cuDeviceGetP2PAttribute == NULL: with gil: raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') err = ( __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice) return err {{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}} cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsUnregisterResource cuPythonInit() if __cuGraphicsUnregisterResource == NULL: with gil: raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') err = ( __cuGraphicsUnregisterResource)(resource) return err {{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}} cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsSubResourceGetMappedArray cuPythonInit() if __cuGraphicsSubResourceGetMappedArray == NULL: with gil: raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') err = ( __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel) return err {{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}} cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsResourceGetMappedMipmappedArray cuPythonInit() if __cuGraphicsResourceGetMappedMipmappedArray == NULL: with gil: raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') err = ( __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource) return err {{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}} cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsResourceGetMappedPointer_v2 cuPythonInit() if __cuGraphicsResourceGetMappedPointer_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') err = ( __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource) return err {{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}} cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsResourceSetMapFlags_v2 cuPythonInit() if __cuGraphicsResourceSetMapFlags_v2 == NULL: with gil: raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') err = ( __cuGraphicsResourceSetMapFlags_v2)(resource, flags) return err {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsMapResources cuPythonInit() if __cuGraphicsMapResources == NULL: with gil: raise RuntimeError('Function "cuGraphicsMapResources" not found') err = ( __cuGraphicsMapResources)(count, resources, hStream) return err {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsUnmapResources cuPythonInit() if __cuGraphicsUnmapResources == NULL: with gil: raise RuntimeError('Function "cuGraphicsUnmapResources" not found') err = ( __cuGraphicsUnmapResources)(count, resources, hStream) return err {{endif}} {{if 'cuGetProcAddress_v2' in found_functions}} cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGetProcAddress_v2 cuPythonInit() if __cuGetProcAddress_v2 == NULL: with gil: raise RuntimeError('Function "cuGetProcAddress_v2" not found') err = ( __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus) return err {{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}} cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCoredumpGetAttribute cuPythonInit() if __cuCoredumpGetAttribute == NULL: with gil: raise RuntimeError('Function "cuCoredumpGetAttribute" not found') err = ( __cuCoredumpGetAttribute)(attrib, value, size) return err {{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}} cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCoredumpGetAttributeGlobal cuPythonInit() if __cuCoredumpGetAttributeGlobal == NULL: with gil: raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') err = ( __cuCoredumpGetAttributeGlobal)(attrib, value, size) return err {{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}} cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCoredumpSetAttribute cuPythonInit() if __cuCoredumpSetAttribute == NULL: with gil: raise RuntimeError('Function "cuCoredumpSetAttribute" not found') err = ( __cuCoredumpSetAttribute)(attrib, value, size) return err {{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}} cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCoredumpSetAttributeGlobal cuPythonInit() if __cuCoredumpSetAttributeGlobal == NULL: with gil: raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') err = ( __cuCoredumpSetAttributeGlobal)(attrib, value, size) return err {{endif}} {{if 'cuGetExportTable' in found_functions}} cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGetExportTable cuPythonInit() if __cuGetExportTable == NULL: with gil: raise RuntimeError('Function "cuGetExportTable" not found') err = ( __cuGetExportTable)(ppExportTable, pExportTableId) return err {{endif}} {{if 'cuGreenCtxCreate' in found_functions}} cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGreenCtxCreate cuPythonInit() if __cuGreenCtxCreate == NULL: with gil: raise RuntimeError('Function "cuGreenCtxCreate" not found') err = ( __cuGreenCtxCreate)(phCtx, desc, dev, flags) return err {{endif}} {{if 'cuGreenCtxDestroy' in found_functions}} cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGreenCtxDestroy cuPythonInit() if __cuGreenCtxDestroy == NULL: with gil: raise RuntimeError('Function "cuGreenCtxDestroy" not found') err = ( __cuGreenCtxDestroy)(hCtx) return err {{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}} cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxFromGreenCtx cuPythonInit() if __cuCtxFromGreenCtx == NULL: with gil: raise RuntimeError('Function "cuCtxFromGreenCtx" not found') err = ( __cuCtxFromGreenCtx)(pContext, hCtx) return err {{endif}} {{if 'cuDeviceGetDevResource' in found_functions}} cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDeviceGetDevResource cuPythonInit() if __cuDeviceGetDevResource == NULL: with gil: raise RuntimeError('Function "cuDeviceGetDevResource" not found') err = ( __cuDeviceGetDevResource)(device, resource, typename) return err {{endif}} {{if 'cuCtxGetDevResource' in found_functions}} cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxGetDevResource cuPythonInit() if __cuCtxGetDevResource == NULL: with gil: raise RuntimeError('Function "cuCtxGetDevResource" not found') err = ( __cuCtxGetDevResource)(hCtx, resource, typename) return err {{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}} cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGreenCtxGetDevResource cuPythonInit() if __cuGreenCtxGetDevResource == NULL: with gil: raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') err = ( __cuGreenCtxGetDevResource)(hCtx, resource, typename) return err {{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}} cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDevSmResourceSplitByCount cuPythonInit() if __cuDevSmResourceSplitByCount == NULL: with gil: raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') err = ( __cuDevSmResourceSplitByCount)(result, nbGroups, input, remaining, useFlags, minCount) return err {{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}} cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuDevResourceGenerateDesc cuPythonInit() if __cuDevResourceGenerateDesc == NULL: with gil: raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') err = ( __cuDevResourceGenerateDesc)(phDesc, resources, nbResources) return err {{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}} cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGreenCtxRecordEvent cuPythonInit() if __cuGreenCtxRecordEvent == NULL: with gil: raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') err = ( __cuGreenCtxRecordEvent)(hCtx, hEvent) return err {{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}} cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGreenCtxWaitEvent cuPythonInit() if __cuGreenCtxWaitEvent == NULL: with gil: raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') err = ( __cuGreenCtxWaitEvent)(hCtx, hEvent) return err {{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}} cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetGreenCtx cuPythonInit() if __cuStreamGetGreenCtx == NULL: with gil: raise RuntimeError('Function "cuStreamGetGreenCtx" not found') err = ( __cuStreamGetGreenCtx)(hStream, phCtx) return err {{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}} cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGreenCtxStreamCreate cuPythonInit() if __cuGreenCtxStreamCreate == NULL: with gil: raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') err = ( __cuGreenCtxStreamCreate)(phStream, greenCtx, flags, priority) return err {{endif}} {{if 'cuProfilerStart' in found_functions}} cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: global __cuProfilerStart cuPythonInit() if __cuProfilerStart == NULL: with gil: raise RuntimeError('Function "cuProfilerStart" not found') err = ( __cuProfilerStart)() return err {{endif}} {{if 'cuProfilerStop' in found_functions}} cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: global __cuProfilerStop cuPythonInit() if __cuProfilerStop == NULL: with gil: raise RuntimeError('Function "cuProfilerStop" not found') err = ( __cuProfilerStop)() return err {{endif}} {{if True}} cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsEGLRegisterImage cuPythonInit() if __cuGraphicsEGLRegisterImage == NULL: with gil: raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') err = ( __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamConsumerConnect cuPythonInit() if __cuEGLStreamConsumerConnect == NULL: with gil: raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') err = ( __cuEGLStreamConsumerConnect)(conn, stream) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamConsumerConnectWithFlags cuPythonInit() if __cuEGLStreamConsumerConnectWithFlags == NULL: with gil: raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') err = ( __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamConsumerDisconnect cuPythonInit() if __cuEGLStreamConsumerDisconnect == NULL: with gil: raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') err = ( __cuEGLStreamConsumerDisconnect)(conn) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamConsumerAcquireFrame cuPythonInit() if __cuEGLStreamConsumerAcquireFrame == NULL: with gil: raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') err = ( __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamConsumerReleaseFrame cuPythonInit() if __cuEGLStreamConsumerReleaseFrame == NULL: with gil: raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') err = ( __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamProducerConnect cuPythonInit() if __cuEGLStreamProducerConnect == NULL: with gil: raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') err = ( __cuEGLStreamProducerConnect)(conn, stream, width, height) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamProducerDisconnect cuPythonInit() if __cuEGLStreamProducerDisconnect == NULL: with gil: raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') err = ( __cuEGLStreamProducerDisconnect)(conn) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamProducerPresentFrame cuPythonInit() if __cuEGLStreamProducerPresentFrame == NULL: with gil: raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') err = ( __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream) return err {{endif}} {{if True}} cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEGLStreamProducerReturnFrame cuPythonInit() if __cuEGLStreamProducerReturnFrame == NULL: with gil: raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') err = ( __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream) return err {{endif}} {{if True}} cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsResourceGetMappedEglFrame cuPythonInit() if __cuGraphicsResourceGetMappedEglFrame == NULL: with gil: raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') err = ( __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel) return err {{endif}} {{if True}} cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuEventCreateFromEGLSync cuPythonInit() if __cuEventCreateFromEGLSync == NULL: with gil: raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') err = ( __cuEventCreateFromEGLSync)(phEvent, eglSync, flags) return err {{endif}} {{if True}} cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsGLRegisterBuffer cuPythonInit() if __cuGraphicsGLRegisterBuffer == NULL: with gil: raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') err = ( __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags) return err {{endif}} {{if True}} cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsGLRegisterImage cuPythonInit() if __cuGraphicsGLRegisterImage == NULL: with gil: raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') err = ( __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags) return err {{endif}} {{if True}} cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGLGetDevices_v2 cuPythonInit() if __cuGLGetDevices_v2 == NULL: with gil: raise RuntimeError('Function "cuGLGetDevices_v2" not found') err = ( __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) return err {{endif}} {{if True}} cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuVDPAUGetDevice cuPythonInit() if __cuVDPAUGetDevice == NULL: with gil: raise RuntimeError('Function "cuVDPAUGetDevice" not found') err = ( __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress) return err {{endif}} {{if True}} cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuVDPAUCtxCreate_v2 cuPythonInit() if __cuVDPAUCtxCreate_v2 == NULL: with gil: raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') err = ( __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress) return err {{endif}} {{if True}} cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsVDPAURegisterVideoSurface cuPythonInit() if __cuGraphicsVDPAURegisterVideoSurface == NULL: with gil: raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') err = ( __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags) return err {{endif}} {{if True}} cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuGraphicsVDPAURegisterOutputSurface cuPythonInit() if __cuGraphicsVDPAURegisterOutputSurface == NULL: with gil: raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') err = ( __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags) return err {{endif}}