# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

# This code was automatically generated with version 12.9.0, generator version 49a8141. Do not modify it directly.

from libc.stdint cimport uint32_t, uint64_t

include "cyruntime_types.pxi"

ctypedef unsigned int GLenum

ctypedef unsigned int GLuint

cdef extern from "":
    cdef struct void:
        pass
ctypedef void* EGLImageKHR

cdef extern from "":
    cdef struct void:
        pass
ctypedef void* EGLStreamKHR

ctypedef unsigned int EGLint

cdef extern from "":
    cdef struct void:
        pass
ctypedef void* EGLSyncKHR

ctypedef uint32_t VdpDevice

ctypedef unsigned long long VdpGetProcAddress

ctypedef uint32_t VdpVideoSurface

ctypedef uint32_t VdpOutputSurface

cdef enum cudaEglFrameType_enum:
    cudaEglFrameTypeArray = 0
    cudaEglFrameTypePitch = 1

ctypedef cudaEglFrameType_enum cudaEglFrameType

cdef enum cudaEglResourceLocationFlags_enum:
    cudaEglResourceLocationSysmem = 0
    cudaEglResourceLocationVidmem = 1

ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags

cdef enum cudaEglColorFormat_enum:
    cudaEglColorFormatYUV420Planar = 0
    cudaEglColorFormatYUV420SemiPlanar = 1
    cudaEglColorFormatYUV422Planar = 2
    cudaEglColorFormatYUV422SemiPlanar = 3
    cudaEglColorFormatARGB = 6
    cudaEglColorFormatRGBA = 7
    cudaEglColorFormatL = 8
    cudaEglColorFormatR = 9
    cudaEglColorFormatYUV444Planar = 10
    cudaEglColorFormatYUV444SemiPlanar = 11
    cudaEglColorFormatYUYV422 = 12
    cudaEglColorFormatUYVY422 = 13
    cudaEglColorFormatABGR = 14
    cudaEglColorFormatBGRA = 15
    cudaEglColorFormatA = 16
    cudaEglColorFormatRG = 17
    cudaEglColorFormatAYUV = 18
    cudaEglColorFormatYVU444SemiPlanar = 19
    cudaEglColorFormatYVU422SemiPlanar = 20
    cudaEglColorFormatYVU420SemiPlanar = 21
    cudaEglColorFormatY10V10U10_444SemiPlanar = 22
    cudaEglColorFormatY10V10U10_420SemiPlanar = 23
    cudaEglColorFormatY12V12U12_444SemiPlanar = 24
    cudaEglColorFormatY12V12U12_420SemiPlanar = 25
    cudaEglColorFormatVYUY_ER = 26
    cudaEglColorFormatUYVY_ER = 27
    cudaEglColorFormatYUYV_ER = 28
    cudaEglColorFormatYVYU_ER = 29
    cudaEglColorFormatYUVA_ER = 31
    cudaEglColorFormatAYUV_ER = 32
    cudaEglColorFormatYUV444Planar_ER = 33
    cudaEglColorFormatYUV422Planar_ER = 34
    cudaEglColorFormatYUV420Planar_ER = 35
    cudaEglColorFormatYUV444SemiPlanar_ER = 36
    cudaEglColorFormatYUV422SemiPlanar_ER = 37
    cudaEglColorFormatYUV420SemiPlanar_ER = 38
    cudaEglColorFormatYVU444Planar_ER = 39
    cudaEglColorFormatYVU422Planar_ER = 40
    cudaEglColorFormatYVU420Planar_ER = 41
    cudaEglColorFormatYVU444SemiPlanar_ER = 42
    cudaEglColorFormatYVU422SemiPlanar_ER = 43
    cudaEglColorFormatYVU420SemiPlanar_ER = 44
    cudaEglColorFormatBayerRGGB = 45
    cudaEglColorFormatBayerBGGR = 46
    cudaEglColorFormatBayerGRBG = 47
    cudaEglColorFormatBayerGBRG = 48
    cudaEglColorFormatBayer10RGGB = 49
    cudaEglColorFormatBayer10BGGR = 50
    cudaEglColorFormatBayer10GRBG = 51
    cudaEglColorFormatBayer10GBRG = 52
    cudaEglColorFormatBayer12RGGB = 53
    cudaEglColorFormatBayer12BGGR = 54
    cudaEglColorFormatBayer12GRBG = 55
    cudaEglColorFormatBayer12GBRG = 56
    cudaEglColorFormatBayer14RGGB = 57
    cudaEglColorFormatBayer14BGGR = 58
    cudaEglColorFormatBayer14GRBG = 59
    cudaEglColorFormatBayer14GBRG = 60
    cudaEglColorFormatBayer20RGGB = 61
    cudaEglColorFormatBayer20BGGR = 62
    cudaEglColorFormatBayer20GRBG = 63
    cudaEglColorFormatBayer20GBRG = 64
    cudaEglColorFormatYVU444Planar = 65
    cudaEglColorFormatYVU422Planar = 66
    cudaEglColorFormatYVU420Planar = 67
    cudaEglColorFormatBayerIspRGGB = 68
    cudaEglColorFormatBayerIspBGGR = 69
    cudaEglColorFormatBayerIspGRBG = 70
    cudaEglColorFormatBayerIspGBRG = 71
    cudaEglColorFormatBayerBCCR = 72
    cudaEglColorFormatBayerRCCB = 73
    cudaEglColorFormatBayerCRBC = 74
    cudaEglColorFormatBayerCBRC = 75
    cudaEglColorFormatBayer10CCCC = 76
    cudaEglColorFormatBayer12BCCR = 77
    cudaEglColorFormatBayer12RCCB = 78
    cudaEglColorFormatBayer12CRBC = 79
    cudaEglColorFormatBayer12CBRC = 80
    cudaEglColorFormatBayer12CCCC = 81
    cudaEglColorFormatY = 82
    cudaEglColorFormatYUV420SemiPlanar_2020 = 83
    cudaEglColorFormatYVU420SemiPlanar_2020 = 84
    cudaEglColorFormatYUV420Planar_2020 = 85
    cudaEglColorFormatYVU420Planar_2020 = 86
    cudaEglColorFormatYUV420SemiPlanar_709 = 87
    cudaEglColorFormatYVU420SemiPlanar_709 = 88
    cudaEglColorFormatYUV420Planar_709 = 89
    cudaEglColorFormatYVU420Planar_709 = 90
    cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91
    cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92
    cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93
    cudaEglColorFormatY10V10U10_422SemiPlanar = 94
    cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95
    cudaEglColorFormatY_ER = 96
    cudaEglColorFormatY_709_ER = 97
    cudaEglColorFormatY10_ER = 98
    cudaEglColorFormatY10_709_ER = 99
    cudaEglColorFormatY12_ER = 100
    cudaEglColorFormatY12_709_ER = 101
    cudaEglColorFormatYUVA = 102
    cudaEglColorFormatYVYU = 104
    cudaEglColorFormatVYUY = 105
    cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 106
    cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 107
    cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 108
    cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 109
    cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 110
    cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 111
    cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 112
    cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 113
    cudaEglColorFormatUYVY709 = 114
    cudaEglColorFormatUYVY709_ER = 115
    cudaEglColorFormatUYVY2020 = 116

