diff --git a/cuda_bindings/cuda/bindings/driver.pyx.in b/cuda_bindings/cuda/bindings/driver.pyx.in index 1222dfc3633..a9df1a503b2 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx.in +++ b/cuda_bindings/cuda/bindings/driver.pyx.in @@ -8044,7 +8044,7 @@ cdef class CUstreamMemOpWaitValueParams_st: return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].waitValue.operation] @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._pvt_ptr[0].waitValue.operation = operation.value + self._pvt_ptr[0].waitValue.operation = int(operation) {{endif}} {{if 'CUstreamBatchMemOpParams_union.waitValue.address' in found_struct}} @property @@ -8234,7 +8234,7 @@ cdef class CUstreamMemOpWriteValueParams_st: return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].writeValue.operation] @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._pvt_ptr[0].writeValue.operation = operation.value + self._pvt_ptr[0].writeValue.operation = int(operation) {{endif}} {{if 'CUstreamBatchMemOpParams_union.writeValue.address' in found_struct}} @property @@ -8372,7 +8372,7 @@ cdef class CUstreamMemOpFlushRemoteWritesParams_st: return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].flushRemoteWrites.operation] @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._pvt_ptr[0].flushRemoteWrites.operation = operation.value + self._pvt_ptr[0].flushRemoteWrites.operation = int(operation) {{endif}} {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.flags' in found_struct}} @property @@ -8438,7 +8438,7 @@ cdef class CUstreamMemOpMemoryBarrierParams_st: return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].memoryBarrier.operation] @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._pvt_ptr[0].memoryBarrier.operation = operation.value + self._pvt_ptr[0].memoryBarrier.operation = int(operation) {{endif}} {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.flags' in found_struct}} @property @@ -8560,7 +8560,7 @@ cdef class CUstreamBatchMemOpParams_union: return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].operation] @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._pvt_ptr[0].operation = operation.value + self._pvt_ptr[0].operation = int(operation) {{endif}} {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} @property @@ -9032,7 +9032,7 @@ cdef class CUasyncNotificationInfo_st: return _dict_CUasyncNotificationType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUasyncNotificationType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUasyncNotificationInfo_st.info' in found_struct}} @property @@ -9381,7 +9381,7 @@ cdef class CUaccessPolicyWindow_st: return _dict_CUaccessProperty[self._pvt_ptr[0].hitProp] @hitProp.setter def hitProp(self, hitProp not None : CUaccessProperty): - self._pvt_ptr[0].hitProp = hitProp.value + self._pvt_ptr[0].hitProp = int(hitProp) {{endif}} {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} @property @@ -9391,7 +9391,7 @@ cdef class CUaccessPolicyWindow_st: return _dict_CUaccessProperty[self._pvt_ptr[0].missProp] @missProp.setter def missProp(self, missProp not None : CUaccessProperty): - self._pvt_ptr[0].missProp = missProp.value + self._pvt_ptr[0].missProp = int(missProp) {{endif}} {{endif}} {{if 'CUDA_KERNEL_NODE_PARAMS_st' in found_struct}} @@ -10823,7 +10823,7 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: return _dict_CUgraphConditionalNodeType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUgraphConditionalNodeType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUDA_CONDITIONAL_NODE_PARAMS.size' in found_struct}} @property @@ -11123,7 +11123,7 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: return _dict_CUgraphInstantiateResult[self._pvt_ptr[0].result_out] @result_out.setter def result_out(self, result_out not None : CUgraphInstantiateResult): - self._pvt_ptr[0].result_out = result_out.value + self._pvt_ptr[0].result_out = int(result_out) {{endif}} {{endif}} {{if 'CUlaunchMemSyncDomainMap_st' in found_struct}} @@ -11896,7 +11896,7 @@ cdef class CUlaunchAttributeValue_union: return _dict_CUsynchronizationPolicy[self._pvt_ptr[0].syncPolicy] @syncPolicy.setter def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy): - self._pvt_ptr[0].syncPolicy = syncPolicy.value + self._pvt_ptr[0].syncPolicy = int(syncPolicy) {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} @property @@ -11914,7 +11914,7 @@ cdef class CUlaunchAttributeValue_union: return _dict_CUclusterSchedulingPolicy[self._pvt_ptr[0].clusterSchedulingPolicyPreference] @clusterSchedulingPolicyPreference.setter def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy): - self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + self._pvt_ptr[0].clusterSchedulingPolicyPreference = int(clusterSchedulingPolicyPreference) {{endif}} {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} @property @@ -11964,7 +11964,7 @@ cdef class CUlaunchAttributeValue_union: return _dict_CUlaunchMemSyncDomain[self._pvt_ptr[0].memSyncDomain] @memSyncDomain.setter def memSyncDomain(self, memSyncDomain not None : CUlaunchMemSyncDomain): - self._pvt_ptr[0].memSyncDomain = memSyncDomain.value + self._pvt_ptr[0].memSyncDomain = int(memSyncDomain) {{endif}} {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} @property @@ -12053,7 +12053,7 @@ cdef class CUlaunchAttribute_st: return _dict_CUlaunchAttributeID[self._pvt_ptr[0].id] @id.setter def id(self, id not None : CUlaunchAttributeID): - self._pvt_ptr[0].id = id.value + self._pvt_ptr[0].id = int(id) {{endif}} {{if 'CUlaunchAttribute_st.value' in found_struct}} @property @@ -12470,7 +12470,7 @@ cdef class CUexecAffinityParam_st: return _dict_CUexecAffinityType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUexecAffinityType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUexecAffinityParam_st.param' in found_struct}} @property @@ -12540,7 +12540,7 @@ cdef class CUctxCigParam_st: return _dict_CUcigDataType[self._pvt_ptr[0].sharedDataType] @sharedDataType.setter def sharedDataType(self, sharedDataType not None : CUcigDataType): - self._pvt_ptr[0].sharedDataType = sharedDataType.value + self._pvt_ptr[0].sharedDataType = int(sharedDataType) {{endif}} {{if 'CUctxCigParam_st.sharedData' in found_struct}} @property @@ -13008,7 +13008,7 @@ cdef class CUDA_MEMCPY2D_st: return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): - self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + self._pvt_ptr[0].srcMemoryType = int(srcMemoryType) {{endif}} {{if 'CUDA_MEMCPY2D_st.srcHost' in found_struct}} @property @@ -13086,7 +13086,7 @@ cdef class CUDA_MEMCPY2D_st: return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): - self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + self._pvt_ptr[0].dstMemoryType = int(dstMemoryType) {{endif}} {{if 'CUDA_MEMCPY2D_st.dstHost' in found_struct}} @property @@ -13491,7 +13491,7 @@ cdef class CUDA_MEMCPY3D_st: return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): - self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + self._pvt_ptr[0].srcMemoryType = int(srcMemoryType) {{endif}} {{if 'CUDA_MEMCPY3D_st.srcHost' in found_struct}} @property @@ -13602,7 +13602,7 @@ cdef class CUDA_MEMCPY3D_st: return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): - self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + self._pvt_ptr[0].dstMemoryType = int(dstMemoryType) {{endif}} {{if 'CUDA_MEMCPY3D_st.dstHost' in found_struct}} @property @@ -14039,7 +14039,7 @@ cdef class CUDA_MEMCPY3D_PEER_st: return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): - self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + self._pvt_ptr[0].srcMemoryType = int(srcMemoryType) {{endif}} {{if 'CUDA_MEMCPY3D_PEER_st.srcHost' in found_struct}} @property @@ -14158,7 +14158,7 @@ cdef class CUDA_MEMCPY3D_PEER_st: return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): - self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + self._pvt_ptr[0].dstMemoryType = int(dstMemoryType) {{endif}} {{if 'CUDA_MEMCPY3D_PEER_st.dstHost' in found_struct}} @property @@ -14476,7 +14476,7 @@ cdef class CUDA_ARRAY_DESCRIPTOR_st: return _dict_CUarray_format[self._pvt_ptr[0].Format] @Format.setter def Format(self, Format not None : CUarray_format): - self._pvt_ptr[0].Format = Format.value + self._pvt_ptr[0].Format = int(Format) {{endif}} {{if 'CUDA_ARRAY_DESCRIPTOR_st.NumChannels' in found_struct}} @property @@ -14610,7 +14610,7 @@ cdef class CUDA_ARRAY3D_DESCRIPTOR_st: return _dict_CUarray_format[self._pvt_ptr[0].Format] @Format.setter def Format(self, Format not None : CUarray_format): - self._pvt_ptr[0].Format = Format.value + self._pvt_ptr[0].Format = int(Format) {{endif}} {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels' in found_struct}} @property @@ -15135,7 +15135,7 @@ cdef class anon_struct9: return _dict_CUarray_format[self._pvt_ptr[0].res.linear.format] @format.setter def format(self, format not None : CUarray_format): - self._pvt_ptr[0].res.linear.format = format.value + self._pvt_ptr[0].res.linear.format = int(format) {{endif}} {{if 'CUDA_RESOURCE_DESC_st.res.linear.numChannels' in found_struct}} @property @@ -15270,7 +15270,7 @@ cdef class anon_struct10: return _dict_CUarray_format[self._pvt_ptr[0].res.pitch2D.format] @format.setter def format(self, format not None : CUarray_format): - self._pvt_ptr[0].res.pitch2D.format = format.value + self._pvt_ptr[0].res.pitch2D.format = int(format) {{endif}} {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.numChannels' in found_struct}} @property @@ -15558,7 +15558,7 @@ cdef class CUDA_RESOURCE_DESC_st: return _dict_CUresourcetype[self._pvt_ptr[0].resType] @resType.setter def resType(self, resType not None : CUresourcetype): - self._pvt_ptr[0].resType = resType.value + self._pvt_ptr[0].resType = int(resType) {{endif}} {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} @property @@ -15714,7 +15714,7 @@ cdef class CUDA_TEXTURE_DESC_st: return [_dict_CUaddress_mode[_x] if _x in _dict_CUaddress_mode else None for _x in list(self._pvt_ptr[0].addressMode)] @addressMode.setter def addressMode(self, addressMode): - self._pvt_ptr[0].addressMode = [_x.value for _x in addressMode] + self._pvt_ptr[0].addressMode = [int(_x) for _x in addressMode] {{endif}} {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} @property @@ -15724,7 +15724,7 @@ cdef class CUDA_TEXTURE_DESC_st: return _dict_CUfilter_mode[self._pvt_ptr[0].filterMode] @filterMode.setter def filterMode(self, filterMode not None : CUfilter_mode): - self._pvt_ptr[0].filterMode = filterMode.value + self._pvt_ptr[0].filterMode = int(filterMode) {{endif}} {{if 'CUDA_TEXTURE_DESC_st.flags' in found_struct}} @property @@ -15750,7 +15750,7 @@ cdef class CUDA_TEXTURE_DESC_st: return _dict_CUfilter_mode[self._pvt_ptr[0].mipmapFilterMode] @mipmapFilterMode.setter def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode): - self._pvt_ptr[0].mipmapFilterMode = mipmapFilterMode.value + self._pvt_ptr[0].mipmapFilterMode = int(mipmapFilterMode) {{endif}} {{if 'CUDA_TEXTURE_DESC_st.mipmapLevelBias' in found_struct}} @property @@ -15922,7 +15922,7 @@ cdef class CUDA_RESOURCE_VIEW_DESC_st: return _dict_CUresourceViewFormat[self._pvt_ptr[0].format] @format.setter def format(self, format not None : CUresourceViewFormat): - self._pvt_ptr[0].format = format.value + self._pvt_ptr[0].format = int(format) {{endif}} {{if 'CUDA_RESOURCE_VIEW_DESC_st.width' in found_struct}} @property @@ -16592,7 +16592,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: return _dict_CUexternalMemoryHandleType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUexternalMemoryHandleType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} @property @@ -17075,7 +17075,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: return _dict_CUexternalSemaphoreHandleType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUexternalSemaphoreHandleType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} @property @@ -18976,7 +18976,7 @@ cdef class CUarrayMapInfo_st: return _dict_CUresourcetype[self._pvt_ptr[0].resourceType] @resourceType.setter def resourceType(self, resourceType not None : CUresourcetype): - self._pvt_ptr[0].resourceType = resourceType.value + self._pvt_ptr[0].resourceType = int(resourceType) {{endif}} {{if 'CUarrayMapInfo_st.resource' in found_struct}} @property @@ -18994,7 +18994,7 @@ cdef class CUarrayMapInfo_st: return _dict_CUarraySparseSubresourceType[self._pvt_ptr[0].subresourceType] @subresourceType.setter def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType): - self._pvt_ptr[0].subresourceType = subresourceType.value + self._pvt_ptr[0].subresourceType = int(subresourceType) {{endif}} {{if 'CUarrayMapInfo_st.subresource' in found_struct}} @property @@ -19012,7 +19012,7 @@ cdef class CUarrayMapInfo_st: return _dict_CUmemOperationType[self._pvt_ptr[0].memOperationType] @memOperationType.setter def memOperationType(self, memOperationType not None : CUmemOperationType): - self._pvt_ptr[0].memOperationType = memOperationType.value + self._pvt_ptr[0].memOperationType = int(memOperationType) {{endif}} {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} @property @@ -19022,7 +19022,7 @@ cdef class CUarrayMapInfo_st: return _dict_CUmemHandleType[self._pvt_ptr[0].memHandleType] @memHandleType.setter def memHandleType(self, memHandleType not None : CUmemHandleType): - self._pvt_ptr[0].memHandleType = memHandleType.value + self._pvt_ptr[0].memHandleType = int(memHandleType) {{endif}} {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} @property @@ -19124,7 +19124,7 @@ cdef class CUmemLocation_st: return _dict_CUmemLocationType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUmemLocationType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUmemLocation_st.id' in found_struct}} @property @@ -19337,7 +19337,7 @@ cdef class CUmemAllocationProp_st: return _dict_CUmemAllocationType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUmemAllocationType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} @property @@ -19347,7 +19347,7 @@ cdef class CUmemAllocationProp_st: return _dict_CUmemAllocationHandleType[self._pvt_ptr[0].requestedHandleTypes] @requestedHandleTypes.setter def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType): - self._pvt_ptr[0].requestedHandleTypes = requestedHandleTypes.value + self._pvt_ptr[0].requestedHandleTypes = int(requestedHandleTypes) {{endif}} {{if 'CUmemAllocationProp_st.location' in found_struct}} @property @@ -19552,7 +19552,7 @@ cdef class CUmemAccessDesc_st: return _dict_CUmemAccess_flags[self._pvt_ptr[0].flags] @flags.setter def flags(self, flags not None : CUmemAccess_flags): - self._pvt_ptr[0].flags = flags.value + self._pvt_ptr[0].flags = int(flags) {{endif}} {{endif}} {{if 'CUgraphExecUpdateResultInfo_st' in found_struct}} @@ -19633,7 +19633,7 @@ cdef class CUgraphExecUpdateResultInfo_st: return _dict_CUgraphExecUpdateResult[self._pvt_ptr[0].result] @result.setter def result(self, result not None : CUgraphExecUpdateResult): - self._pvt_ptr[0].result = result.value + self._pvt_ptr[0].result = int(result) {{endif}} {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} @property @@ -19788,7 +19788,7 @@ cdef class CUmemPoolProps_st: return _dict_CUmemAllocationType[self._pvt_ptr[0].allocType] @allocType.setter def allocType(self, allocType not None : CUmemAllocationType): - self._pvt_ptr[0].allocType = allocType.value + self._pvt_ptr[0].allocType = int(allocType) {{endif}} {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} @property @@ -19798,7 +19798,7 @@ cdef class CUmemPoolProps_st: return _dict_CUmemAllocationHandleType[self._pvt_ptr[0].handleTypes] @handleTypes.setter def handleTypes(self, handleTypes not None : CUmemAllocationHandleType): - self._pvt_ptr[0].handleTypes = handleTypes.value + self._pvt_ptr[0].handleTypes = int(handleTypes) {{endif}} {{if 'CUmemPoolProps_st.location' in found_struct}} @property @@ -19987,7 +19987,7 @@ cdef class CUmemcpyAttributes_st: return _dict_CUmemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): - self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) {{endif}} {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} @property @@ -20515,7 +20515,7 @@ cdef class CUmemcpy3DOperand_st: return _dict_CUmemcpy3DOperandType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUmemcpy3DOperandType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUmemcpy3DOperand_st.op' in found_struct}} @property @@ -20647,7 +20647,7 @@ cdef class CUDA_MEMCPY3D_BATCH_OP_st: return _dict_CUmemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): - self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) {{endif}} {{if 'CUDA_MEMCPY3D_BATCH_OP_st.flags' in found_struct}} @property @@ -21126,7 +21126,7 @@ cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: return _dict_CUgraphChildGraphNodeOwnership[self._pvt_ptr[0].ownership] @ownership.setter def ownership(self, ownership not None : CUgraphChildGraphNodeOwnership): - self._pvt_ptr[0].ownership = ownership.value + self._pvt_ptr[0].ownership = int(ownership) {{endif}} {{endif}} {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st' in found_struct}} @@ -21503,7 +21503,7 @@ cdef class CUgraphNodeParams_st: return _dict_CUgraphNodeType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUgraphNodeType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUgraphNodeParams_st.reserved0' in found_struct}} @property @@ -22033,7 +22033,7 @@ cdef class CUmemDecompressParams_st: return _dict_CUmemDecompressAlgorithm[self._pvt_ptr[0].algo] @algo.setter def algo(self, algo not None : CUmemDecompressAlgorithm): - self._pvt_ptr[0].algo = algo.value + self._pvt_ptr[0].algo = int(algo) {{endif}} {{if 'CUmemDecompressParams_st.padding' in found_struct}} @property @@ -22178,7 +22178,7 @@ cdef class CUdevResource_st: return _dict_CUdevResourceType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : CUdevResourceType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'CUdevResource_st._internal_padding' in found_struct}} @property @@ -22486,7 +22486,7 @@ cdef class CUeglFrame_st: return _dict_CUeglFrameType[self._pvt_ptr[0].frameType] @frameType.setter def frameType(self, frameType not None : CUeglFrameType): - self._pvt_ptr[0].frameType = frameType.value + self._pvt_ptr[0].frameType = int(frameType) {{endif}} {{if True}} @property @@ -22496,7 +22496,7 @@ cdef class CUeglFrame_st: return _dict_CUeglColorFormat[self._pvt_ptr[0].eglColorFormat] @eglColorFormat.setter def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat): - self._pvt_ptr[0].eglColorFormat = eglColorFormat.value + self._pvt_ptr[0].eglColorFormat = int(eglColorFormat) {{endif}} {{if True}} @property @@ -22506,7 +22506,7 @@ cdef class CUeglFrame_st: return _dict_CUarray_format[self._pvt_ptr[0].cuFormat] @cuFormat.setter def cuFormat(self, cuFormat not None : CUarray_format): - self._pvt_ptr[0].cuFormat = cuFormat.value + self._pvt_ptr[0].cuFormat = int(cuFormat) {{endif}} {{endif}} {{if 'cuuint32_t' in found_types}} @@ -22964,7 +22964,7 @@ def cuGetErrorString(error not None : CUresult): -------- :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorString` """ - cdef cydriver.CUresult cyerror = error.value + cdef cydriver.CUresult cyerror = int(error) cdef const char* pStr = NULL with nogil: err = cydriver.cuGetErrorString(cyerror, &pStr) @@ -23000,7 +23000,7 @@ def cuGetErrorName(error not None : CUresult): -------- :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorName` """ - cdef cydriver.CUresult cyerror = error.value + cdef cydriver.CUresult cyerror = int(error) cdef const char* pStr = NULL with nogil: err = cydriver.cuGetErrorName(cyerror, &pStr) @@ -23382,7 +23382,7 @@ def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsign pdev = int(CUdevice(dev)) cydev = pdev cdef size_t maxWidthInElements = 0 - cdef cydriver.CUarray_format cypformat = pformat.value + cdef cydriver.CUarray_format cypformat = int(pformat) with nogil: err = cydriver.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cypformat, numChannels, cydev) if err != cydriver.CUDA_SUCCESS: @@ -23828,7 +23828,7 @@ def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev): pdev = int(CUdevice(dev)) cydev = pdev cdef int pi = 0 - cdef cydriver.CUdevice_attribute cyattrib = attrib.value + cdef cydriver.CUdevice_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuDeviceGetAttribute(&pi, cyattrib, cydev) if err != cydriver.CUDA_SUCCESS: @@ -24111,7 +24111,7 @@ def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev): pdev = int(CUdevice(dev)) cydev = pdev cdef int pi = 0 - cdef cydriver.CUexecAffinityType cytypename = typename.value + cdef cydriver.CUexecAffinityType cytypename = int(typename) with nogil: err = cydriver.cuDeviceGetExecAffinitySupport(&pi, cytypename, cydev) if err != cydriver.CUDA_SUCCESS: @@ -24163,8 +24163,8 @@ def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarge CUresult :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, """ - cdef cydriver.CUflushGPUDirectRDMAWritesTarget cytarget = target.value - cdef cydriver.CUflushGPUDirectRDMAWritesScope cyscope = scope.value + cdef cydriver.CUflushGPUDirectRDMAWritesTarget cytarget = int(target) + cdef cydriver.CUflushGPUDirectRDMAWritesScope cyscope = int(scope) with nogil: err = cydriver.cuFlushGPUDirectRDMAWrites(cytarget, cyscope) return (_dict_CUresult[err],) @@ -25568,7 +25568,7 @@ def cuCtxSetLimit(limit not None : CUlimit, size_t value): -------- :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceSetLimit` """ - cdef cydriver.CUlimit cylimit = limit.value + cdef cydriver.CUlimit cylimit = int(limit) with nogil: err = cydriver.cuCtxSetLimit(cylimit, value) return (_dict_CUresult[err],) @@ -25625,7 +25625,7 @@ def cuCtxGetLimit(limit not None : CUlimit): :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetLimit` """ cdef size_t pvalue = 0 - cdef cydriver.CUlimit cylimit = limit.value + cdef cydriver.CUlimit cylimit = int(limit) with nogil: err = cydriver.cuCtxGetLimit(&pvalue, cylimit) if err != cydriver.CUDA_SUCCESS: @@ -25733,7 +25733,7 @@ def cuCtxSetCacheConfig(config not None : CUfunc_cache): -------- :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetCacheConfig`, :py:obj:`~.cuKernelSetCacheConfig` """ - cdef cydriver.CUfunc_cache cyconfig = config.value + cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuCtxSetCacheConfig(cyconfig) return (_dict_CUresult[err],) @@ -25885,7 +25885,7 @@ def cuCtxGetExecAffinity(typename not None : CUexecAffinityType): :py:obj:`~.CUexecAffinityParam` """ cdef CUexecAffinityParam pExecAffinity = CUexecAffinityParam() - cdef cydriver.CUexecAffinityType cytypename = typename.value + cdef cydriver.CUexecAffinityType cytypename = int(typename) with nogil: err = cydriver.cuCtxGetExecAffinity(pExecAffinity._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: @@ -26187,7 +26187,7 @@ def cuCtxSetSharedMemConfig(config not None : CUsharedconfig): -------- :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetSharedMemConfig` """ - cdef cydriver.CUsharedconfig cyconfig = config.value + cdef cydriver.CUsharedconfig cyconfig = int(config) with nogil: err = cydriver.cuCtxSetSharedMemConfig(cyconfig) return (_dict_CUresult[err],) @@ -26311,7 +26311,7 @@ def cuModuleLoadDataEx(image, unsigned int numOptions, options : Optional[tuple[ cdef void* cyimage_ptr = cyimage.cptr if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) - cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr @@ -26679,7 +26679,7 @@ def cuLinkCreate(unsigned int numOptions, options : Optional[tuple[CUjit_option] raise TypeError("Argument 'options' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) - cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr @@ -26754,12 +26754,12 @@ def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, else: pstate = int(CUlinkState(state)) cystate = pstate - cdef cydriver.CUjitInputType cytypename = typename.value + cdef cydriver.CUjitInputType cytypename = int(typename) cydata = _HelperInputVoidPtr(data) cdef void* cydata_ptr = cydata.cptr if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) - cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr @@ -26826,10 +26826,10 @@ def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigne else: pstate = int(CUlinkState(state)) cystate = pstate - cdef cydriver.CUjitInputType cytypename = typename.value + cdef cydriver.CUjitInputType cytypename = int(typename) if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) - cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr @@ -27093,13 +27093,13 @@ def cuLibraryLoadData(code, jitOptions : Optional[tuple[CUjit_option] | list[CUj cdef CUlibrary library = CUlibrary() cycode = _HelperInputVoidPtr(code) cdef void* cycode_ptr = cycode.cptr - cdef vector[cydriver.CUjit_option] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + cdef vector[cydriver.CUjit_option] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)] pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) - cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)] pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr @@ -27190,13 +27190,13 @@ def cuLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[CUjit_opti if not all(isinstance(_x, (CUjit_option)) for _x in jitOptions): raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") cdef CUlibrary library = CUlibrary() - cdef vector[cydriver.CUjit_option] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + cdef vector[cydriver.CUjit_option] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)] pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) - cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)] pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr @@ -27776,7 +27776,7 @@ def cuKernelGetAttribute(attrib not None : CUfunction_attribute, kernel, dev): pkernel = int(CUkernel(kernel)) cykernel = pkernel cdef int pi = 0 - cdef cydriver.CUfunction_attribute cyattrib = attrib.value + cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuKernelGetAttribute(&pi, cyattrib, cykernel, cydev) if err != cydriver.CUDA_SUCCESS: @@ -27893,7 +27893,7 @@ def cuKernelSetAttribute(attrib not None : CUfunction_attribute, int val, kernel else: pkernel = int(CUkernel(kernel)) cykernel = pkernel - cdef cydriver.CUfunction_attribute cyattrib = attrib.value + cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuKernelSetAttribute(cyattrib, val, cykernel, cydev) return (_dict_CUresult[err],) @@ -27977,7 +27977,7 @@ def cuKernelSetCacheConfig(kernel, config not None : CUfunc_cache, dev): else: pkernel = int(CUkernel(kernel)) cykernel = pkernel - cdef cydriver.CUfunc_cache cyconfig = config.value + cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuKernelSetCacheConfig(cykernel, cyconfig, cydev) return (_dict_CUresult[err],) @@ -32864,7 +32864,7 @@ def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmem cydptr = pdptr cdef int handle = 0 cdef void* cyhandle_ptr = &handle - cdef cydriver.CUmemRangeHandleType cyhandleType = handleType.value + cdef cydriver.CUmemRangeHandleType cyhandleType = int(handleType) with nogil: err = cydriver.cuMemGetHandleForAddressRange(cyhandle_ptr, cydptr, size, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: @@ -33651,7 +33651,7 @@ def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHa cyhandle = phandle cdef _HelperCUmemAllocationHandleType cyshareableHandle = _HelperCUmemAllocationHandleType(handleType) cdef void* cyshareableHandle_ptr = cyshareableHandle.cptr - cdef cydriver.CUmemAllocationHandleType cyhandleType = handleType.value + cdef cydriver.CUmemAllocationHandleType cyhandleType = int(handleType) with nogil: err = cydriver.cuMemExportToShareableHandle(cyshareableHandle_ptr, cyhandle, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: @@ -33701,7 +33701,7 @@ def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAlloca cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() cyosHandle = _HelperInputVoidPtr(osHandle) cdef void* cyosHandle_ptr = cyosHandle.cptr - cdef cydriver.CUmemAllocationHandleType cyshHandleType = shHandleType.value + cdef cydriver.CUmemAllocationHandleType cyshHandleType = int(shHandleType) with nogil: err = cydriver.cuMemImportFromShareableHandle(handle._pvt_ptr, cyosHandle_ptr, cyshHandleType) if err != cydriver.CUDA_SUCCESS: @@ -33740,7 +33740,7 @@ def cuMemGetAllocationGranularity(prop : Optional[CUmemAllocationProp], option n """ cdef size_t granularity = 0 cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL - cdef cydriver.CUmemAllocationGranularity_flags cyoption = option.value + cdef cydriver.CUmemAllocationGranularity_flags cyoption = int(option) with nogil: err = cydriver.cuMemGetAllocationGranularity(&granularity, cyprop_ptr, cyoption) if err != cydriver.CUDA_SUCCESS: @@ -34047,7 +34047,7 @@ def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value): else: ppool = int(CUmemoryPool(pool)) cypool = ppool - cdef cydriver.CUmemPool_attribute cyattr = attr.value + cdef cydriver.CUmemPool_attribute cyattr = int(attr) cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, value, is_getter=False) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -34129,7 +34129,7 @@ def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute): else: ppool = int(CUmemoryPool(pool)) cypool = ppool - cdef cydriver.CUmemPool_attribute cyattr = attr.value + cdef cydriver.CUmemPool_attribute cyattr = int(attr) cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, 0, is_getter=True) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -34465,7 +34465,7 @@ def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocation cypool = ppool cdef _HelperCUmemAllocationHandleType cyhandle_out = _HelperCUmemAllocationHandleType(handleType) cdef void* cyhandle_out_ptr = cyhandle_out.cptr - cdef cydriver.CUmemAllocationHandleType cyhandleType = handleType.value + cdef cydriver.CUmemAllocationHandleType cyhandleType = int(handleType) with nogil: err = cydriver.cuMemPoolExportToShareableHandle(cyhandle_out_ptr, cypool, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: @@ -34514,7 +34514,7 @@ def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAlloca cdef CUmemoryPool pool_out = CUmemoryPool() cyhandle = _HelperInputVoidPtr(handle) cdef void* cyhandle_ptr = cyhandle.cptr - cdef cydriver.CUmemAllocationHandleType cyhandleType = handleType.value + cdef cydriver.CUmemAllocationHandleType cyhandleType = int(handleType) with nogil: err = cydriver.cuMemPoolImportFromShareableHandle(pool_out._pvt_ptr, cyhandle_ptr, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: @@ -34981,7 +34981,7 @@ def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not """ cdef size_t granularity = 0 cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL - cdef cydriver.CUmulticastGranularity_flags cyoption = option.value + cdef cydriver.CUmulticastGranularity_flags cyoption = int(option) with nogil: err = cydriver.cuMulticastGetGranularity(&granularity, cyprop_ptr, cyoption) if err != cydriver.CUDA_SUCCESS: @@ -35194,7 +35194,7 @@ def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr): cyptr = pptr cdef _HelperCUpointer_attribute cydata = _HelperCUpointer_attribute(attribute, 0, is_getter=True) cdef void* cydata_ptr = cydata.cptr - cdef cydriver.CUpointer_attribute cyattribute = attribute.value + cdef cydriver.CUpointer_attribute cyattribute = int(attribute) with nogil: err = cydriver.cuPointerGetAttribute(cydata_ptr, cyattribute, cyptr) if err != cydriver.CUDA_SUCCESS: @@ -35620,7 +35620,7 @@ def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, device): else: pdevPtr = int(CUdeviceptr(devPtr)) cydevPtr = pdevPtr - cdef cydriver.CUmem_advise cyadvice = advice.value + cdef cydriver.CUmem_advise cyadvice = int(advice) with nogil: err = cydriver.cuMemAdvise(cydevPtr, count, cyadvice, cydevice) return (_dict_CUresult[err],) @@ -35826,7 +35826,7 @@ def cuMemAdvise_v2(devPtr, size_t count, advice not None : CUmem_advise, locatio else: pdevPtr = int(CUdeviceptr(devPtr)) cydevPtr = pdevPtr - cdef cydriver.CUmem_advise cyadvice = advice.value + cdef cydriver.CUmem_advise cyadvice = int(advice) with nogil: err = cydriver.cuMemAdvise_v2(cydevPtr, count, cyadvice, location._pvt_ptr[0]) return (_dict_CUresult[err],) @@ -35982,7 +35982,7 @@ def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_att cydevPtr = pdevPtr cdef _HelperCUmem_range_attribute cydata = _HelperCUmem_range_attribute(attribute, dataSize) cdef void* cydata_ptr = cydata.cptr - cdef cydriver.CUmem_range_attribute cyattribute = attribute.value + cdef cydriver.CUmem_range_attribute cyattribute = int(attribute) with nogil: err = cydriver.cuMemRangeGetAttribute(cydata_ptr, dataSize, cyattribute, cydevPtr, count) if err != cydriver.CUDA_SUCCESS: @@ -36067,7 +36067,7 @@ def cuMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : Opt cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) cdef void** cyvoidStarHelper_ptr = voidStarHelperdata.cptr cdef vector[size_t] cydataSizes = dataSizes - cdef vector[cydriver.CUmem_range_attribute] cyattributes = [pyattributes.value for pyattributes in (attributes)] + cdef vector[cydriver.CUmem_range_attribute] cyattributes = [int(pyattributes) for pyattributes in (attributes)] if numAttributes > len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes)) if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) with nogil: @@ -36127,7 +36127,7 @@ def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr): cyptr = pptr cdef _HelperCUpointer_attribute cyvalue = _HelperCUpointer_attribute(attribute, value, is_getter=False) cdef void* cyvalue_ptr = cyvalue.cptr - cdef cydriver.CUpointer_attribute cyattribute = attribute.value + cdef cydriver.CUpointer_attribute cyattribute = int(attribute) with nogil: err = cydriver.cuPointerSetAttribute(cyvalue_ptr, cyattribute, cyptr) return (_dict_CUresult[err],) @@ -36216,7 +36216,7 @@ def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[tup if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes): raise TypeError("Argument 'attributes' is not instance of type (expected tuple[cydriver.CUpointer_attribute] or list[cydriver.CUpointer_attribute]") if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) - cdef vector[cydriver.CUpointer_attribute] cyattributes = [pyattributes.value for pyattributes in (attributes)] + cdef vector[cydriver.CUpointer_attribute] cyattributes = [int(pyattributes) for pyattributes in (attributes)] pylist = [_HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes] cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) cdef void** cyvoidStarHelper_ptr = voidStarHelperdata.cptr @@ -36884,7 +36884,7 @@ def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUstreamCaptureMode cymode = mode.value + cdef cydriver.CUstreamCaptureMode cymode = int(mode) with nogil: err = cydriver.cuStreamBeginCapture(cyhStream, cymode) return (_dict_CUresult[err],) @@ -36986,7 +36986,7 @@ def cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies : Optional[tuple[C elif len(dependencyData) == 1: cydependencyData = (dependencyData[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUstreamCaptureMode cymode = mode.value + cdef cydriver.CUstreamCaptureMode cymode = int(mode) with nogil: err = cydriver.cuStreamBeginCaptureToGraph(cyhStream, cyhGraph, cydependencies, cydependencyData, numDependencies, cymode) if len(dependencies) > 1 and cydependencies is not NULL: @@ -37062,7 +37062,7 @@ def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode): -------- :py:obj:`~.cuStreamBeginCapture` """ - cdef cydriver.CUstreamCaptureMode cymode = mode.value + cdef cydriver.CUstreamCaptureMode cymode = int(mode) with nogil: err = cydriver.cuThreadExchangeStreamCaptureMode(&cymode) if err != cydriver.CUDA_SUCCESS: @@ -37844,7 +37844,7 @@ def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUstreamAttrID cyattr = attr.value + cdef cydriver.CUstreamAttrID cyattr = int(attr) cdef CUstreamAttrValue value_out = CUstreamAttrValue() with nogil: err = cydriver.cuStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) @@ -37889,7 +37889,7 @@ def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : Option else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUstreamAttrID cyattr = attr.value + cdef cydriver.CUstreamAttrID cyattr = int(attr) cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) @@ -39620,7 +39620,7 @@ def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc): phfunc = int(CUfunction(hfunc)) cyhfunc = phfunc cdef int pi = 0 - cdef cydriver.CUfunction_attribute cyattrib = attrib.value + cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuFuncGetAttribute(&pi, cyattrib, cyhfunc) if err != cydriver.CUDA_SUCCESS: @@ -39716,7 +39716,7 @@ def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value) else: phfunc = int(CUfunction(hfunc)) cyhfunc = phfunc - cdef cydriver.CUfunction_attribute cyattrib = attrib.value + cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuFuncSetAttribute(cyhfunc, cyattrib, value) return (_dict_CUresult[err],) @@ -39782,7 +39782,7 @@ def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache): else: phfunc = int(CUfunction(hfunc)) cyhfunc = phfunc - cdef cydriver.CUfunc_cache cyconfig = config.value + cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuFuncSetCacheConfig(cyhfunc, cyconfig) return (_dict_CUresult[err],) @@ -41326,7 +41326,7 @@ def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig): else: phfunc = int(CUfunction(hfunc)) cyhfunc = phfunc - cdef cydriver.CUsharedconfig cyconfig = config.value + cdef cydriver.CUsharedconfig cyconfig = int(config) with nogil: err = cydriver.cuFuncSetSharedMemConfig(cyhfunc, cyconfig) return (_dict_CUresult[err],) @@ -43500,7 +43500,7 @@ def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute): else: pdevice = int(CUdevice(device)) cydevice = pdevice - cdef cydriver.CUgraphMem_attribute cyattr = attr.value + cdef cydriver.CUgraphMem_attribute cyattr = int(attr) cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, 0, is_getter=True) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -43552,7 +43552,7 @@ def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, v else: pdevice = int(CUdevice(device)) cydevice = pdevice - cdef cydriver.CUgraphMem_attribute cyattr = attr.value + cdef cydriver.CUgraphMem_attribute cyattr = int(attr) cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, value, is_getter=False) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -46117,7 +46117,7 @@ def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID): else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUkernelNodeAttrID cyattr = attr.value + cdef cydriver.CUkernelNodeAttrID cyattr = int(attr) cdef CUkernelNodeAttrValue value_out = CUkernelNodeAttrValue() with nogil: err = cydriver.cuGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) @@ -46161,7 +46161,7 @@ def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, val else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUkernelNodeAttrID cyattr = attr.value + cdef cydriver.CUkernelNodeAttrID cyattr = int(attr) cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) @@ -47573,7 +47573,7 @@ def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedCompo else: phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef - cdef cydriver.CUarray_format cyfmt = fmt.value + cdef cydriver.CUarray_format cyfmt = int(fmt) with nogil: err = cydriver.cuTexRefSetFormat(cyhTexRef, cyfmt, NumPackedComponents) return (_dict_CUresult[err],) @@ -47626,7 +47626,7 @@ def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode): else: phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef - cdef cydriver.CUaddress_mode cyam = am.value + cdef cydriver.CUaddress_mode cyam = int(am) with nogil: err = cydriver.cuTexRefSetAddressMode(cyhTexRef, dim, cyam) return (_dict_CUresult[err],) @@ -47673,7 +47673,7 @@ def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode): else: phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef - cdef cydriver.CUfilter_mode cyfm = fm.value + cdef cydriver.CUfilter_mode cyfm = int(fm) with nogil: err = cydriver.cuTexRefSetFilterMode(cyhTexRef, cyfm) return (_dict_CUresult[err],) @@ -47720,7 +47720,7 @@ def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode): else: phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef - cdef cydriver.CUfilter_mode cyfm = fm.value + cdef cydriver.CUfilter_mode cyfm = int(fm) with nogil: err = cydriver.cuTexRefSetMipmapFilterMode(cyhTexRef, cyfm) return (_dict_CUresult[err],) @@ -49435,7 +49435,7 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor ptensorRank = int(cuuint32_t(tensorRank)) cytensorRank = ptensorRank cdef CUtensorMap tensorMap = CUtensorMap() - cdef cydriver.CUtensorMapDataType cytensorDataType = tensorDataType.value + cdef cydriver.CUtensorMapDataType cytensorDataType = int(tensorDataType) cyglobalAddress = _HelperInputVoidPtr(globalAddress) cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr cdef cydriver.cuuint64_t* cyglobalDim = NULL @@ -49478,10 +49478,10 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] elif len(elementStrides) == 1: cyelementStrides = (elementStrides[0])._pvt_ptr - cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value - cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value - cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value - cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value + cdef cydriver.CUtensorMapInterleave cyinterleave = int(interleave) + cdef cydriver.CUtensorMapSwizzle cyswizzle = int(swizzle) + cdef cydriver.CUtensorMapL2promotion cyl2Promotion = int(l2Promotion) + cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = int(oobFill) with nogil: err = cydriver.cuTensorMapEncodeTiled(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cyboxDim, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) if len(globalDim) > 1 and cyglobalDim is not NULL: @@ -49792,7 +49792,7 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso ptensorRank = int(cuuint32_t(tensorRank)) cytensorRank = ptensorRank cdef CUtensorMap tensorMap = CUtensorMap() - cdef cydriver.CUtensorMapDataType cytensorDataType = tensorDataType.value + cdef cydriver.CUtensorMapDataType cytensorDataType = int(tensorDataType) cyglobalAddress = _HelperInputVoidPtr(globalAddress) cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr cdef cydriver.cuuint64_t* cyglobalDim = NULL @@ -49827,10 +49827,10 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] elif len(elementStrides) == 1: cyelementStrides = (elementStrides[0])._pvt_ptr - cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value - cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value - cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value - cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value + cdef cydriver.CUtensorMapInterleave cyinterleave = int(interleave) + cdef cydriver.CUtensorMapSwizzle cyswizzle = int(swizzle) + cdef cydriver.CUtensorMapL2promotion cyl2Promotion = int(l2Promotion) + cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = int(oobFill) with nogil: err = cydriver.cuTensorMapEncodeIm2col(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cypixelBoxLowerCorner.data(), cypixelBoxUpperCorner.data(), cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) if len(globalDim) > 1 and cyglobalDim is not NULL: @@ -50120,7 +50120,7 @@ def cuTensorMapEncodeIm2colWide(tensorDataType not None : CUtensorMapDataType, t ptensorRank = int(cuuint32_t(tensorRank)) cytensorRank = ptensorRank cdef CUtensorMap tensorMap = CUtensorMap() - cdef cydriver.CUtensorMapDataType cytensorDataType = tensorDataType.value + cdef cydriver.CUtensorMapDataType cytensorDataType = int(tensorDataType) cyglobalAddress = _HelperInputVoidPtr(globalAddress) cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr cdef cydriver.cuuint64_t* cyglobalDim = NULL @@ -50153,11 +50153,11 @@ def cuTensorMapEncodeIm2colWide(tensorDataType not None : CUtensorMapDataType, t cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] elif len(elementStrides) == 1: cyelementStrides = (elementStrides[0])._pvt_ptr - cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value - cdef cydriver.CUtensorMapIm2ColWideMode cymode = mode.value - cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value - cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value - cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value + cdef cydriver.CUtensorMapInterleave cyinterleave = int(interleave) + cdef cydriver.CUtensorMapIm2ColWideMode cymode = int(mode) + cdef cydriver.CUtensorMapSwizzle cyswizzle = int(swizzle) + cdef cydriver.CUtensorMapL2promotion cyl2Promotion = int(l2Promotion) + cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = int(oobFill) with nogil: err = cydriver.cuTensorMapEncodeIm2colWide(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cymode, cyswizzle, cyl2Promotion, cyoobFill) if len(globalDim) > 1 and cyglobalDim is not NULL: @@ -50441,7 +50441,7 @@ def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, psrcDevice = int(CUdevice(srcDevice)) cysrcDevice = psrcDevice cdef int value = 0 - cdef cydriver.CUdevice_P2PAttribute cyattrib = attrib.value + cdef cydriver.CUdevice_P2PAttribute cyattrib = int(attrib) with nogil: err = cydriver.cuDeviceGetP2PAttribute(&value, cyattrib, cysrcDevice, cydstDevice) if err != cydriver.CUDA_SUCCESS: @@ -51036,7 +51036,7 @@ def cuCoredumpGetAttribute(attrib not None : CUcoredumpSettings): -------- :py:obj:`~.cuCoredumpGetAttributeGlobal`, :py:obj:`~.cuCoredumpSetAttribute`, :py:obj:`~.cuCoredumpSetAttributeGlobal` """ - cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef cydriver.CUcoredumpSettings cyattrib = int(attrib) cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, 0, is_getter=True) cdef void* cyvalue_ptr = cyvalue.cptr cdef size_t size = cyvalue.size() @@ -51152,7 +51152,7 @@ def cuCoredumpGetAttributeGlobal(attrib not None : CUcoredumpSettings): -------- :py:obj:`~.cuCoredumpGetAttribute`, :py:obj:`~.cuCoredumpSetAttribute`, :py:obj:`~.cuCoredumpSetAttributeGlobal` """ - cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef cydriver.CUcoredumpSettings cyattrib = int(attrib) cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, 0, is_getter=True) cdef void* cyvalue_ptr = cyvalue.cptr cdef size_t size = cyvalue.size() @@ -51275,7 +51275,7 @@ def cuCoredumpSetAttribute(attrib not None : CUcoredumpSettings, value): -------- :py:obj:`~.cuCoredumpGetAttributeGlobal`, :py:obj:`~.cuCoredumpGetAttribute`, :py:obj:`~.cuCoredumpSetAttributeGlobal` """ - cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef cydriver.CUcoredumpSettings cyattrib = int(attrib) cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, value, is_getter=False) cdef void* cyvalue_ptr = cyvalue.cptr cdef size_t size = cyvalue.size() @@ -51401,7 +51401,7 @@ def cuCoredumpSetAttributeGlobal(attrib not None : CUcoredumpSettings, value): -------- :py:obj:`~.cuCoredumpGetAttribute`, :py:obj:`~.cuCoredumpGetAttributeGlobal`, :py:obj:`~.cuCoredumpSetAttribute` """ - cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef cydriver.CUcoredumpSettings cyattrib = int(attrib) cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, value, is_getter=False) cdef void* cyvalue_ptr = cyvalue.cptr cdef size_t size = cyvalue.size() @@ -51639,7 +51639,7 @@ def cuDeviceGetDevResource(device, typename not None : CUdevResourceType): pdevice = int(CUdevice(device)) cydevice = pdevice cdef CUdevResource resource = CUdevResource() - cdef cydriver.CUdevResourceType cytypename = typename.value + cdef cydriver.CUdevResourceType cytypename = int(typename) with nogil: err = cydriver.cuDeviceGetDevResource(cydevice, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: @@ -51683,7 +51683,7 @@ def cuCtxGetDevResource(hCtx, typename not None : CUdevResourceType): phCtx = int(CUcontext(hCtx)) cyhCtx = phCtx cdef CUdevResource resource = CUdevResource() - cdef cydriver.CUdevResourceType cytypename = typename.value + cdef cydriver.CUdevResourceType cytypename = int(typename) with nogil: err = cydriver.cuCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: @@ -51727,7 +51727,7 @@ def cuGreenCtxGetDevResource(hCtx, typename not None : CUdevResourceType): phCtx = int(CUgreenCtx(hCtx)) cyhCtx = phCtx cdef CUdevResource resource = CUdevResource() - cdef cydriver.CUdevResourceType cytypename = typename.value + cdef cydriver.CUdevResourceType cytypename = int(typename) with nogil: err = cydriver.cuGreenCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: @@ -53516,7 +53516,7 @@ def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDevic cypCudaDevices = calloc(cudaDeviceCount, sizeof(cydriver.CUdevice)) if cypCudaDevices is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(cydriver.CUdevice))) - cdef cydriver.CUGLDeviceList cydeviceList = deviceList.value + cdef cydriver.CUGLDeviceList cydeviceList = int(deviceList) with nogil: err = cydriver.cuGLGetDevices(&pCudaDeviceCount, cypCudaDevices, cudaDeviceCount, cydeviceList) if CUresult(err) == CUresult(0): diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx.in b/cuda_bindings/cuda/bindings/nvrtc.pyx.in index 9e565f97523..210e80cb892 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx.in @@ -143,7 +143,7 @@ def nvrtcGetErrorString(result not None : nvrtcResult): bytes Message string for the given :py:obj:`~.nvrtcResult` code. """ - cdef cynvrtc.nvrtcResult cyresult = result.value + cdef cynvrtc.nvrtcResult cyresult = int(result) with nogil: err = cynvrtc.nvrtcGetErrorString(cyresult) return (nvrtcResult.NVRTC_SUCCESS, err) diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 0e9449f6320..6993490f580 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -5985,7 +5985,7 @@ cdef class cudaChannelFormatDesc: return _dict_cudaChannelFormatKind[self._pvt_ptr[0].f] @f.setter def f(self, f not None : cudaChannelFormatKind): - self._pvt_ptr[0].f = f.value + self._pvt_ptr[0].f = int(f) {{endif}} {{endif}} {{if 'cudaArraySparseProperties.tileExtent' in found_struct}} @@ -6773,7 +6773,7 @@ cdef class cudaMemcpy3DParms: return _dict_cudaMemcpyKind[self._pvt_ptr[0].kind] @kind.setter def kind(self, kind not None : cudaMemcpyKind): - self._pvt_ptr[0].kind = kind.value + self._pvt_ptr[0].kind = int(kind) {{endif}} {{endif}} {{if 'cudaMemcpyNodeParams' in found_struct}} @@ -7505,7 +7505,7 @@ cdef class cudaAccessPolicyWindow: return _dict_cudaAccessProperty[self._pvt_ptr[0].hitProp] @hitProp.setter def hitProp(self, hitProp not None : cudaAccessProperty): - self._pvt_ptr[0].hitProp = hitProp.value + self._pvt_ptr[0].hitProp = int(hitProp) {{endif}} {{if 'cudaAccessPolicyWindow.missProp' in found_struct}} @property @@ -7515,7 +7515,7 @@ cdef class cudaAccessPolicyWindow: return _dict_cudaAccessProperty[self._pvt_ptr[0].missProp] @missProp.setter def missProp(self, missProp not None : cudaAccessProperty): - self._pvt_ptr[0].missProp = missProp.value + self._pvt_ptr[0].missProp = int(missProp) {{endif}} {{endif}} {{if 'cudaHostNodeParams' in found_struct}} @@ -8180,7 +8180,7 @@ cdef class cudaResourceDesc: return _dict_cudaResourceType[self._pvt_ptr[0].resType] @resType.setter def resType(self, resType not None : cudaResourceType): - self._pvt_ptr[0].resType = resType.value + self._pvt_ptr[0].resType = int(resType) {{endif}} {{if 'cudaResourceDesc.res' in found_struct}} @property @@ -8310,7 +8310,7 @@ cdef class cudaResourceViewDesc: return _dict_cudaResourceViewFormat[self._pvt_ptr[0].format] @format.setter def format(self, format not None : cudaResourceViewFormat): - self._pvt_ptr[0].format = format.value + self._pvt_ptr[0].format = int(format) {{endif}} {{if 'cudaResourceViewDesc.width' in found_struct}} @property @@ -8459,7 +8459,7 @@ cdef class cudaPointerAttributes: return _dict_cudaMemoryType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaMemoryType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaPointerAttributes.device' in found_struct}} @property @@ -8925,7 +8925,7 @@ cdef class cudaMemLocation: return _dict_cudaMemLocationType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaMemLocationType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaMemLocation.id' in found_struct}} @property @@ -9006,7 +9006,7 @@ cdef class cudaMemAccessDesc: return _dict_cudaMemAccessFlags[self._pvt_ptr[0].flags] @flags.setter def flags(self, flags not None : cudaMemAccessFlags): - self._pvt_ptr[0].flags = flags.value + self._pvt_ptr[0].flags = int(flags) {{endif}} {{endif}} {{if 'cudaMemPoolProps' in found_struct}} @@ -9127,7 +9127,7 @@ cdef class cudaMemPoolProps: return _dict_cudaMemAllocationType[self._pvt_ptr[0].allocType] @allocType.setter def allocType(self, allocType not None : cudaMemAllocationType): - self._pvt_ptr[0].allocType = allocType.value + self._pvt_ptr[0].allocType = int(allocType) {{endif}} {{if 'cudaMemPoolProps.handleTypes' in found_struct}} @property @@ -9137,7 +9137,7 @@ cdef class cudaMemPoolProps: return _dict_cudaMemAllocationHandleType[self._pvt_ptr[0].handleTypes] @handleTypes.setter def handleTypes(self, handleTypes not None : cudaMemAllocationHandleType): - self._pvt_ptr[0].handleTypes = handleTypes.value + self._pvt_ptr[0].handleTypes = int(handleTypes) {{endif}} {{if 'cudaMemPoolProps.location' in found_struct}} @property @@ -9676,7 +9676,7 @@ cdef class cudaMemcpyAttributes: return _dict_cudaMemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): - self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) {{endif}} {{if 'cudaMemcpyAttributes.srcLocHint' in found_struct}} @property @@ -10106,7 +10106,7 @@ cdef class cudaMemcpy3DOperand: return _dict_cudaMemcpy3DOperandType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaMemcpy3DOperandType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaMemcpy3DOperand.op' in found_struct}} @property @@ -10238,7 +10238,7 @@ cdef class cudaMemcpy3DBatchOp: return _dict_cudaMemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): - self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) {{endif}} {{if 'cudaMemcpy3DBatchOp.flags' in found_struct}} @property @@ -12472,7 +12472,7 @@ cdef class cudaExternalMemoryHandleDesc: return _dict_cudaExternalMemoryHandleType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaExternalMemoryHandleType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} @property @@ -12941,7 +12941,7 @@ cdef class cudaExternalSemaphoreHandleDesc: return _dict_cudaExternalSemaphoreHandleType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaExternalSemaphoreHandleType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} @property @@ -14720,7 +14720,7 @@ cdef class cudaConditionalNodeParams: return _dict_cudaGraphConditionalNodeType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaGraphConditionalNodeType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaConditionalNodeParams.size' in found_struct}} @property @@ -14820,7 +14820,7 @@ cdef class cudaChildGraphNodeParams: return _dict_cudaGraphChildGraphNodeOwnership[self._pvt_ptr[0].ownership] @ownership.setter def ownership(self, ownership not None : cudaGraphChildGraphNodeOwnership): - self._pvt_ptr[0].ownership = ownership.value + self._pvt_ptr[0].ownership = int(ownership) {{endif}} {{endif}} {{if 'cudaEventRecordNodeParams' in found_struct}} @@ -15184,7 +15184,7 @@ cdef class cudaGraphNodeParams: return _dict_cudaGraphNodeType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaGraphNodeType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaGraphNodeParams.reserved0' in found_struct}} @property @@ -15560,7 +15560,7 @@ cdef class cudaGraphInstantiateParams_st: return _dict_cudaGraphInstantiateResult[self._pvt_ptr[0].result_out] @result_out.setter def result_out(self, result_out not None : cudaGraphInstantiateResult): - self._pvt_ptr[0].result_out = result_out.value + self._pvt_ptr[0].result_out = int(result_out) {{endif}} {{endif}} {{if 'cudaGraphExecUpdateResultInfo_st' in found_struct}} @@ -15641,7 +15641,7 @@ cdef class cudaGraphExecUpdateResultInfo_st: return _dict_cudaGraphExecUpdateResult[self._pvt_ptr[0].result] @result.setter def result(self, result not None : cudaGraphExecUpdateResult): - self._pvt_ptr[0].result = result.value + self._pvt_ptr[0].result = int(result) {{endif}} {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} @property @@ -15945,7 +15945,7 @@ cdef class cudaGraphKernelNodeUpdate: return _dict_cudaGraphKernelNodeField[self._pvt_ptr[0].field] @field.setter def field(self, field not None : cudaGraphKernelNodeField): - self._pvt_ptr[0].field = field.value + self._pvt_ptr[0].field = int(field) {{endif}} {{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} @property @@ -16726,7 +16726,7 @@ cdef class cudaLaunchAttributeValue: return _dict_cudaSynchronizationPolicy[self._pvt_ptr[0].syncPolicy] @syncPolicy.setter def syncPolicy(self, syncPolicy not None : cudaSynchronizationPolicy): - self._pvt_ptr[0].syncPolicy = syncPolicy.value + self._pvt_ptr[0].syncPolicy = int(syncPolicy) {{endif}} {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} @property @@ -16744,7 +16744,7 @@ cdef class cudaLaunchAttributeValue: return _dict_cudaClusterSchedulingPolicy[self._pvt_ptr[0].clusterSchedulingPolicyPreference] @clusterSchedulingPolicyPreference.setter def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : cudaClusterSchedulingPolicy): - self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + self._pvt_ptr[0].clusterSchedulingPolicyPreference = int(clusterSchedulingPolicyPreference) {{endif}} {{if 'cudaLaunchAttributeValue.programmaticStreamSerializationAllowed' in found_struct}} @property @@ -16786,7 +16786,7 @@ cdef class cudaLaunchAttributeValue: return _dict_cudaLaunchMemSyncDomain[self._pvt_ptr[0].memSyncDomain] @memSyncDomain.setter def memSyncDomain(self, memSyncDomain not None : cudaLaunchMemSyncDomain): - self._pvt_ptr[0].memSyncDomain = memSyncDomain.value + self._pvt_ptr[0].memSyncDomain = int(memSyncDomain) {{endif}} {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} @property @@ -16883,7 +16883,7 @@ cdef class cudaLaunchAttribute_st: return _dict_cudaLaunchAttributeID[self._pvt_ptr[0].id] @id.setter def id(self, id not None : cudaLaunchAttributeID): - self._pvt_ptr[0].id = id.value + self._pvt_ptr[0].id = int(id) {{endif}} {{if 'cudaLaunchAttribute_st.val' in found_struct}} @property @@ -17054,7 +17054,7 @@ cdef class cudaAsyncNotificationInfo: return _dict_cudaAsyncNotificationType[self._pvt_ptr[0].type] @type.setter def type(self, type not None : cudaAsyncNotificationType): - self._pvt_ptr[0].type = type.value + self._pvt_ptr[0].type = int(type) {{endif}} {{if 'cudaAsyncNotificationInfo.info' in found_struct}} @property @@ -17232,7 +17232,7 @@ cdef class cudaTextureDesc: return [_dict_cudaTextureAddressMode[_x] if _x in _dict_cudaTextureAddressMode else None for _x in list(self._pvt_ptr[0].addressMode)] @addressMode.setter def addressMode(self, addressMode): - self._pvt_ptr[0].addressMode = [_x.value for _x in addressMode] + self._pvt_ptr[0].addressMode = [int(_x) for _x in addressMode] {{endif}} {{if 'cudaTextureDesc.filterMode' in found_struct}} @property @@ -17242,7 +17242,7 @@ cdef class cudaTextureDesc: return _dict_cudaTextureFilterMode[self._pvt_ptr[0].filterMode] @filterMode.setter def filterMode(self, filterMode not None : cudaTextureFilterMode): - self._pvt_ptr[0].filterMode = filterMode.value + self._pvt_ptr[0].filterMode = int(filterMode) {{endif}} {{if 'cudaTextureDesc.readMode' in found_struct}} @property @@ -17252,7 +17252,7 @@ cdef class cudaTextureDesc: return _dict_cudaTextureReadMode[self._pvt_ptr[0].readMode] @readMode.setter def readMode(self, readMode not None : cudaTextureReadMode): - self._pvt_ptr[0].readMode = readMode.value + self._pvt_ptr[0].readMode = int(readMode) {{endif}} {{if 'cudaTextureDesc.sRGB' in found_struct}} @property @@ -17294,7 +17294,7 @@ cdef class cudaTextureDesc: return _dict_cudaTextureFilterMode[self._pvt_ptr[0].mipmapFilterMode] @mipmapFilterMode.setter def mipmapFilterMode(self, mipmapFilterMode not None : cudaTextureFilterMode): - self._pvt_ptr[0].mipmapFilterMode = mipmapFilterMode.value + self._pvt_ptr[0].mipmapFilterMode = int(mipmapFilterMode) {{endif}} {{if 'cudaTextureDesc.mipmapLevelBias' in found_struct}} @property @@ -17707,7 +17707,7 @@ cdef class cudaEglFrame_st: return _dict_cudaEglFrameType[self._pvt_ptr[0].frameType] @frameType.setter def frameType(self, frameType not None : cudaEglFrameType): - self._pvt_ptr[0].frameType = frameType.value + self._pvt_ptr[0].frameType = int(frameType) {{endif}} {{if True}} @property @@ -17717,7 +17717,7 @@ cdef class cudaEglFrame_st: return _dict_cudaEglColorFormat[self._pvt_ptr[0].eglColorFormat] @eglColorFormat.setter def eglColorFormat(self, eglColorFormat not None : cudaEglColorFormat): - self._pvt_ptr[0].eglColorFormat = eglColorFormat.value + self._pvt_ptr[0].eglColorFormat = int(eglColorFormat) {{endif}} {{endif}} {{if 'cudaGraphConditionalHandle' in found_types}} @@ -18177,7 +18177,7 @@ def cudaDeviceSetLimit(limit not None : cudaLimit, size_t value): -------- :py:obj:`~.cudaDeviceGetLimit`, :py:obj:`~.cuCtxSetLimit` """ - cdef cyruntime.cudaLimit cylimit = limit.value + cdef cyruntime.cudaLimit cylimit = int(limit) with nogil: err = cyruntime.cudaDeviceSetLimit(cylimit, value) return (_dict_cudaError_t[err],) @@ -18235,7 +18235,7 @@ def cudaDeviceGetLimit(limit not None : cudaLimit): :py:obj:`~.cudaDeviceSetLimit`, :py:obj:`~.cuCtxGetLimit` """ cdef size_t pValue = 0 - cdef cyruntime.cudaLimit cylimit = limit.value + cdef cyruntime.cudaLimit cylimit = int(limit) with nogil: err = cyruntime.cudaDeviceGetLimit(&pValue, cylimit) if err != cyruntime.cudaSuccess: @@ -18430,7 +18430,7 @@ def cudaDeviceSetCacheConfig(cacheConfig not None : cudaFuncCache): -------- :py:obj:`~.cudaDeviceGetCacheConfig`, :py:obj:`~.cudaFuncSetCacheConfig (C API)`, cudaFuncSetCacheConfig (C++ API), :py:obj:`~.cuCtxSetCacheConfig` """ - cdef cyruntime.cudaFuncCache cycacheConfig = cacheConfig.value + cdef cyruntime.cudaFuncCache cycacheConfig = int(cacheConfig) with nogil: err = cyruntime.cudaDeviceSetCacheConfig(cycacheConfig) return (_dict_cudaError_t[err],) @@ -18822,8 +18822,8 @@ def cudaDeviceFlushGPUDirectRDMAWrites(target not None : cudaFlushGPUDirectRDMAW -------- :py:obj:`~.cuFlushGPUDirectRDMAWrites` """ - cdef cyruntime.cudaFlushGPUDirectRDMAWritesTarget cytarget = target.value - cdef cyruntime.cudaFlushGPUDirectRDMAWritesScope cyscope = scope.value + cdef cyruntime.cudaFlushGPUDirectRDMAWritesTarget cytarget = int(target) + cdef cyruntime.cudaFlushGPUDirectRDMAWritesScope cyscope = int(scope) with nogil: err = cyruntime.cudaDeviceFlushGPUDirectRDMAWrites(cytarget, cyscope) return (_dict_cudaError_t[err],) @@ -19053,7 +19053,7 @@ def cudaDeviceSetSharedMemConfig(config not None : cudaSharedMemConfig): -------- :py:obj:`~.cudaDeviceSetCacheConfig`, :py:obj:`~.cudaDeviceGetCacheConfig`, :py:obj:`~.cudaDeviceGetSharedMemConfig`, :py:obj:`~.cudaFuncSetCacheConfig`, :py:obj:`~.cuCtxSetSharedMemConfig` """ - cdef cyruntime.cudaSharedMemConfig cyconfig = config.value + cdef cyruntime.cudaSharedMemConfig cyconfig = int(config) with nogil: err = cyruntime.cudaDeviceSetSharedMemConfig(cyconfig) return (_dict_cudaError_t[err],) @@ -19142,7 +19142,7 @@ def cudaGetErrorName(error not None : cudaError_t): -------- :py:obj:`~.cudaGetErrorString`, :py:obj:`~.cudaGetLastError`, :py:obj:`~.cudaPeekAtLastError`, :py:obj:`~.cudaError`, :py:obj:`~.cuGetErrorName` """ - cdef cyruntime.cudaError_t cyerror = error.value + cdef cyruntime.cudaError_t cyerror = int(error) with nogil: err = cyruntime.cudaGetErrorName(cyerror) return (cudaError_t.cudaSuccess, err) @@ -19173,7 +19173,7 @@ def cudaGetErrorString(error not None : cudaError_t): -------- :py:obj:`~.cudaGetErrorName`, :py:obj:`~.cudaGetLastError`, :py:obj:`~.cudaPeekAtLastError`, :py:obj:`~.cudaError`, :py:obj:`~.cuGetErrorString` """ - cdef cyruntime.cudaError_t cyerror = error.value + cdef cyruntime.cudaError_t cyerror = int(error) with nogil: err = cyruntime.cudaGetErrorString(cyerror) return (cudaError_t.cudaSuccess, err) @@ -19908,7 +19908,7 @@ def cudaDeviceGetAttribute(attr not None : cudaDeviceAttr, int device): :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cuDeviceGetAttribute` """ cdef int value = 0 - cdef cyruntime.cudaDeviceAttr cyattr = attr.value + cdef cyruntime.cudaDeviceAttr cyattr = int(attr) with nogil: err = cyruntime.cudaDeviceGetAttribute(&value, cyattr, device) if err != cyruntime.cudaSuccess: @@ -20169,7 +20169,7 @@ def cudaDeviceGetP2PAttribute(attr not None : cudaDeviceP2PAttr, int srcDevice, :py:obj:`~.cudaDeviceEnablePeerAccess`, :py:obj:`~.cudaDeviceDisablePeerAccess`, :py:obj:`~.cudaDeviceCanAccessPeer`, :py:obj:`~.cuDeviceGetP2PAttribute` """ cdef int value = 0 - cdef cyruntime.cudaDeviceP2PAttr cyattr = attr.value + cdef cyruntime.cudaDeviceP2PAttr cyattr = int(attr) with nogil: err = cyruntime.cudaDeviceGetP2PAttribute(&value, cyattr, srcDevice, dstDevice) if err != cyruntime.cudaSuccess: @@ -20898,7 +20898,7 @@ def cudaStreamGetAttribute(hStream, attr not None : cudaStreamAttrID): else: phStream = int(cudaStream_t(hStream)) cyhStream = phStream - cdef cyruntime.cudaStreamAttrID cyattr = attr.value + cdef cyruntime.cudaStreamAttrID cyattr = int(attr) cdef cudaStreamAttrValue value_out = cudaStreamAttrValue() with nogil: err = cyruntime.cudaStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) @@ -20943,7 +20943,7 @@ def cudaStreamSetAttribute(hStream, attr not None : cudaStreamAttrID, value : Op else: phStream = int(cudaStream_t(hStream)) cyhStream = phStream - cdef cyruntime.cudaStreamAttrID cyattr = attr.value + cdef cyruntime.cudaStreamAttrID cyattr = int(attr) cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cyruntime.cudaStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) @@ -21405,7 +21405,7 @@ def cudaStreamBeginCapture(stream, mode not None : cudaStreamCaptureMode): else: pstream = int(cudaStream_t(stream)) cystream = pstream - cdef cyruntime.cudaStreamCaptureMode cymode = mode.value + cdef cyruntime.cudaStreamCaptureMode cymode = int(mode) with nogil: err = cyruntime.cudaStreamBeginCapture(cystream, cymode) return (_dict_cudaError_t[err],) @@ -21506,7 +21506,7 @@ def cudaStreamBeginCaptureToGraph(stream, graph, dependencies : Optional[tuple[c elif len(dependencyData) == 1: cydependencyData = (dependencyData[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaStreamCaptureMode cymode = mode.value + cdef cyruntime.cudaStreamCaptureMode cymode = int(mode) with nogil: err = cyruntime.cudaStreamBeginCaptureToGraph(cystream, cygraph, cydependencies, cydependencyData, numDependencies, cymode) if len(dependencies) > 1 and cydependencies is not NULL: @@ -21582,7 +21582,7 @@ def cudaThreadExchangeStreamCaptureMode(mode not None : cudaStreamCaptureMode): -------- :py:obj:`~.cudaStreamBeginCapture` """ - cdef cyruntime.cudaStreamCaptureMode cymode = mode.value + cdef cyruntime.cudaStreamCaptureMode cymode = int(mode) with nogil: err = cyruntime.cudaThreadExchangeStreamCaptureMode(&cymode) if err != cyruntime.cudaSuccess: @@ -23374,7 +23374,7 @@ def cudaFuncSetCacheConfig(func, cacheConfig not None : cudaFuncCache): """ cyfunc = _HelperInputVoidPtr(func) cdef void* cyfunc_ptr = cyfunc.cptr - cdef cyruntime.cudaFuncCache cycacheConfig = cacheConfig.value + cdef cyruntime.cudaFuncCache cycacheConfig = int(cacheConfig) with nogil: err = cyruntime.cudaFuncSetCacheConfig(cyfunc_ptr, cycacheConfig) return (_dict_cudaError_t[err],) @@ -23504,7 +23504,7 @@ def cudaFuncSetAttribute(func, attr not None : cudaFuncAttribute, int value): """ cyfunc = _HelperInputVoidPtr(func) cdef void* cyfunc_ptr = cyfunc.cptr - cdef cyruntime.cudaFuncAttribute cyattr = attr.value + cdef cyruntime.cudaFuncAttribute cyattr = int(attr) with nogil: err = cyruntime.cudaFuncSetAttribute(cyfunc_ptr, cyattr, value) return (_dict_cudaError_t[err],) @@ -23682,7 +23682,7 @@ def cudaFuncSetSharedMemConfig(func, config not None : cudaSharedMemConfig): """ cyfunc = _HelperInputVoidPtr(func) cdef void* cyfunc_ptr = cyfunc.cptr - cdef cyruntime.cudaSharedMemConfig cyconfig = config.value + cdef cyruntime.cudaSharedMemConfig cyconfig = int(config) with nogil: err = cyruntime.cudaFuncSetSharedMemConfig(cyfunc_ptr, cyconfig) return (_dict_cudaError_t[err],) @@ -25682,7 +25682,7 @@ def cudaMemcpy(dst, src, size_t count, kind not None : cudaMemcpyKind): cdef void* cydst_ptr = cydst.cptr cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy(cydst_ptr, cysrc_ptr, count, cykind) return (_dict_cudaError_t[err],) @@ -25790,7 +25790,7 @@ def cudaMemcpy2D(dst, size_t dpitch, src, size_t spitch, size_t width, size_t he cdef void* cydst_ptr = cydst.cptr cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2D(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind) return (_dict_cudaError_t[err],) @@ -25857,7 +25857,7 @@ def cudaMemcpy2DToArray(dst, size_t wOffset, size_t hOffset, src, size_t spitch, cydst = pdst cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DToArray(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind) return (_dict_cudaError_t[err],) @@ -25924,7 +25924,7 @@ def cudaMemcpy2DFromArray(dst, size_t dpitch, src, size_t wOffset, size_t hOffse cysrc = psrc cydst = _HelperInputVoidPtr(dst) cdef void* cydst_ptr = cydst.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DFromArray(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind) return (_dict_cudaError_t[err],) @@ -25997,7 +25997,7 @@ def cudaMemcpy2DArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, siz else: pdst = int(cudaArray_t(dst)) cydst = pdst - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, width, height, cykind) return (_dict_cudaError_t[err],) @@ -26067,7 +26067,7 @@ def cudaMemcpyAsync(dst, src, size_t count, kind not None : cudaMemcpyKind, stre cdef void* cydst_ptr = cydst.cptr cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyAsync(cydst_ptr, cysrc_ptr, count, cykind, cystream) return (_dict_cudaError_t[err],) @@ -26506,7 +26506,7 @@ def cudaMemcpy2DAsync(dst, size_t dpitch, src, size_t spitch, size_t width, size cdef void* cydst_ptr = cydst.cptr cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DAsync(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind, cystream) return (_dict_cudaError_t[err],) @@ -26594,7 +26594,7 @@ def cudaMemcpy2DToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t sp cydst = pdst cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind, cystream) return (_dict_cudaError_t[err],) @@ -26681,7 +26681,7 @@ def cudaMemcpy2DFromArrayAsync(dst, size_t dpitch, src, size_t wOffset, size_t h cysrc = psrc cydst = _HelperInputVoidPtr(dst) cdef void* cydst_ptr = cydst.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DFromArrayAsync(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind, cystream) return (_dict_cudaError_t[err],) @@ -27381,7 +27381,7 @@ def cudaMemAdvise(devPtr, size_t count, advice not None : cudaMemoryAdvise, int """ cydevPtr = _HelperInputVoidPtr(devPtr) cdef void* cydevPtr_ptr = cydevPtr.cptr - cdef cyruntime.cudaMemoryAdvise cyadvice = advice.value + cdef cyruntime.cudaMemoryAdvise cyadvice = int(advice) with nogil: err = cyruntime.cudaMemAdvise(cydevPtr_ptr, count, cyadvice, device) return (_dict_cudaError_t[err],) @@ -27578,7 +27578,7 @@ def cudaMemAdvise_v2(devPtr, size_t count, advice not None : cudaMemoryAdvise, l """ cydevPtr = _HelperInputVoidPtr(devPtr) cdef void* cydevPtr_ptr = cydevPtr.cptr - cdef cyruntime.cudaMemoryAdvise cyadvice = advice.value + cdef cyruntime.cudaMemoryAdvise cyadvice = int(advice) with nogil: err = cyruntime.cudaMemAdvise_v2(cydevPtr_ptr, count, cyadvice, location._pvt_ptr[0]) return (_dict_cudaError_t[err],) @@ -27724,7 +27724,7 @@ def cudaMemRangeGetAttribute(size_t dataSize, attribute not None : cudaMemRangeA """ cdef _HelperCUmem_range_attribute cydata = _HelperCUmem_range_attribute(attribute, dataSize) cdef void* cydata_ptr = cydata.cptr - cdef cyruntime.cudaMemRangeAttribute cyattribute = attribute.value + cdef cyruntime.cudaMemRangeAttribute cyattribute = int(attribute) cydevPtr = _HelperInputVoidPtr(devPtr) cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: @@ -27803,7 +27803,7 @@ def cudaMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : O cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) cdef void** cyvoidStarHelper_ptr = voidStarHelperdata.cptr cdef vector[size_t] cydataSizes = dataSizes - cdef vector[cyruntime.cudaMemRangeAttribute] cyattributes = [pyattributes.value for pyattributes in (attributes)] + cdef vector[cyruntime.cudaMemRangeAttribute] cyattributes = [int(pyattributes) for pyattributes in (attributes)] if numAttributes > len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes)) if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) cydevPtr = _HelperInputVoidPtr(devPtr) @@ -27868,7 +27868,7 @@ def cudaMemcpyToArray(dst, size_t wOffset, size_t hOffset, src, size_t count, ki cydst = pdst cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyToArray(cydst, wOffset, hOffset, cysrc_ptr, count, cykind) return (_dict_cudaError_t[err],) @@ -27927,7 +27927,7 @@ def cudaMemcpyFromArray(dst, src, size_t wOffset, size_t hOffset, size_t count, cysrc = psrc cydst = _HelperInputVoidPtr(dst) cdef void* cydst_ptr = cydst.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyFromArray(cydst_ptr, cysrc, wOffset, hOffset, count, cykind) return (_dict_cudaError_t[err],) @@ -27997,7 +27997,7 @@ def cudaMemcpyArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, size_ else: pdst = int(cudaArray_t(dst)) cydst = pdst - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, count, cykind) return (_dict_cudaError_t[err],) @@ -28073,7 +28073,7 @@ def cudaMemcpyToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t coun cydst = pdst cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, count, cykind, cystream) return (_dict_cudaError_t[err],) @@ -28149,7 +28149,7 @@ def cudaMemcpyFromArrayAsync(dst, src, size_t wOffset, size_t hOffset, size_t co cysrc = psrc cydst = _HelperInputVoidPtr(dst) cdef void* cydst_ptr = cydst.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyFromArrayAsync(cydst_ptr, cysrc, wOffset, hOffset, count, cykind, cystream) return (_dict_cudaError_t[err],) @@ -28374,7 +28374,7 @@ def cudaMemPoolSetAttribute(memPool, attr not None : cudaMemPoolAttr, value): else: pmemPool = int(cudaMemPool_t(memPool)) cymemPool = pmemPool - cdef cyruntime.cudaMemPoolAttr cyattr = attr.value + cdef cyruntime.cudaMemPoolAttr cyattr = int(attr) cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, value, is_getter=False) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -28456,7 +28456,7 @@ def cudaMemPoolGetAttribute(memPool, attr not None : cudaMemPoolAttr): else: pmemPool = int(cudaMemPool_t(memPool)) cymemPool = pmemPool - cdef cyruntime.cudaMemPoolAttr cyattr = attr.value + cdef cyruntime.cudaMemPoolAttr cyattr = int(attr) cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, 0, is_getter=True) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -28793,7 +28793,7 @@ def cudaMemPoolExportToShareableHandle(memPool, handleType not None : cudaMemAll cymemPool = pmemPool cdef _HelperCUmemAllocationHandleType cyshareableHandle = _HelperCUmemAllocationHandleType(handleType) cdef void* cyshareableHandle_ptr = cyshareableHandle.cptr - cdef cyruntime.cudaMemAllocationHandleType cyhandleType = handleType.value + cdef cyruntime.cudaMemAllocationHandleType cyhandleType = int(handleType) with nogil: err = cyruntime.cudaMemPoolExportToShareableHandle(cyshareableHandle_ptr, cymemPool, cyhandleType, flags) if err != cyruntime.cudaSuccess: @@ -28837,7 +28837,7 @@ def cudaMemPoolImportFromShareableHandle(shareableHandle, handleType not None : cdef cudaMemPool_t memPool = cudaMemPool_t() cyshareableHandle = _HelperInputVoidPtr(shareableHandle) cdef void* cyshareableHandle_ptr = cyshareableHandle.cptr - cdef cyruntime.cudaMemAllocationHandleType cyhandleType = handleType.value + cdef cyruntime.cudaMemAllocationHandleType cyhandleType = int(handleType) with nogil: err = cyruntime.cudaMemPoolImportFromShareableHandle(memPool._pvt_ptr, cyshareableHandle_ptr, cyhandleType, flags) if err != cyruntime.cudaSuccess: @@ -29575,7 +29575,7 @@ def cudaCreateChannelDesc(int x, int y, int z, int w, f not None : cudaChannelFo -------- cudaCreateChannelDesc (C++ API), :py:obj:`~.cudaGetChannelDesc`, :py:obj:`~.cudaCreateTextureObject`, :py:obj:`~.cudaCreateSurfaceObject` """ - cdef cyruntime.cudaChannelFormatKind cyf = f.value + cdef cyruntime.cudaChannelFormatKind cyf = int(f) with nogil: err = cyruntime.cudaCreateChannelDesc(x, y, z, w, cyf) cdef cudaChannelFormatDesc wrapper = cudaChannelFormatDesc() @@ -30494,7 +30494,7 @@ def cudaGraphKernelNodeGetAttribute(hNode, attr not None : cudaKernelNodeAttrID) else: phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode - cdef cyruntime.cudaKernelNodeAttrID cyattr = attr.value + cdef cyruntime.cudaKernelNodeAttrID cyattr = int(attr) cdef cudaKernelNodeAttrValue value_out = cudaKernelNodeAttrValue() with nogil: err = cyruntime.cudaGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) @@ -30538,7 +30538,7 @@ def cudaGraphKernelNodeSetAttribute(hNode, attr not None : cudaKernelNodeAttrID, else: phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode - cdef cyruntime.cudaKernelNodeAttrID cyattr = attr.value + cdef cyruntime.cudaKernelNodeAttrID cyattr = int(attr) cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cyruntime.cudaGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) @@ -30706,7 +30706,7 @@ def cudaGraphAddMemcpyNode1D(graph, pDependencies : Optional[tuple[cudaGraphNode cdef void* cydst_ptr = cydst.cptr cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaGraphAddMemcpyNode1D(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cydst_ptr, cysrc_ptr, count, cykind) if len(pDependencies) > 1 and cypDependencies is not NULL: @@ -30850,7 +30850,7 @@ def cudaGraphMemcpyNodeSetParams1D(node, dst, src, size_t count, kind not None : cdef void* cydst_ptr = cydst.cptr cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaGraphMemcpyNodeSetParams1D(cynode, cydst_ptr, cysrc_ptr, count, cykind) return (_dict_cudaError_t[err],) @@ -32352,7 +32352,7 @@ def cudaDeviceGetGraphMemAttribute(int device, attr not None : cudaGraphMemAttri -------- :py:obj:`~.cudaDeviceSetGraphMemAttribute`, :py:obj:`~.cudaGraphAddMemAllocNode`, :py:obj:`~.cudaGraphAddMemFreeNode`, :py:obj:`~.cudaDeviceGraphMemTrim`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync` """ - cdef cyruntime.cudaGraphMemAttributeType cyattr = attr.value + cdef cyruntime.cudaGraphMemAttributeType cyattr = int(attr) cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, 0, is_getter=True) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -32396,7 +32396,7 @@ def cudaDeviceSetGraphMemAttribute(int device, attr not None : cudaGraphMemAttri -------- :py:obj:`~.cudaDeviceGetGraphMemAttribute`, :py:obj:`~.cudaGraphAddMemAllocNode`, :py:obj:`~.cudaGraphAddMemFreeNode`, :py:obj:`~.cudaDeviceGraphMemTrim`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync` """ - cdef cyruntime.cudaGraphMemAttributeType cyattr = attr.value + cdef cyruntime.cudaGraphMemAttributeType cyattr = int(attr) cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, value, is_getter=False) cdef void* cyvalue_ptr = cyvalue.cptr with nogil: @@ -34105,7 +34105,7 @@ def cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, size_t count, cdef void* cydst_ptr = cydst.cptr cysrc = _HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr - cdef cyruntime.cudaMemcpyKind cykind = kind.value + cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaGraphExecMemcpyNodeSetParams1D(cyhGraphExec, cynode, cydst_ptr, cysrc_ptr, count, cykind) return (_dict_cudaError_t[err],) @@ -35937,13 +35937,13 @@ def cudaLibraryLoadData(code, jitOptions : Optional[tuple[cudaJitOption] | list[ cdef cudaLibrary_t library = cudaLibrary_t() cycode = _HelperInputVoidPtr(code) cdef void* cycode_ptr = cycode.cptr - cdef vector[cyruntime.cudaJitOption] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + cdef vector[cyruntime.cudaJitOption] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)] pylist = [_HelperCudaJitOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) - cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)] pylist = [_HelperCudaLibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr @@ -36034,13 +36034,13 @@ def cudaLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[cudaJitO if not all(isinstance(_x, (cudaJitOption)) for _x in jitOptions): raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cyruntime.cudaJitOption] or list[cyruntime.cudaJitOption]") cdef cudaLibrary_t library = cudaLibrary_t() - cdef vector[cyruntime.cudaJitOption] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + cdef vector[cyruntime.cudaJitOption] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)] pylist = [_HelperCudaJitOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) - cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)] pylist = [_HelperCudaLibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr @@ -36477,7 +36477,7 @@ def cudaKernelSetAttributeForDevice(kernel, attr not None : cudaFuncAttribute, i else: pkernel = int(cudaKernel_t(kernel)) cykernel = pkernel - cdef cyruntime.cudaFuncAttribute cyattr = attr.value + cdef cyruntime.cudaFuncAttribute cyattr = int(attr) with nogil: err = cyruntime.cudaKernelSetAttributeForDevice(cykernel, cyattr, value, device) return (_dict_cudaError_t[err],) @@ -37420,7 +37420,7 @@ def cudaGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : cudaGLD cypCudaDevices = calloc(cudaDeviceCount, sizeof(int)) if cypCudaDevices is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(int))) - cdef cyruntime.cudaGLDeviceList cydeviceList = deviceList.value + cdef cyruntime.cudaGLDeviceList cydeviceList = int(deviceList) with nogil: err = cyruntime.cudaGLGetDevices(&pCudaDeviceCount, cypCudaDevices, cudaDeviceCount, cydeviceList) if cudaError_t(err) == cudaError_t(0):