ctypedef cudaEglColorFormat_enum cudaEglColorFormat

cdef struct cudaEglPlaneDesc_st:
    unsigned int width
    unsigned int height
    unsigned int depth
    unsigned int pitch
    unsigned int numChannels
    cudaChannelFormatDesc channelDesc
    unsigned int reserved[4]

ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc

cdef union anon_union11:
    cudaArray_t pArray[3]
    cudaPitchedPtr pPitch[3]

cdef struct cudaEglFrame_st:
    anon_union11 frame
    cudaEglPlaneDesc planeDesc[3]
    unsigned int planeCount
    cudaEglFrameType frameType
    cudaEglColorFormat eglColorFormat

ctypedef cudaEglFrame_st cudaEglFrame

cdef extern from "":
    cdef struct CUeglStreamConnection_st:
        pass
ctypedef CUeglStreamConnection_st* cudaEglStreamConnection

cdef enum cudaGLDeviceList:
    cudaGLDeviceListAll = 1
    cudaGLDeviceListCurrentFrame = 2
    cudaGLDeviceListNextFrame = 3

cdef enum cudaGLMapFlags:
    cudaGLMapFlagsNone = 0
    cudaGLMapFlagsReadOnly = 1
    cudaGLMapFlagsWriteDiscard = 2

{{if 'cudaDeviceReset' in found_functions}}

cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceSynchronize' in found_functions}}

cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceSetLimit' in found_functions}}

cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetLimit' in found_functions}}

cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetTexture1DLinearMaxWidth' in found_functions}}

cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetCacheConfig' in found_functions}}

cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetStreamPriorityRange' in found_functions}}

cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceSetCacheConfig' in found_functions}}

cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetByPCIBusId' in found_functions}}

cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetPCIBusId' in found_functions}}

cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaIpcGetEventHandle' in found_functions}}

cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaIpcOpenEventHandle' in found_functions}}

cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaIpcGetMemHandle' in found_functions}}

cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaIpcOpenMemHandle' in found_functions}}

cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaIpcCloseMemHandle' in found_functions}}

cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceFlushGPUDirectRDMAWrites' in found_functions}}

cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceRegisterAsyncNotification' in found_functions}}

cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceUnregisterAsyncNotification' in found_functions}}

cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetSharedMemConfig' in found_functions}}

cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceSetSharedMemConfig' in found_functions}}

cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetLastError' in found_functions}}

cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaPeekAtLastError' in found_functions}}

cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetErrorName' in found_functions}}

cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil
{{endif}}

{{if 'cudaGetErrorString' in found_functions}}

cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil
{{endif}}

{{if 'cudaGetDeviceCount' in found_functions}}

cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetDeviceProperties_v2' in found_functions}}

cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetAttribute' in found_functions}}

cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetDefaultMemPool' in found_functions}}

cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceSetMemPool' in found_functions}}

cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetMemPool' in found_functions}}

cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetNvSciSyncAttributes' in found_functions}}

cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetP2PAttribute' in found_functions}}

cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaChooseDevice' in found_functions}}

cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaInitDevice' in found_functions}}

cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaSetDevice' in found_functions}}

cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetDevice' in found_functions}}

cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaSetDeviceFlags' in found_functions}}

cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetDeviceFlags' in found_functions}}

cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamCreate' in found_functions}}

cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamCreateWithFlags' in found_functions}}

cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamCreateWithPriority' in found_functions}}

cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamGetPriority' in found_functions}}

cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamGetFlags' in found_functions}}

cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamGetId' in found_functions}}

cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamGetDevice' in found_functions}}

cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaCtxResetPersistingL2Cache' in found_functions}}

cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamCopyAttributes' in found_functions}}

cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamGetAttribute' in found_functions}}

cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamSetAttribute' in found_functions}}

cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamDestroy' in found_functions}}

cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamWaitEvent' in found_functions}}

cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamAddCallback' in found_functions}}

cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamSynchronize' in found_functions}}

cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamQuery' in found_functions}}

cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamAttachMemAsync' in found_functions}}

cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamBeginCapture' in found_functions}}

cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamBeginCaptureToGraph' in found_functions}}

cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaThreadExchangeStreamCaptureMode' in found_functions}}

cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamEndCapture' in found_functions}}

cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamIsCapturing' in found_functions}}

cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamGetCaptureInfo_v2' in found_functions}}

cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamGetCaptureInfo_v3' in found_functions}}

cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, const cudaGraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamUpdateCaptureDependencies' in found_functions}}

cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaStreamUpdateCaptureDependencies_v2' in found_functions}}

cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventCreate' in found_functions}}

cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventCreateWithFlags' in found_functions}}

cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventRecord' in found_functions}}

cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventRecordWithFlags' in found_functions}}

cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventQuery' in found_functions}}

cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventSynchronize' in found_functions}}

cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventDestroy' in found_functions}}

cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventElapsedTime' in found_functions}}

cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaEventElapsedTime_v2' in found_functions}}

cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaImportExternalMemory' in found_functions}}

cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaExternalMemoryGetMappedBuffer' in found_functions}}

cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaExternalMemoryGetMappedMipmappedArray' in found_functions}}

cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDestroyExternalMemory' in found_functions}}

cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaImportExternalSemaphore' in found_functions}}

cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaSignalExternalSemaphoresAsync_v2' in found_functions}}

cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaWaitExternalSemaphoresAsync_v2' in found_functions}}

cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDestroyExternalSemaphore' in found_functions}}

cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFuncSetCacheConfig' in found_functions}}

cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFuncGetAttributes' in found_functions}}

cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFuncSetAttribute' in found_functions}}

cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLaunchHostFunc' in found_functions}}

cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFuncSetSharedMemConfig' in found_functions}}

cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}}

cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaOccupancyAvailableDynamicSMemPerBlock' in found_functions}}

cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}}

cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMallocManaged' in found_functions}}

cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMalloc' in found_functions}}

cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMallocHost' in found_functions}}

cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMallocPitch' in found_functions}}

cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMallocArray' in found_functions}}

cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFree' in found_functions}}

cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFreeHost' in found_functions}}

cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFreeArray' in found_functions}}

cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFreeMipmappedArray' in found_functions}}

cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaHostAlloc' in found_functions}}

cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaHostRegister' in found_functions}}

cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaHostUnregister' in found_functions}}

cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaHostGetDevicePointer' in found_functions}}

cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaHostGetFlags' in found_functions}}

cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMalloc3D' in found_functions}}

cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMalloc3DArray' in found_functions}}

cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMallocMipmappedArray' in found_functions}}

cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetMipmappedArrayLevel' in found_functions}}

cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy3D' in found_functions}}

cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy3DPeer' in found_functions}}

cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy3DAsync' in found_functions}}

cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy3DPeerAsync' in found_functions}}

cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemGetInfo' in found_functions}}

cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaArrayGetInfo' in found_functions}}

cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaArrayGetPlane' in found_functions}}

cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaArrayGetMemoryRequirements' in found_functions}}

cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMipmappedArrayGetMemoryRequirements' in found_functions}}

cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaArrayGetSparseProperties' in found_functions}}

cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMipmappedArrayGetSparseProperties' in found_functions}}

cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy' in found_functions}}

cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyPeer' in found_functions}}

cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy2D' in found_functions}}

cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy2DToArray' in found_functions}}

cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy2DFromArray' in found_functions}}

cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy2DArrayToArray' in found_functions}}

cdef cudaError_t cudaMemcpy2DArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyAsync' in found_functions}}

cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyPeerAsync' in found_functions}}

cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyBatchAsync' in found_functions}}

cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy3DBatchAsync' in found_functions}}

cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy2DAsync' in found_functions}}

cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy2DToArrayAsync' in found_functions}}

cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpy2DFromArrayAsync' in found_functions}}

cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemset' in found_functions}}

cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemset2D' in found_functions}}

cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemset3D' in found_functions}}

cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemsetAsync' in found_functions}}

cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemset2DAsync' in found_functions}}

cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemset3DAsync' in found_functions}}

cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPrefetchAsync' in found_functions}}

cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPrefetchAsync_v2' in found_functions}}

cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemAdvise' in found_functions}}

cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemAdvise_v2' in found_functions}}

cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemRangeGetAttribute' in found_functions}}

cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemRangeGetAttributes' in found_functions}}

cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyToArray' in found_functions}}

cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyFromArray' in found_functions}}

cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyArrayToArray' in found_functions}}

cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyToArrayAsync' in found_functions}}

cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemcpyFromArrayAsync' in found_functions}}

cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMallocAsync' in found_functions}}

cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaFreeAsync' in found_functions}}

cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolTrimTo' in found_functions}}

cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolSetAttribute' in found_functions}}

cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolGetAttribute' in found_functions}}

cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolSetAccess' in found_functions}}

cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolGetAccess' in found_functions}}

cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolCreate' in found_functions}}

cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolDestroy' in found_functions}}

cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMallocFromPoolAsync' in found_functions}}

cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolExportToShareableHandle' in found_functions}}

cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolImportFromShareableHandle' in found_functions}}

cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolExportPointer' in found_functions}}

cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaMemPoolImportPointer' in found_functions}}

cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaPointerGetAttributes' in found_functions}}

cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceCanAccessPeer' in found_functions}}

cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceEnablePeerAccess' in found_functions}}

cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceDisablePeerAccess' in found_functions}}

cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphicsUnregisterResource' in found_functions}}

cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphicsResourceSetMapFlags' in found_functions}}

cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphicsMapResources' in found_functions}}

cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphicsUnmapResources' in found_functions}}

cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphicsResourceGetMappedPointer' in found_functions}}

cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphicsSubResourceGetMappedArray' in found_functions}}

cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphicsResourceGetMappedMipmappedArray' in found_functions}}

cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetChannelDesc' in found_functions}}

cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaCreateChannelDesc' in found_functions}}

cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil
{{endif}}

{{if 'cudaCreateTextureObject' in found_functions}}

cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDestroyTextureObject' in found_functions}}

cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetTextureObjectResourceDesc' in found_functions}}

cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetTextureObjectTextureDesc' in found_functions}}

cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetTextureObjectResourceViewDesc' in found_functions}}

cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaCreateSurfaceObject' in found_functions}}

cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDestroySurfaceObject' in found_functions}}

cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetSurfaceObjectResourceDesc' in found_functions}}

cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDriverGetVersion' in found_functions}}

cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaRuntimeGetVersion' in found_functions}}

cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphCreate' in found_functions}}

cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddKernelNode' in found_functions}}

cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphKernelNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphKernelNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphKernelNodeCopyAttributes' in found_functions}}

cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphKernelNodeGetAttribute' in found_functions}}

cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphKernelNodeSetAttribute' in found_functions}}

cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddMemcpyNode' in found_functions}}

cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddMemcpyNode1D' in found_functions}}

cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphMemcpyNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphMemcpyNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphMemcpyNodeSetParams1D' in found_functions}}

cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddMemsetNode' in found_functions}}

cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphMemsetNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphMemsetNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddHostNode' in found_functions}}

cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphHostNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphHostNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddChildGraphNode' in found_functions}}

cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphChildGraphNodeGetGraph' in found_functions}}

cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddEmptyNode' in found_functions}}

cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddEventRecordNode' in found_functions}}

cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphEventRecordNodeGetEvent' in found_functions}}

cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphEventRecordNodeSetEvent' in found_functions}}

cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddEventWaitNode' in found_functions}}

cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphEventWaitNodeGetEvent' in found_functions}}

cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphEventWaitNodeSetEvent' in found_functions}}

cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddExternalSemaphoresSignalNode' in found_functions}}

cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExternalSemaphoresSignalNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExternalSemaphoresSignalNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddExternalSemaphoresWaitNode' in found_functions}}

cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExternalSemaphoresWaitNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExternalSemaphoresWaitNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddMemAllocNode' in found_functions}}

cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphMemAllocNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddMemFreeNode' in found_functions}}

cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphMemFreeNodeGetParams' in found_functions}}

cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGraphMemTrim' in found_functions}}

cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceGetGraphMemAttribute' in found_functions}}

cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaDeviceSetGraphMemAttribute' in found_functions}}

cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphClone' in found_functions}}

cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeFindInClone' in found_functions}}

cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeGetType' in found_functions}}

cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphGetNodes' in found_functions}}

cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphGetRootNodes' in found_functions}}

cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphGetEdges' in found_functions}}

cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphGetEdges_v2' in found_functions}}

cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeGetDependencies' in found_functions}}

cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeGetDependencies_v2' in found_functions}}

cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeGetDependentNodes' in found_functions}}

cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeGetDependentNodes_v2' in found_functions}}

cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddDependencies' in found_functions}}

cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddDependencies_v2' in found_functions}}

cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphRemoveDependencies' in found_functions}}

cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphRemoveDependencies_v2' in found_functions}}

cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphDestroyNode' in found_functions}}

cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphInstantiate' in found_functions}}

cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphInstantiateWithFlags' in found_functions}}

cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphInstantiateWithParams' in found_functions}}

cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecGetFlags' in found_functions}}

cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecKernelNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecMemcpyNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecMemcpyNodeSetParams1D' in found_functions}}

cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecMemsetNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecHostNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecChildGraphNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecEventRecordNodeSetEvent' in found_functions}}

cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecEventWaitNodeSetEvent' in found_functions}}

cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeSetEnabled' in found_functions}}

cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeGetEnabled' in found_functions}}

cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecUpdate' in found_functions}}

cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphUpload' in found_functions}}

cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphLaunch' in found_functions}}

cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecDestroy' in found_functions}}

cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphDestroy' in found_functions}}

cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphDebugDotPrint' in found_functions}}

cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaUserObjectCreate' in found_functions}}

cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaUserObjectRetain' in found_functions}}

cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaUserObjectRelease' in found_functions}}

cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphRetainUserObject' in found_functions}}

cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphReleaseUserObject' in found_functions}}

cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddNode' in found_functions}}

cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphAddNode_v2' in found_functions}}

cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphExecNodeSetParams' in found_functions}}

cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGraphConditionalHandleCreate' in found_functions}}

cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetDriverEntryPoint' in found_functions}}

cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetDriverEntryPointByVersion' in found_functions}}

cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryLoadData' in found_functions}}

cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryLoadFromFile' in found_functions}}

cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryUnload' in found_functions}}

cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryGetKernel' in found_functions}}

cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryGetGlobal' in found_functions}}

cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryGetManaged' in found_functions}}

cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryGetUnifiedFunction' in found_functions}}

cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryGetKernelCount' in found_functions}}

cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaLibraryEnumerateKernels' in found_functions}}

cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaKernelSetAttributeForDevice' in found_functions}}

cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetExportTable' in found_functions}}

cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaGetKernel' in found_functions}}

cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'make_cudaPitchedPtr' in found_functions}}

cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil
{{endif}}

{{if 'make_cudaPos' in found_functions}}

cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil
{{endif}}

{{if 'make_cudaExtent' in found_functions}}

cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaProfilerStart' in found_functions}}

cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if 'cudaProfilerStop' in found_functions}}

cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

{{if True}}

cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil
{{endif}}

cdef enum: cudaHostAllocDefault = 0

cdef enum: cudaHostAllocPortable = 1

cdef enum: cudaHostAllocMapped = 2

cdef enum: cudaHostAllocWriteCombined = 4

cdef enum: cudaHostRegisterDefault = 0

cdef enum: cudaHostRegisterPortable = 1

cdef enum: cudaHostRegisterMapped = 2

cdef enum: cudaHostRegisterIoMemory = 4

cdef enum: cudaHostRegisterReadOnly = 8

cdef enum: cudaPeerAccessDefault = 0

cdef enum: cudaStreamDefault = 0

cdef enum: cudaStreamNonBlocking = 1

cdef enum: cudaStreamLegacy = 1

cdef enum: cudaStreamPerThread = 2

cdef enum: cudaEventDefault = 0

cdef enum: cudaEventBlockingSync = 1

cdef enum: cudaEventDisableTiming = 2

cdef enum: cudaEventInterprocess = 4

cdef enum: cudaEventRecordDefault = 0

cdef enum: cudaEventRecordExternal = 1

cdef enum: cudaEventWaitDefault = 0

cdef enum: cudaEventWaitExternal = 1

cdef enum: cudaDeviceScheduleAuto = 0

cdef enum: cudaDeviceScheduleSpin = 1

cdef enum: cudaDeviceScheduleYield = 2

cdef enum: cudaDeviceScheduleBlockingSync = 4

cdef enum: cudaDeviceBlockingSync = 4

cdef enum: cudaDeviceScheduleMask = 7

cdef enum: cudaDeviceMapHost = 8

cdef enum: cudaDeviceLmemResizeToMax = 16

cdef enum: cudaDeviceSyncMemops = 128

cdef enum: cudaDeviceMask = 255

cdef enum: cudaArrayDefault = 0

cdef enum: cudaArrayLayered = 1

cdef enum: cudaArraySurfaceLoadStore = 2

cdef enum: cudaArrayCubemap = 4

cdef enum: cudaArrayTextureGather = 8

cdef enum: cudaArrayColorAttachment = 32

cdef enum: cudaArraySparse = 64

cdef enum: cudaArrayDeferredMapping = 128

cdef enum: cudaIpcMemLazyEnablePeerAccess = 1

cdef enum: cudaMemAttachGlobal = 1

cdef enum: cudaMemAttachHost = 2

cdef enum: cudaMemAttachSingle = 4

cdef enum: cudaOccupancyDefault = 0

cdef enum: cudaOccupancyDisableCachingOverride = 1

cdef enum: cudaCpuDeviceId = -1

cdef enum: cudaInvalidDeviceId = -2

cdef enum: cudaInitDeviceFlagsAreValid = 1

cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1

cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2

cdef enum: cudaArraySparsePropertiesSingleMipTail = 1

cdef enum: cudaMemPoolCreateUsageHwDecompress = 2

cdef enum: CUDA_IPC_HANDLE_SIZE = 64

cdef enum: cudaExternalMemoryDedicated = 1

cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1

cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2

cdef enum: cudaNvSciSyncAttrSignal = 1

cdef enum: cudaNvSciSyncAttrWait = 2

cdef enum: cudaGraphKernelNodePortDefault = 0

cdef enum: cudaGraphKernelNodePortProgrammatic = 1

cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2

cdef enum: cudaStreamAttributeAccessPolicyWindow = 1

cdef enum: cudaStreamAttributeSynchronizationPolicy = 3

cdef enum: cudaStreamAttributeMemSyncDomainMap = 9

cdef enum: cudaStreamAttributeMemSyncDomain = 10

cdef enum: cudaStreamAttributePriority = 8

cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1

cdef enum: cudaKernelNodeAttributeCooperative = 2

cdef enum: cudaKernelNodeAttributePriority = 8

cdef enum: cudaKernelNodeAttributeClusterDimension = 4

cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5

cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9

cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10

cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14

cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13

cdef enum: cudaSurfaceType1D = 1

cdef enum: cudaSurfaceType2D = 2

cdef enum: cudaSurfaceType3D = 3

cdef enum: cudaSurfaceTypeCubemap = 12

cdef enum: cudaSurfaceType1DLayered = 241

cdef enum: cudaSurfaceType2DLayered = 242

cdef enum: cudaSurfaceTypeCubemapLayered = 252

cdef enum: cudaTextureType1D = 1

cdef enum: cudaTextureType2D = 2

cdef enum: cudaTextureType3D = 3

cdef enum: cudaTextureTypeCubemap = 12

cdef enum: cudaTextureType1DLayered = 241

cdef enum: cudaTextureType2DLayered = 242

cdef enum: cudaTextureTypeCubemapLayered = 252

cdef enum: CUDART_VERSION = 12090

cdef enum: __CUDART_API_VERSION = 12090

cdef enum: CUDA_EGL_MAX_PLANES = 3