diff --git a/cuda_bindings/cuda/bindings/_internal/nvml.pxd b/cuda_bindings/cuda/bindings/_internal/nvml.pxd index 40805378a8..2a725ade74 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from ..cynvml cimport * @@ -139,6 +139,7 @@ cdef nvmlReturn_t _nvmlDeviceGetDriverModel_v2(nvmlDevice_t device, nvmlDriverMo cdef nvmlReturn_t _nvmlDeviceGetVbiosVersion(nvmlDevice_t device, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridgeChipHierarchy_t* bridgeHierarchy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceGetRunningProcessDetailList(nvmlDevice_t device, nvmlProcessDetailList_t* plist) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceOnSameBoard(nvmlDevice_t device1, nvmlDevice_t device2, int* onSameBoard) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil @@ -354,3 +355,10 @@ cdef nvmlReturn_t _nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts(nvmlDevice_t cdef nvmlReturn_t _nvmlDeviceGetUnrepairableMemoryFlag_v1(nvmlDevice_t device, nvmlUnrepairableMemoryStatus_v1_t* unrepairableMemoryStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCounterList_v1_t* counterList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceVgpuForceGspUnload(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerLog_v2(nvmlDevice_t device, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerLog_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceSetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx index 28f0919423..51f6e8205b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t @@ -188,6 +188,7 @@ cdef void* __nvmlDeviceGetDriverModel_v2 = NULL cdef void* __nvmlDeviceGetVbiosVersion = NULL cdef void* __nvmlDeviceGetBridgeChipInfo = NULL cdef void* __nvmlDeviceGetComputeRunningProcesses_v3 = NULL +cdef void* __nvmlDeviceGetGraphicsRunningProcesses_v3 = NULL cdef void* __nvmlDeviceGetMPSComputeRunningProcesses_v3 = NULL cdef void* __nvmlDeviceGetRunningProcessDetailList = NULL cdef void* __nvmlDeviceOnSameBoard = NULL @@ -403,6 +404,13 @@ cdef void* __nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts = NULL cdef void* __nvmlDeviceGetUnrepairableMemoryFlag_v1 = NULL cdef void* __nvmlDeviceReadPRMCounters_v1 = NULL cdef void* __nvmlDeviceSetRusdSettings_v1 = NULL +cdef void* __nvmlDeviceVgpuForceGspUnload = NULL +cdef void* __nvmlDeviceGetVgpuSchedulerState_v2 = NULL +cdef void* __nvmlGpuInstanceGetVgpuSchedulerState_v2 = NULL +cdef void* __nvmlDeviceGetVgpuSchedulerLog_v2 = NULL +cdef void* __nvmlGpuInstanceGetVgpuSchedulerLog_v2 = NULL +cdef void* __nvmlDeviceSetVgpuSchedulerState_v2 = NULL +cdef void* __nvmlGpuInstanceSetVgpuSchedulerState_v2 = NULL cdef void* load_library() except* with gil: @@ -1316,6 +1324,13 @@ cdef int _init_nvml() except -1 nogil: handle = load_library() __nvmlDeviceGetComputeRunningProcesses_v3 = dlsym(handle, 'nvmlDeviceGetComputeRunningProcesses_v3') + global __nvmlDeviceGetGraphicsRunningProcesses_v3 + __nvmlDeviceGetGraphicsRunningProcesses_v3 = dlsym(RTLD_DEFAULT, 'nvmlDeviceGetGraphicsRunningProcesses_v3') + if __nvmlDeviceGetGraphicsRunningProcesses_v3 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetGraphicsRunningProcesses_v3 = dlsym(handle, 'nvmlDeviceGetGraphicsRunningProcesses_v3') + global __nvmlDeviceGetMPSComputeRunningProcesses_v3 __nvmlDeviceGetMPSComputeRunningProcesses_v3 = dlsym(RTLD_DEFAULT, 'nvmlDeviceGetMPSComputeRunningProcesses_v3') if __nvmlDeviceGetMPSComputeRunningProcesses_v3 == NULL: @@ -2821,6 +2836,55 @@ cdef int _init_nvml() except -1 nogil: handle = load_library() __nvmlDeviceSetRusdSettings_v1 = dlsym(handle, 'nvmlDeviceSetRusdSettings_v1') + global __nvmlDeviceVgpuForceGspUnload + __nvmlDeviceVgpuForceGspUnload = dlsym(RTLD_DEFAULT, 'nvmlDeviceVgpuForceGspUnload') + if __nvmlDeviceVgpuForceGspUnload == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceVgpuForceGspUnload = dlsym(handle, 'nvmlDeviceVgpuForceGspUnload') + + global __nvmlDeviceGetVgpuSchedulerState_v2 + __nvmlDeviceGetVgpuSchedulerState_v2 = dlsym(RTLD_DEFAULT, 'nvmlDeviceGetVgpuSchedulerState_v2') + if __nvmlDeviceGetVgpuSchedulerState_v2 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetVgpuSchedulerState_v2 = dlsym(handle, 'nvmlDeviceGetVgpuSchedulerState_v2') + + global __nvmlGpuInstanceGetVgpuSchedulerState_v2 + __nvmlGpuInstanceGetVgpuSchedulerState_v2 = dlsym(RTLD_DEFAULT, 'nvmlGpuInstanceGetVgpuSchedulerState_v2') + if __nvmlGpuInstanceGetVgpuSchedulerState_v2 == NULL: + if handle == NULL: + handle = load_library() + __nvmlGpuInstanceGetVgpuSchedulerState_v2 = dlsym(handle, 'nvmlGpuInstanceGetVgpuSchedulerState_v2') + + global __nvmlDeviceGetVgpuSchedulerLog_v2 + __nvmlDeviceGetVgpuSchedulerLog_v2 = dlsym(RTLD_DEFAULT, 'nvmlDeviceGetVgpuSchedulerLog_v2') + if __nvmlDeviceGetVgpuSchedulerLog_v2 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetVgpuSchedulerLog_v2 = dlsym(handle, 'nvmlDeviceGetVgpuSchedulerLog_v2') + + global __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + __nvmlGpuInstanceGetVgpuSchedulerLog_v2 = dlsym(RTLD_DEFAULT, 'nvmlGpuInstanceGetVgpuSchedulerLog_v2') + if __nvmlGpuInstanceGetVgpuSchedulerLog_v2 == NULL: + if handle == NULL: + handle = load_library() + __nvmlGpuInstanceGetVgpuSchedulerLog_v2 = dlsym(handle, 'nvmlGpuInstanceGetVgpuSchedulerLog_v2') + + global __nvmlDeviceSetVgpuSchedulerState_v2 + __nvmlDeviceSetVgpuSchedulerState_v2 = dlsym(RTLD_DEFAULT, 'nvmlDeviceSetVgpuSchedulerState_v2') + if __nvmlDeviceSetVgpuSchedulerState_v2 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceSetVgpuSchedulerState_v2 = dlsym(handle, 'nvmlDeviceSetVgpuSchedulerState_v2') + + global __nvmlGpuInstanceSetVgpuSchedulerState_v2 + __nvmlGpuInstanceSetVgpuSchedulerState_v2 = dlsym(RTLD_DEFAULT, 'nvmlGpuInstanceSetVgpuSchedulerState_v2') + if __nvmlGpuInstanceSetVgpuSchedulerState_v2 == NULL: + if handle == NULL: + handle = load_library() + __nvmlGpuInstanceSetVgpuSchedulerState_v2 = dlsym(handle, 'nvmlGpuInstanceSetVgpuSchedulerState_v2') + __py_nvml_init = True return 0 @@ -3227,6 +3291,9 @@ cpdef dict _inspect_function_pointers(): global __nvmlDeviceGetComputeRunningProcesses_v3 data["__nvmlDeviceGetComputeRunningProcesses_v3"] = __nvmlDeviceGetComputeRunningProcesses_v3 + global __nvmlDeviceGetGraphicsRunningProcesses_v3 + data["__nvmlDeviceGetGraphicsRunningProcesses_v3"] = __nvmlDeviceGetGraphicsRunningProcesses_v3 + global __nvmlDeviceGetMPSComputeRunningProcesses_v3 data["__nvmlDeviceGetMPSComputeRunningProcesses_v3"] = __nvmlDeviceGetMPSComputeRunningProcesses_v3 @@ -3872,6 +3939,27 @@ cpdef dict _inspect_function_pointers(): global __nvmlDeviceSetRusdSettings_v1 data["__nvmlDeviceSetRusdSettings_v1"] = __nvmlDeviceSetRusdSettings_v1 + global __nvmlDeviceVgpuForceGspUnload + data["__nvmlDeviceVgpuForceGspUnload"] = __nvmlDeviceVgpuForceGspUnload + + global __nvmlDeviceGetVgpuSchedulerState_v2 + data["__nvmlDeviceGetVgpuSchedulerState_v2"] = __nvmlDeviceGetVgpuSchedulerState_v2 + + global __nvmlGpuInstanceGetVgpuSchedulerState_v2 + data["__nvmlGpuInstanceGetVgpuSchedulerState_v2"] = __nvmlGpuInstanceGetVgpuSchedulerState_v2 + + global __nvmlDeviceGetVgpuSchedulerLog_v2 + data["__nvmlDeviceGetVgpuSchedulerLog_v2"] = __nvmlDeviceGetVgpuSchedulerLog_v2 + + global __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + data["__nvmlGpuInstanceGetVgpuSchedulerLog_v2"] = __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + + global __nvmlDeviceSetVgpuSchedulerState_v2 + data["__nvmlDeviceSetVgpuSchedulerState_v2"] = __nvmlDeviceSetVgpuSchedulerState_v2 + + global __nvmlGpuInstanceSetVgpuSchedulerState_v2 + data["__nvmlGpuInstanceSetVgpuSchedulerState_v2"] = __nvmlGpuInstanceSetVgpuSchedulerState_v2 + func_ptrs = data return data @@ -5167,6 +5255,16 @@ cdef nvmlReturn_t _nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, device, infoCount, infos) +cdef nvmlReturn_t _nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetGraphicsRunningProcesses_v3 + _check_or_init_nvml() + if __nvmlDeviceGetGraphicsRunningProcesses_v3 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetGraphicsRunningProcesses_v3 is not found") + return (__nvmlDeviceGetGraphicsRunningProcesses_v3)( + device, infoCount, infos) + + cdef nvmlReturn_t _nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: global __nvmlDeviceGetMPSComputeRunningProcesses_v3 _check_or_init_nvml() @@ -7315,3 +7413,73 @@ cdef nvmlReturn_t _nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSet raise FunctionNotFoundError("function nvmlDeviceSetRusdSettings_v1 is not found") return (__nvmlDeviceSetRusdSettings_v1)( device, settings) + + +cdef nvmlReturn_t _nvmlDeviceVgpuForceGspUnload(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceVgpuForceGspUnload + _check_or_init_nvml() + if __nvmlDeviceVgpuForceGspUnload == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceVgpuForceGspUnload is not found") + return (__nvmlDeviceVgpuForceGspUnload)( + device) + + +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlDeviceGetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetVgpuSchedulerState_v2 is not found") + return (__nvmlDeviceGetVgpuSchedulerState_v2)( + device, pSchedulerStateInfo) + + +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlGpuInstanceGetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlGpuInstanceGetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlGpuInstanceGetVgpuSchedulerState_v2 is not found") + return (__nvmlGpuInstanceGetVgpuSchedulerState_v2)( + gpuInstance, pSchedulerStateInfo) + + +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerLog_v2(nvmlDevice_t device, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetVgpuSchedulerLog_v2 + _check_or_init_nvml() + if __nvmlDeviceGetVgpuSchedulerLog_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetVgpuSchedulerLog_v2 is not found") + return (__nvmlDeviceGetVgpuSchedulerLog_v2)( + device, pSchedulerLogInfo) + + +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerLog_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + _check_or_init_nvml() + if __nvmlGpuInstanceGetVgpuSchedulerLog_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlGpuInstanceGetVgpuSchedulerLog_v2 is not found") + return (__nvmlGpuInstanceGetVgpuSchedulerLog_v2)( + gpuInstance, pSchedulerLogInfo) + + +cdef nvmlReturn_t _nvmlDeviceSetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlDeviceSetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetVgpuSchedulerState_v2 is not found") + return (__nvmlDeviceSetVgpuSchedulerState_v2)( + device, pSchedulerState) + + +cdef nvmlReturn_t _nvmlGpuInstanceSetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlGpuInstanceSetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlGpuInstanceSetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlGpuInstanceSetVgpuSchedulerState_v2 is not found") + return (__nvmlGpuInstanceSetVgpuSchedulerState_v2)( + gpuInstance, pSchedulerState) diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx index afbd0a8860..5bdc45a482 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from libc.stdint cimport intptr_t @@ -207,6 +207,7 @@ cdef void* __nvmlDeviceGetDriverModel_v2 = NULL cdef void* __nvmlDeviceGetVbiosVersion = NULL cdef void* __nvmlDeviceGetBridgeChipInfo = NULL cdef void* __nvmlDeviceGetComputeRunningProcesses_v3 = NULL +cdef void* __nvmlDeviceGetGraphicsRunningProcesses_v3 = NULL cdef void* __nvmlDeviceGetMPSComputeRunningProcesses_v3 = NULL cdef void* __nvmlDeviceGetRunningProcessDetailList = NULL cdef void* __nvmlDeviceOnSameBoard = NULL @@ -422,6 +423,13 @@ cdef void* __nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts = NULL cdef void* __nvmlDeviceGetUnrepairableMemoryFlag_v1 = NULL cdef void* __nvmlDeviceReadPRMCounters_v1 = NULL cdef void* __nvmlDeviceSetRusdSettings_v1 = NULL +cdef void* __nvmlDeviceVgpuForceGspUnload = NULL +cdef void* __nvmlDeviceGetVgpuSchedulerState_v2 = NULL +cdef void* __nvmlGpuInstanceGetVgpuSchedulerState_v2 = NULL +cdef void* __nvmlDeviceGetVgpuSchedulerLog_v2 = NULL +cdef void* __nvmlGpuInstanceGetVgpuSchedulerLog_v2 = NULL +cdef void* __nvmlDeviceSetVgpuSchedulerState_v2 = NULL +cdef void* __nvmlGpuInstanceSetVgpuSchedulerState_v2 = NULL cdef uintptr_t load_library() except* with gil: @@ -822,6 +830,9 @@ cdef int _init_nvml() except -1 nogil: global __nvmlDeviceGetComputeRunningProcesses_v3 __nvmlDeviceGetComputeRunningProcesses_v3 = GetProcAddress(handle, 'nvmlDeviceGetComputeRunningProcesses_v3') + global __nvmlDeviceGetGraphicsRunningProcesses_v3 + __nvmlDeviceGetGraphicsRunningProcesses_v3 = GetProcAddress(handle, 'nvmlDeviceGetGraphicsRunningProcesses_v3') + global __nvmlDeviceGetMPSComputeRunningProcesses_v3 __nvmlDeviceGetMPSComputeRunningProcesses_v3 = GetProcAddress(handle, 'nvmlDeviceGetMPSComputeRunningProcesses_v3') @@ -1467,6 +1478,27 @@ cdef int _init_nvml() except -1 nogil: global __nvmlDeviceSetRusdSettings_v1 __nvmlDeviceSetRusdSettings_v1 = GetProcAddress(handle, 'nvmlDeviceSetRusdSettings_v1') + global __nvmlDeviceVgpuForceGspUnload + __nvmlDeviceVgpuForceGspUnload = GetProcAddress(handle, 'nvmlDeviceVgpuForceGspUnload') + + global __nvmlDeviceGetVgpuSchedulerState_v2 + __nvmlDeviceGetVgpuSchedulerState_v2 = GetProcAddress(handle, 'nvmlDeviceGetVgpuSchedulerState_v2') + + global __nvmlGpuInstanceGetVgpuSchedulerState_v2 + __nvmlGpuInstanceGetVgpuSchedulerState_v2 = GetProcAddress(handle, 'nvmlGpuInstanceGetVgpuSchedulerState_v2') + + global __nvmlDeviceGetVgpuSchedulerLog_v2 + __nvmlDeviceGetVgpuSchedulerLog_v2 = GetProcAddress(handle, 'nvmlDeviceGetVgpuSchedulerLog_v2') + + global __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + __nvmlGpuInstanceGetVgpuSchedulerLog_v2 = GetProcAddress(handle, 'nvmlGpuInstanceGetVgpuSchedulerLog_v2') + + global __nvmlDeviceSetVgpuSchedulerState_v2 + __nvmlDeviceSetVgpuSchedulerState_v2 = GetProcAddress(handle, 'nvmlDeviceSetVgpuSchedulerState_v2') + + global __nvmlGpuInstanceSetVgpuSchedulerState_v2 + __nvmlGpuInstanceSetVgpuSchedulerState_v2 = GetProcAddress(handle, 'nvmlGpuInstanceSetVgpuSchedulerState_v2') + __py_nvml_init = True return 0 @@ -1873,6 +1905,9 @@ cpdef dict _inspect_function_pointers(): global __nvmlDeviceGetComputeRunningProcesses_v3 data["__nvmlDeviceGetComputeRunningProcesses_v3"] = __nvmlDeviceGetComputeRunningProcesses_v3 + global __nvmlDeviceGetGraphicsRunningProcesses_v3 + data["__nvmlDeviceGetGraphicsRunningProcesses_v3"] = __nvmlDeviceGetGraphicsRunningProcesses_v3 + global __nvmlDeviceGetMPSComputeRunningProcesses_v3 data["__nvmlDeviceGetMPSComputeRunningProcesses_v3"] = __nvmlDeviceGetMPSComputeRunningProcesses_v3 @@ -2518,6 +2553,27 @@ cpdef dict _inspect_function_pointers(): global __nvmlDeviceSetRusdSettings_v1 data["__nvmlDeviceSetRusdSettings_v1"] = __nvmlDeviceSetRusdSettings_v1 + global __nvmlDeviceVgpuForceGspUnload + data["__nvmlDeviceVgpuForceGspUnload"] = __nvmlDeviceVgpuForceGspUnload + + global __nvmlDeviceGetVgpuSchedulerState_v2 + data["__nvmlDeviceGetVgpuSchedulerState_v2"] = __nvmlDeviceGetVgpuSchedulerState_v2 + + global __nvmlGpuInstanceGetVgpuSchedulerState_v2 + data["__nvmlGpuInstanceGetVgpuSchedulerState_v2"] = __nvmlGpuInstanceGetVgpuSchedulerState_v2 + + global __nvmlDeviceGetVgpuSchedulerLog_v2 + data["__nvmlDeviceGetVgpuSchedulerLog_v2"] = __nvmlDeviceGetVgpuSchedulerLog_v2 + + global __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + data["__nvmlGpuInstanceGetVgpuSchedulerLog_v2"] = __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + + global __nvmlDeviceSetVgpuSchedulerState_v2 + data["__nvmlDeviceSetVgpuSchedulerState_v2"] = __nvmlDeviceSetVgpuSchedulerState_v2 + + global __nvmlGpuInstanceSetVgpuSchedulerState_v2 + data["__nvmlGpuInstanceSetVgpuSchedulerState_v2"] = __nvmlGpuInstanceSetVgpuSchedulerState_v2 + func_ptrs = data return data @@ -3813,6 +3869,16 @@ cdef nvmlReturn_t _nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, device, infoCount, infos) +cdef nvmlReturn_t _nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetGraphicsRunningProcesses_v3 + _check_or_init_nvml() + if __nvmlDeviceGetGraphicsRunningProcesses_v3 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetGraphicsRunningProcesses_v3 is not found") + return (__nvmlDeviceGetGraphicsRunningProcesses_v3)( + device, infoCount, infos) + + cdef nvmlReturn_t _nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: global __nvmlDeviceGetMPSComputeRunningProcesses_v3 _check_or_init_nvml() @@ -5961,3 +6027,73 @@ cdef nvmlReturn_t _nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSet raise FunctionNotFoundError("function nvmlDeviceSetRusdSettings_v1 is not found") return (__nvmlDeviceSetRusdSettings_v1)( device, settings) + + +cdef nvmlReturn_t _nvmlDeviceVgpuForceGspUnload(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceVgpuForceGspUnload + _check_or_init_nvml() + if __nvmlDeviceVgpuForceGspUnload == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceVgpuForceGspUnload is not found") + return (__nvmlDeviceVgpuForceGspUnload)( + device) + + +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlDeviceGetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetVgpuSchedulerState_v2 is not found") + return (__nvmlDeviceGetVgpuSchedulerState_v2)( + device, pSchedulerStateInfo) + + +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlGpuInstanceGetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlGpuInstanceGetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlGpuInstanceGetVgpuSchedulerState_v2 is not found") + return (__nvmlGpuInstanceGetVgpuSchedulerState_v2)( + gpuInstance, pSchedulerStateInfo) + + +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerLog_v2(nvmlDevice_t device, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetVgpuSchedulerLog_v2 + _check_or_init_nvml() + if __nvmlDeviceGetVgpuSchedulerLog_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetVgpuSchedulerLog_v2 is not found") + return (__nvmlDeviceGetVgpuSchedulerLog_v2)( + device, pSchedulerLogInfo) + + +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerLog_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlGpuInstanceGetVgpuSchedulerLog_v2 + _check_or_init_nvml() + if __nvmlGpuInstanceGetVgpuSchedulerLog_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlGpuInstanceGetVgpuSchedulerLog_v2 is not found") + return (__nvmlGpuInstanceGetVgpuSchedulerLog_v2)( + gpuInstance, pSchedulerLogInfo) + + +cdef nvmlReturn_t _nvmlDeviceSetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlDeviceSetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetVgpuSchedulerState_v2 is not found") + return (__nvmlDeviceSetVgpuSchedulerState_v2)( + device, pSchedulerState) + + +cdef nvmlReturn_t _nvmlGpuInstanceSetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlGpuInstanceSetVgpuSchedulerState_v2 + _check_or_init_nvml() + if __nvmlGpuInstanceSetVgpuSchedulerState_v2 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlGpuInstanceSetVgpuSchedulerState_v2 is not found") + return (__nvmlGpuInstanceSetVgpuSchedulerState_v2)( + gpuInstance, pSchedulerState) diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd index 23427edd9b..3c99230918 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from ..cynvvm cimport * @@ -24,3 +24,4 @@ cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeR cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index 8a84834a9a..03ade4f939 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t @@ -72,6 +72,7 @@ cdef void* __nvvmGetCompiledResultSize = NULL cdef void* __nvvmGetCompiledResult = NULL cdef void* __nvvmGetProgramLogSize = NULL cdef void* __nvvmGetProgramLog = NULL +cdef void* __nvvmLLVMVersion = NULL cdef void* load_library() except* with gil: @@ -181,6 +182,13 @@ cdef int _init_nvvm() except -1 nogil: handle = load_library() __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') + global __nvvmLLVMVersion + __nvvmLLVMVersion = dlsym(RTLD_DEFAULT, 'nvvmLLVMVersion') + if __nvvmLLVMVersion == NULL: + if handle == NULL: + handle = load_library() + __nvvmLLVMVersion = dlsym(handle, 'nvvmLLVMVersion') + __py_nvvm_init = True return 0 @@ -242,6 +250,9 @@ cpdef dict _inspect_function_pointers(): global __nvvmGetProgramLog data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + global __nvvmLLVMVersion + data["__nvvmLLVMVersion"] = __nvvmLLVMVersion + func_ptrs = data return data @@ -385,3 +396,13 @@ cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMR raise FunctionNotFoundError("function nvvmGetProgramLog is not found") return (__nvvmGetProgramLog)( prog, buffer) + + +cdef nvvmResult _nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmLLVMVersion + _check_or_init_nvvm() + if __nvvmLLVMVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmLLVMVersion is not found") + return (__nvvmLLVMVersion)( + arch, major) diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index e029521b2f..7502613e4b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from libc.stdint cimport intptr_t @@ -90,6 +90,7 @@ cdef void* __nvvmGetCompiledResultSize = NULL cdef void* __nvvmGetCompiledResult = NULL cdef void* __nvvmGetProgramLogSize = NULL cdef void* __nvvmGetProgramLog = NULL +cdef void* __nvvmLLVMVersion = NULL cdef int _init_nvvm() except -1 nogil: @@ -143,6 +144,9 @@ cdef int _init_nvvm() except -1 nogil: global __nvvmGetProgramLog __nvvmGetProgramLog = GetProcAddress(handle, 'nvvmGetProgramLog') + global __nvvmLLVMVersion + __nvvmLLVMVersion = GetProcAddress(handle, 'nvvmLLVMVersion') + __py_nvvm_init = True return 0 @@ -204,6 +208,9 @@ cpdef dict _inspect_function_pointers(): global __nvvmGetProgramLog data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + global __nvvmLLVMVersion + data["__nvvmLLVMVersion"] = __nvvmLLVMVersion + func_ptrs = data return data @@ -347,3 +354,13 @@ cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMR raise FunctionNotFoundError("function nvvmGetProgramLog is not found") return (__nvvmGetProgramLog)( prog, buffer) + + +cdef nvvmResult _nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmLLVMVersion + _check_or_init_nvvm() + if __nvvmLLVMVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmLLVMVersion is not found") + return (__nvvmLLVMVersion)( + arch, major) diff --git a/cuda_bindings/cuda/bindings/cynvml.pxd b/cuda_bindings/cuda/bindings/cynvml.pxd index a1bb81ffb5..58f6c4de21 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from libc.stdint cimport int64_t @@ -817,12 +817,19 @@ ctypedef struct nvmlPlatformInfo_v2_t 'nvmlPlatformInfo_v2_t': unsigned char moduleId ctypedef unsigned int nvmlDeviceArchitecture_t 'nvmlDeviceArchitecture_t' + ctypedef unsigned int nvmlBusType_t 'nvmlBusType_t' + ctypedef unsigned int nvmlFanControlPolicy_t 'nvmlFanControlPolicy_t' + ctypedef unsigned int nvmlPowerSource_t 'nvmlPowerSource_t' + ctypedef unsigned char nvmlPowerScopeType_t 'nvmlPowerScopeType_t' + ctypedef unsigned int nvmlVgpuTypeId_t 'nvmlVgpuTypeId_t' + ctypedef unsigned int nvmlVgpuInstance_t 'nvmlVgpuInstance_t' + ctypedef struct nvmlVgpuHeterogeneousMode_v1_t 'nvmlVgpuHeterogeneousMode_v1_t': unsigned int version unsigned int mode @@ -862,11 +869,13 @@ ctypedef struct nvmlConfComputeGetKeyRotationThresholdInfo_v1_t 'nvmlConfCompute unsigned long long attackerAdvantage ctypedef unsigned char nvmlGpuFabricState_t 'nvmlGpuFabricState_t' + ctypedef struct nvmlSystemDriverBranchInfo_v1_t 'nvmlSystemDriverBranchInfo_v1_t': unsigned int version char branch[80] ctypedef unsigned int nvmlAffinityScope_t 'nvmlAffinityScope_t' + ctypedef struct nvmlTemperature_v1_t 'nvmlTemperature_v1_t': unsigned int version nvmlTemperatureSensors_t sensorType @@ -915,12 +924,19 @@ ctypedef struct nvmlPdi_v1_t 'nvmlPdi_v1_t': unsigned long long value ctypedef void* nvmlDevice_t 'nvmlDevice_t' + ctypedef void* nvmlGpuInstance_t 'nvmlGpuInstance_t' + ctypedef void* nvmlUnit_t 'nvmlUnit_t' + ctypedef void* nvmlEventSet_t 'nvmlEventSet_t' + ctypedef void* nvmlSystemEventSet_t 'nvmlSystemEventSet_t' + ctypedef void* nvmlComputeInstance_t 'nvmlComputeInstance_t' + ctypedef void* nvmlGpmSample_t 'nvmlGpmSample_t' + ctypedef struct nvmlPciInfo_t 'nvmlPciInfo_t': char busIdLegacy[16] unsigned int domain @@ -1022,7 +1038,7 @@ ctypedef struct nvmlViolationTime_t 'nvmlViolationTime_t': unsigned long long referenceTime unsigned long long violationTime -ctypedef struct _anon_pod0 '_anon_pod0': +ctypedef struct cuda_bindings_nvml__anon_pod0: nvmlThermalController_t controller int defaultMinTemp int defaultMaxTemp @@ -1065,7 +1081,7 @@ ctypedef struct nvmlPlatformInfo_v1_t 'nvmlPlatformInfo_v1_t': unsigned char peerType unsigned char moduleId -ctypedef struct _anon_pod1 '_anon_pod1': +ctypedef struct cuda_bindings_nvml__anon_pod1: unsigned int bIsPresent unsigned int percentage unsigned int incThreshold @@ -1077,11 +1093,11 @@ ctypedef struct nvmlVgpuPlacementList_v1_t 'nvmlVgpuPlacementList_v1_t': unsigned int count unsigned int* placementIds -ctypedef struct _anon_pod2 '_anon_pod2': +ctypedef struct cuda_bindings_nvml__anon_pod2: unsigned int avgFactor unsigned int timeslice -ctypedef struct _anon_pod3 '_anon_pod3': +ctypedef struct cuda_bindings_nvml__anon_pod3: unsigned int timeslice ctypedef struct nvmlVgpuSchedulerLogEntry_t 'nvmlVgpuSchedulerLogEntry_t': @@ -1092,11 +1108,11 @@ ctypedef struct nvmlVgpuSchedulerLogEntry_t 'nvmlVgpuSchedulerLogEntry_t': unsigned long long targetTimeSlice unsigned long long cumulativePreemptionTime -ctypedef struct _anon_pod4 '_anon_pod4': +ctypedef struct cuda_bindings_nvml__anon_pod4: unsigned int avgFactor unsigned int frequency -ctypedef struct _anon_pod5 '_anon_pod5': +ctypedef struct cuda_bindings_nvml__anon_pod5: unsigned int timeslice ctypedef struct nvmlVgpuSchedulerCapabilities_t 'nvmlVgpuSchedulerCapabilities_t': @@ -1308,7 +1324,7 @@ ctypedef struct nvmlComputeInstanceProfileInfo_v3_t 'nvmlComputeInstanceProfileI char name[96] unsigned int capabilities -ctypedef struct _anon_pod6 '_anon_pod6': +ctypedef struct cuda_bindings_nvml__anon_pod6: char* shortName char* longName char* unit @@ -1347,7 +1363,7 @@ ctypedef struct nvmlNvlinkFirmwareVersion_t 'nvmlNvlinkFirmwareVersion_t': unsigned int minor unsigned int subMinor -ctypedef union _anon_pod7 '_anon_pod7': +ctypedef union cuda_bindings_nvml__anon_pod7: unsigned char inData[496] unsigned char outData[496] @@ -1383,15 +1399,25 @@ ctypedef struct nvmlVgpuSchedulerState_v2_t 'nvmlVgpuSchedulerState_v2_t': unsigned int frequency ctypedef nvmlPciInfoExt_v1_t nvmlPciInfoExt_t 'nvmlPciInfoExt_t' + ctypedef nvmlCoolerInfo_v1_t nvmlCoolerInfo_t 'nvmlCoolerInfo_t' + ctypedef nvmlDramEncryptionInfo_v1_t nvmlDramEncryptionInfo_t 'nvmlDramEncryptionInfo_t' + ctypedef nvmlMarginTemperature_v1_t nvmlMarginTemperature_t 'nvmlMarginTemperature_t' + ctypedef nvmlClockOffset_v1_t nvmlClockOffset_t 'nvmlClockOffset_t' + ctypedef nvmlFanSpeedInfo_v1_t nvmlFanSpeedInfo_t 'nvmlFanSpeedInfo_t' + ctypedef nvmlDevicePerfModes_v1_t nvmlDevicePerfModes_t 'nvmlDevicePerfModes_t' + ctypedef nvmlDeviceCurrentClockFreqs_v1_t nvmlDeviceCurrentClockFreqs_t 'nvmlDeviceCurrentClockFreqs_t' + ctypedef nvmlEccSramErrorStatus_v1_t nvmlEccSramErrorStatus_t 'nvmlEccSramErrorStatus_t' + ctypedef nvmlPlatformInfo_v2_t nvmlPlatformInfo_t 'nvmlPlatformInfo_t' + ctypedef struct nvmlPowerValue_v2_t 'nvmlPowerValue_v2_t': unsigned int version nvmlPowerScopeType_t powerScope @@ -1466,13 +1492,21 @@ ctypedef struct nvmlFBCSessionInfo_t 'nvmlFBCSessionInfo_t': unsigned int averageLatency ctypedef nvmlVgpuHeterogeneousMode_v1_t nvmlVgpuHeterogeneousMode_t 'nvmlVgpuHeterogeneousMode_t' + ctypedef nvmlVgpuPlacementId_v1_t nvmlVgpuPlacementId_t 'nvmlVgpuPlacementId_t' + ctypedef nvmlVgpuPlacementList_v2_t nvmlVgpuPlacementList_t 'nvmlVgpuPlacementList_t' + ctypedef nvmlVgpuTypeBar1Info_v1_t nvmlVgpuTypeBar1Info_t 'nvmlVgpuTypeBar1Info_t' + ctypedef nvmlVgpuRuntimeState_v1_t nvmlVgpuRuntimeState_t 'nvmlVgpuRuntimeState_t' + ctypedef nvmlSystemConfComputeSettings_v1_t nvmlSystemConfComputeSettings_t 'nvmlSystemConfComputeSettings_t' + ctypedef nvmlConfComputeSetKeyRotationThresholdInfo_v1_t nvmlConfComputeSetKeyRotationThresholdInfo_t 'nvmlConfComputeSetKeyRotationThresholdInfo_t' + ctypedef nvmlConfComputeGetKeyRotationThresholdInfo_v1_t nvmlConfComputeGetKeyRotationThresholdInfo_t 'nvmlConfComputeGetKeyRotationThresholdInfo_t' + ctypedef struct nvmlGpuFabricInfo_t 'nvmlGpuFabricInfo_t': unsigned char clusterUuid[16] nvmlReturn_t status @@ -1497,16 +1531,27 @@ ctypedef struct nvmlGpuFabricInfo_v3_t 'nvmlGpuFabricInfo_v3_t': unsigned char healthSummary ctypedef nvmlSystemDriverBranchInfo_v1_t nvmlSystemDriverBranchInfo_t 'nvmlSystemDriverBranchInfo_t' + ctypedef nvmlTemperature_v1_t nvmlTemperature_t 'nvmlTemperature_t' + ctypedef nvmlNvlinkSupportedBwModes_v1_t nvmlNvlinkSupportedBwModes_t 'nvmlNvlinkSupportedBwModes_t' + ctypedef nvmlNvlinkGetBwMode_v1_t nvmlNvlinkGetBwMode_t 'nvmlNvlinkGetBwMode_t' + ctypedef nvmlNvlinkSetBwMode_v1_t nvmlNvlinkSetBwMode_t 'nvmlNvlinkSetBwMode_t' + ctypedef nvmlDeviceCapabilities_v1_t nvmlDeviceCapabilities_t 'nvmlDeviceCapabilities_t' + ctypedef nvmlPowerSmoothingProfile_v1_t nvmlPowerSmoothingProfile_t 'nvmlPowerSmoothingProfile_t' + ctypedef nvmlPowerSmoothingState_v1_t nvmlPowerSmoothingState_t 'nvmlPowerSmoothingState_t' + ctypedef nvmlDeviceAddressingMode_v1_t nvmlDeviceAddressingMode_t 'nvmlDeviceAddressingMode_t' + ctypedef nvmlRepairStatus_v1_t nvmlRepairStatus_t 'nvmlRepairStatus_t' + ctypedef nvmlPdi_v1_t nvmlPdi_t 'nvmlPdi_t' + ctypedef struct nvmlEventData_t 'nvmlEventData_t': nvmlDevice_t device unsigned long long eventType @@ -1579,7 +1624,7 @@ ctypedef struct nvmlPRMCounterValue_v1_t 'nvmlPRMCounterValue_v1_t': ctypedef struct nvmlGpuThermalSettings_t 'nvmlGpuThermalSettings_t': unsigned int count - _anon_pod0 sensor[3] + cuda_bindings_nvml__anon_pod0 sensor[3] ctypedef struct nvmlUUID_v1_t 'nvmlUUID_v1_t': unsigned int version @@ -1599,15 +1644,15 @@ ctypedef struct nvmlProcessesUtilizationInfo_v1_t 'nvmlProcessesUtilizationInfo_ ctypedef struct nvmlGpuDynamicPstatesInfo_t 'nvmlGpuDynamicPstatesInfo_t': unsigned int flags - _anon_pod1 utilization[8] + cuda_bindings_nvml__anon_pod1 utilization[8] ctypedef union nvmlVgpuSchedulerParams_t 'nvmlVgpuSchedulerParams_t': - _anon_pod2 vgpuSchedDataWithARR - _anon_pod3 vgpuSchedData + cuda_bindings_nvml__anon_pod2 vgpuSchedDataWithARR + cuda_bindings_nvml__anon_pod3 vgpuSchedData ctypedef union nvmlVgpuSchedulerSetParams_t 'nvmlVgpuSchedulerSetParams_t': - _anon_pod4 vgpuSchedDataWithARR - _anon_pod5 vgpuSchedData + cuda_bindings_nvml__anon_pod4 vgpuSchedDataWithARR + cuda_bindings_nvml__anon_pod5 vgpuSchedData ctypedef struct nvmlVgpuLicenseInfo_t 'nvmlVgpuLicenseInfo_t': unsigned char isLicensed @@ -1661,7 +1706,7 @@ ctypedef struct nvmlGpmMetric_t 'nvmlGpmMetric_t': unsigned int metricId nvmlReturn_t nvmlReturn double value - _anon_pod6 metricInfo + cuda_bindings_nvml__anon_pod6 metricInfo ctypedef struct nvmlWorkloadPowerProfileInfo_v1_t 'nvmlWorkloadPowerProfileInfo_v1_t': unsigned int version @@ -1695,7 +1740,7 @@ ctypedef struct nvmlNvlinkFirmwareInfo_t 'nvmlNvlinkFirmwareInfo_t': ctypedef struct nvmlPRMTLV_v1_t 'nvmlPRMTLV_v1_t': unsigned dataSize unsigned status - _anon_pod7 _anon_pod_member0 + cuda_bindings_nvml__anon_pod7 _anon_pod_member0 ctypedef struct nvmlVgpuSchedulerLogInfo_v2_t 'nvmlVgpuSchedulerLogInfo_v2_t': unsigned int engineId @@ -1706,8 +1751,11 @@ ctypedef struct nvmlVgpuSchedulerLogInfo_v2_t 'nvmlVgpuSchedulerLogInfo_v2_t': nvmlVgpuSchedulerLogEntry_v2_t logEntries[200] ctypedef nvmlVgpuTypeIdInfo_v1_t nvmlVgpuTypeIdInfo_t 'nvmlVgpuTypeIdInfo_t' + ctypedef nvmlVgpuTypeMaxInstance_v1_t nvmlVgpuTypeMaxInstance_t 'nvmlVgpuTypeMaxInstance_t' + ctypedef nvmlVgpuCreatablePlacementInfo_v1_t nvmlVgpuCreatablePlacementInfo_t 'nvmlVgpuCreatablePlacementInfo_t' + ctypedef struct nvmlVgpuProcessesUtilizationInfo_v1_t 'nvmlVgpuProcessesUtilizationInfo_v1_t': unsigned int version unsigned int vgpuProcessCount @@ -1715,11 +1763,17 @@ ctypedef struct nvmlVgpuProcessesUtilizationInfo_v1_t 'nvmlVgpuProcessesUtilizat nvmlVgpuProcessUtilizationInfo_v1_t* vgpuProcUtilArray ctypedef nvmlActiveVgpuInstanceInfo_v1_t nvmlActiveVgpuInstanceInfo_t 'nvmlActiveVgpuInstanceInfo_t' + ctypedef nvmlGpuFabricInfo_v3_t nvmlGpuFabricInfoV_t 'nvmlGpuFabricInfoV_t' + ctypedef nvmlSystemEventSetCreateRequest_v1_t nvmlSystemEventSetCreateRequest_t 'nvmlSystemEventSetCreateRequest_t' + ctypedef nvmlSystemEventSetFreeRequest_v1_t nvmlSystemEventSetFreeRequest_t 'nvmlSystemEventSetFreeRequest_t' + ctypedef nvmlSystemRegisterEventRequest_v1_t nvmlSystemRegisterEventRequest_t 'nvmlSystemRegisterEventRequest_t' + ctypedef nvmlProcessDetailList_v1_t nvmlProcessDetailList_t 'nvmlProcessDetailList_t' + ctypedef struct nvmlVgpuInstancesUtilizationInfo_v1_t 'nvmlVgpuInstancesUtilizationInfo_v1_t': unsigned int version nvmlValueType_t sampleValType @@ -1733,7 +1787,9 @@ ctypedef struct nvmlPRMCounter_v1_t 'nvmlPRMCounter_v1_t': nvmlPRMCounterValue_v1_t counterValue ctypedef nvmlUUID_v1_t nvmlUUID_t 'nvmlUUID_t' + ctypedef nvmlProcessesUtilizationInfo_v1_t nvmlProcessesUtilizationInfo_t 'nvmlProcessesUtilizationInfo_t' + ctypedef struct nvmlVgpuSchedulerLog_t 'nvmlVgpuSchedulerLog_t': unsigned int engineId unsigned int schedulerPolicy @@ -1781,6 +1837,7 @@ ctypedef struct nvmlGridLicensableFeatures_t 'nvmlGridLicensableFeatures_t': nvmlGridLicensableFeature_t gridLicensableFeatures[3] ctypedef nvmlSystemEventSetWaitRequest_v1_t nvmlSystemEventSetWaitRequest_t 'nvmlSystemEventSetWaitRequest_t' + ctypedef struct nvmlGpmMetricsGet_t 'nvmlGpmMetricsGet_t': unsigned int version unsigned int numMetrics @@ -1789,29 +1846,39 @@ ctypedef struct nvmlGpmMetricsGet_t 'nvmlGpmMetricsGet_t': nvmlGpmMetric_t metrics[333] ctypedef nvmlWorkloadPowerProfileInfo_v1_t nvmlWorkloadPowerProfileInfo_t 'nvmlWorkloadPowerProfileInfo_t' + ctypedef nvmlWorkloadPowerProfileCurrentProfiles_v1_t nvmlWorkloadPowerProfileCurrentProfiles_t 'nvmlWorkloadPowerProfileCurrentProfiles_t' + ctypedef nvmlWorkloadPowerProfileRequestedProfiles_v1_t nvmlWorkloadPowerProfileRequestedProfiles_t 'nvmlWorkloadPowerProfileRequestedProfiles_t' + ctypedef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t nvmlEccSramUniqueUncorrectedErrorCounts_t 'nvmlEccSramUniqueUncorrectedErrorCounts_t' + ctypedef struct nvmlNvLinkInfo_v2_t 'nvmlNvLinkInfo_v2_t': unsigned int version unsigned int isNvleEnabled nvmlNvlinkFirmwareInfo_t firmwareInfo ctypedef nvmlVgpuProcessesUtilizationInfo_v1_t nvmlVgpuProcessesUtilizationInfo_t 'nvmlVgpuProcessesUtilizationInfo_t' + ctypedef nvmlVgpuInstancesUtilizationInfo_v1_t nvmlVgpuInstancesUtilizationInfo_t 'nvmlVgpuInstancesUtilizationInfo_t' + ctypedef struct nvmlPRMCounterList_v1_t 'nvmlPRMCounterList_v1_t': unsigned int numCounters nvmlPRMCounter_v1_t* counters ctypedef nvmlVgpuSchedulerStateInfo_v1_t nvmlVgpuSchedulerStateInfo_t 'nvmlVgpuSchedulerStateInfo_t' + ctypedef nvmlVgpuSchedulerLogInfo_v1_t nvmlVgpuSchedulerLogInfo_t 'nvmlVgpuSchedulerLogInfo_t' + ctypedef nvmlVgpuSchedulerState_v1_t nvmlVgpuSchedulerState_t 'nvmlVgpuSchedulerState_t' + ctypedef struct nvmlWorkloadPowerProfileProfilesInfo_v1_t 'nvmlWorkloadPowerProfileProfilesInfo_v1_t': unsigned int version nvmlMask255_t perfProfilesMask nvmlWorkloadPowerProfileInfo_t perfProfile[255] ctypedef nvmlNvLinkInfo_v2_t nvmlNvLinkInfo_t 'nvmlNvLinkInfo_t' + ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t nvmlWorkloadPowerProfileProfilesInfo_t 'nvmlWorkloadPowerProfileProfilesInfo_t' @@ -1947,6 +2014,7 @@ cdef nvmlReturn_t nvmlDeviceGetDriverModel_v2(nvmlDevice_t device, nvmlDriverMod cdef nvmlReturn_t nvmlDeviceGetVbiosVersion(nvmlDevice_t device, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridgeChipHierarchy_t* bridgeHierarchy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceGetRunningProcessDetailList(nvmlDevice_t device, nvmlProcessDetailList_t* plist) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceOnSameBoard(nvmlDevice_t device1, nvmlDevice_t device2, int* onSameBoard) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil @@ -2162,3 +2230,10 @@ cdef nvmlReturn_t nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts(nvmlDevice_t cdef nvmlReturn_t nvmlDeviceGetUnrepairableMemoryFlag_v1(nvmlDevice_t device, nvmlUnrepairableMemoryStatus_v1_t* unrepairableMemoryStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCounterList_v1_t* counterList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceVgpuForceGspUnload(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerLog_v2(nvmlDevice_t device, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerLog_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceSetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index 1200442977..c83faa005c 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from ._internal cimport nvml as _nvml @@ -523,6 +523,10 @@ cdef nvmlReturn_t nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, u return _nvml._nvmlDeviceGetComputeRunningProcesses_v3(device, infoCount, infos) +cdef nvmlReturn_t nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetGraphicsRunningProcesses_v3(device, infoCount, infos) + + cdef nvmlReturn_t nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: return _nvml._nvmlDeviceGetMPSComputeRunningProcesses_v3(device, infoCount, infos) @@ -1381,3 +1385,31 @@ cdef nvmlReturn_t nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCount cdef nvmlReturn_t nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: return _nvml._nvmlDeviceSetRusdSettings_v1(device, settings) + + +cdef nvmlReturn_t nvmlDeviceVgpuForceGspUnload(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceVgpuForceGspUnload(device) + + +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetVgpuSchedulerState_v2(device, pSchedulerStateInfo) + + +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlGpuInstanceGetVgpuSchedulerState_v2(gpuInstance, pSchedulerStateInfo) + + +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerLog_v2(nvmlDevice_t device, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetVgpuSchedulerLog_v2(device, pSchedulerLogInfo) + + +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerLog_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlGpuInstanceGetVgpuSchedulerLog_v2(gpuInstance, pSchedulerLogInfo) + + +cdef nvmlReturn_t nvmlDeviceSetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceSetVgpuSchedulerState_v2(device, pSchedulerState) + + +cdef nvmlReturn_t nvmlGpuInstanceSetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlGpuInstanceSetVgpuSchedulerState_v2(gpuInstance, pSchedulerState) diff --git a/cuda_bindings/cuda/bindings/cynvvm.pxd b/cuda_bindings/cuda/bindings/cynvvm.pxd index 300123115f..b4204a3cbd 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. ############################################################################### @@ -46,3 +46,4 @@ cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRe cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 7fe22f0dbf..75a50a69e3 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from ._internal cimport nvvm as _nvvm @@ -61,3 +61,7 @@ cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) e cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: return _nvvm._nvvmGetProgramLog(prog, buffer) + + +cdef nvvmResult nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmLLVMVersion(arch, major) diff --git a/cuda_bindings/cuda/bindings/driver.pxd.in b/cuda_bindings/cuda/bindings/driver.pxd.in index 86a2ac5760..f532ee7af4 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd.in +++ b/cuda_bindings/cuda/bindings/driver.pxd.in @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# This code was automatically generated with version 12.9.0, generator version 49a8141. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver include "_lib/utils.pxd" @@ -1826,8 +1826,8 @@ cdef class CUlaunchAttributeValue_union: {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. - ::CUsynchronizationPolicy for work queued up in this stream + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 @@ -3617,8 +3617,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which indicates that while signaling the CUexternalSemaphore, no memory @@ -3760,8 +3760,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates that while waiting for the CUexternalSemaphore, no memory @@ -6544,8 +6544,8 @@ cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union): {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. - ::CUsynchronizationPolicy for work queued up in this stream + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 @@ -6741,8 +6741,8 @@ cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue): {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. - ::CUsynchronizationPolicy for work queued up in this stream + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 @@ -6858,8 +6858,8 @@ cdef class CUkernelNodeAttrValue(CUkernelNodeAttrValue_v1): {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. - ::CUsynchronizationPolicy for work queued up in this stream + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 @@ -6975,8 +6975,8 @@ cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue): {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. - ::CUsynchronizationPolicy for work queued up in this stream + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 @@ -7092,8 +7092,8 @@ cdef class CUstreamAttrValue(CUstreamAttrValue_v1): {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. - ::CUsynchronizationPolicy for work queued up in this stream + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 @@ -9025,8 +9025,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_SIGN {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which indicates that while signaling the CUexternalSemaphore, no memory @@ -9060,8 +9060,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_ {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which indicates that while signaling the CUexternalSemaphore, no memory @@ -9095,8 +9095,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_WAIT_P {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates that while waiting for the CUexternalSemaphore, no memory @@ -9130,8 +9130,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARA {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates that while waiting for the CUexternalSemaphore, no memory diff --git a/cuda_bindings/cuda/bindings/driver.pyx.in b/cuda_bindings/cuda/bindings/driver.pyx.in index 783b57058f..57c1a1ae5c 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx.in +++ b/cuda_bindings/cuda/bindings/driver.pyx.in @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# This code was automatically generated with version 12.9.0, generator version 49a8141. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from typing import Any, Optional import cython import ctypes @@ -777,7 +777,7 @@ class CUstreamBatchMemOpType(_FastEnum): class CUstreamMemoryBarrier_flags(_FastEnum): """ - Flags for :py:obj:`~.CUstreamBatchMemOpParams`::memoryBarrier + Flags for :py:obj:`~.CUstreamBatchMemOpParams.memoryBarrier` """ {{if 'CU_STREAM_MEMORY_BARRIER_TYPE_SYS' in found_values}} @@ -4015,16 +4015,15 @@ class CUlaunchAttributeID(_FastEnum): cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE, 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' 'it to a launch in a non-capturing stream will result in an error.\n' - ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable\n' + ':py:obj:`~.CUlaunchAttributeValue.deviceUpdatableKernelNode.deviceUpdatable`\n' 'can only be set to 0 or 1. Setting the field to 1 indicates that the\n' 'corresponding kernel node should be device-updatable. On success, a handle\n' 'will be returned via\n' - ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' - 'which can be passed to the various device-side update functions to update\n' - "the node's kernel parameters from within another kernel. For more\n" - 'information on the types of device updates that can be made, as well as the\n' - 'relevant limitations thereof, see\n' - ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ':py:obj:`~.CUlaunchAttributeValue.deviceUpdatableKernelNode.devNode` which\n' + 'can be passed to the various device-side update functions to update the\n' + "node's kernel parameters from within another kernel. For more information\n" + 'on the types of device updates that can be made, as well as the relevant\n' + 'limitations thereof, see :py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' ' Nodes which are device-updatable have additional restrictions compared to\n' 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' 'from their graph via :py:obj:`~.cuGraphDestroyNode`. Additionally, once\n' @@ -7761,16 +7760,15 @@ class CUkernelNodeAttrID(_FastEnum): cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE, 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' 'it to a launch in a non-capturing stream will result in an error.\n' - ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable\n' + ':py:obj:`~.CUlaunchAttributeValue.deviceUpdatableKernelNode.deviceUpdatable`\n' 'can only be set to 0 or 1. Setting the field to 1 indicates that the\n' 'corresponding kernel node should be device-updatable. On success, a handle\n' 'will be returned via\n' - ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' - 'which can be passed to the various device-side update functions to update\n' - "the node's kernel parameters from within another kernel. For more\n" - 'information on the types of device updates that can be made, as well as the\n' - 'relevant limitations thereof, see\n' - ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ':py:obj:`~.CUlaunchAttributeValue.deviceUpdatableKernelNode.devNode` which\n' + 'can be passed to the various device-side update functions to update the\n' + "node's kernel parameters from within another kernel. For more information\n" + 'on the types of device updates that can be made, as well as the relevant\n' + 'limitations thereof, see :py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' ' Nodes which are device-updatable have additional restrictions compared to\n' 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' 'from their graph via :py:obj:`~.cuGraphDestroyNode`. Additionally, once\n' @@ -7971,16 +7969,15 @@ class CUstreamAttrID(_FastEnum): cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE, 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' 'it to a launch in a non-capturing stream will result in an error.\n' - ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable\n' + ':py:obj:`~.CUlaunchAttributeValue.deviceUpdatableKernelNode.deviceUpdatable`\n' 'can only be set to 0 or 1. Setting the field to 1 indicates that the\n' 'corresponding kernel node should be device-updatable. On success, a handle\n' 'will be returned via\n' - ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' - 'which can be passed to the various device-side update functions to update\n' - "the node's kernel parameters from within another kernel. For more\n" - 'information on the types of device updates that can be made, as well as the\n' - 'relevant limitations thereof, see\n' - ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ':py:obj:`~.CUlaunchAttributeValue.deviceUpdatableKernelNode.devNode` which\n' + 'can be passed to the various device-side update functions to update the\n' + "node's kernel parameters from within another kernel. For more information\n" + 'on the types of device updates that can be made, as well as the relevant\n' + 'limitations thereof, see :py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' ' Nodes which are device-updatable have additional restrictions compared to\n' 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' 'from their graph via :py:obj:`~.cuGraphDestroyNode`. Additionally, once\n' @@ -13152,8 +13149,8 @@ cdef class CUlaunchAttributeValue_union: {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. - ::CUsynchronizationPolicy for work queued up in this stream + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream {{endif}} {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 @@ -18856,8 +18853,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which indicates that while signaling the CUexternalSemaphore, no memory @@ -19236,8 +19233,8 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: {{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int - Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on - a CUexternalSemaphore of type + Only when CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a + CUexternalSemaphore of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates that while waiting for the CUexternalSemaphore, no memory @@ -26529,7 +26526,7 @@ def cuCtxCreate_v4(ctxCreateParams : Optional[CUctxCreateParams], unsigned int f pdev = int(CUdevice(dev)) cydev = pdev cdef CUcontext pctx = CUcontext() - cdef cydriver.CUctxCreateParams* cyctxCreateParams_ptr = ctxCreateParams._pvt_ptr if ctxCreateParams is not None else NULL + cdef cydriver.CUctxCreateParams* cyctxCreateParams_ptr = ctxCreateParams._pvt_ptr if ctxCreateParams is not None else NULL with nogil: err = cydriver.cuCtxCreate_v4(pctx._pvt_ptr, cyctxCreateParams_ptr, flags, cydev) if err != cydriver.CUDA_SUCCESS: @@ -31474,7 +31471,7 @@ def cuMemcpy2D(pCopy : Optional[CUDA_MEMCPY2D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` """ - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2D(cypCopy_ptr) return (_CUresult(err),) @@ -31601,7 +31598,7 @@ def cuMemcpy2DUnaligned(pCopy : Optional[CUDA_MEMCPY2D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` """ - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2DUnaligned(cypCopy_ptr) return (_CUresult(err),) @@ -31731,7 +31728,7 @@ def cuMemcpy3D(pCopy : Optional[CUDA_MEMCPY3D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy3D` """ - cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3D(cypCopy_ptr) return (_CUresult(err),) @@ -31761,7 +31758,7 @@ def cuMemcpy3DPeer(pCopy : Optional[CUDA_MEMCPY3D_PEER]): -------- :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeer` """ - cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DPeer(cypCopy_ptr) return (_CUresult(err),) @@ -32329,7 +32326,7 @@ def cuMemcpy2DAsync(pCopy : Optional[CUDA_MEMCPY2D], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2DAsync(cypCopy_ptr, cyhStream) return (_CUresult(err),) @@ -32469,7 +32466,7 @@ def cuMemcpy3DAsync(pCopy : Optional[CUDA_MEMCPY3D], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DAsync(cypCopy_ptr, cyhStream) return (_CUresult(err),) @@ -32509,7 +32506,7 @@ def cuMemcpy3DPeerAsync(pCopy : Optional[CUDA_MEMCPY3D_PEER], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DPeerAsync(cypCopy_ptr, cyhStream) return (_CUresult(err),) @@ -32724,16 +32721,16 @@ def cuMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[CUDA_MEMCPY3D_BA the CUDA array. For CUDA array to CUDA array copies, the element size of the two CUDA arrays must match. - For a given operand, if :py:obj:`~.CUmemcpy3DOperand`::type is - specified as :py:obj:`~.CU_MEMCPY_OPERAND_TYPE_POINTER`, then - :py:obj:`~.CUmemcpy3DOperand`::op::ptr will be used. The - :py:obj:`~.CUmemcpy3DOperand`::op::ptr::ptr field must contain the - pointer where the copy should begin. The - :py:obj:`~.CUmemcpy3DOperand`::op::ptr::rowLength field specifies the + For a given operand, if :py:obj:`~.CUmemcpy3DOperand.type` is specified + as :py:obj:`~.CU_MEMCPY_OPERAND_TYPE_POINTER`, then + :py:obj:`~.CUmemcpy3DOperand.op.ptr` will be used. The + :py:obj:`~.CUmemcpy3DOperand.op.ptr.ptr` field must contain the pointer + where the copy should begin. The + :py:obj:`~.CUmemcpy3DOperand.op.ptr.rowLength` field specifies the length of each row in elements and must either be zero or be greater than or equal to the width of the copy specified in :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`::extent::width. The - :py:obj:`~.CUmemcpy3DOperand`::op::ptr::layerHeight field specifies the + :py:obj:`~.CUmemcpy3DOperand.op.ptr.layerHeight` field specifies the height of each layer and must either be zero or be greater than or equal to the height of the copy specified in :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`::extent::height. When either of @@ -32743,15 +32740,15 @@ def cuMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[CUDA_MEMCPY3D_BA :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` is true or system-allocated pageable memory on devices where :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` is true, the - :py:obj:`~.CUmemcpy3DOperand`::op::ptr::locHint field can be used to - hint the location of the operand. + :py:obj:`~.CUmemcpy3DOperand.op.ptr.locHint` field can be used to hint + the location of the operand. If an operand's type is specified as :py:obj:`~.CU_MEMCPY_OPERAND_TYPE_ARRAY`, then - :py:obj:`~.CUmemcpy3DOperand`::op::array will be used. The - :py:obj:`~.CUmemcpy3DOperand`::op::array::array field specifies the - CUDA array and :py:obj:`~.CUmemcpy3DOperand`::op::array::offset - specifies the 3D offset into that array where the copy begins. + :py:obj:`~.CUmemcpy3DOperand.op.array` will be used. The + :py:obj:`~.CUmemcpy3DOperand.op.array.array` field specifies the CUDA + array and :py:obj:`~.CUmemcpy3DOperand.op.array.offset` specifies the + 3D offset into that array where the copy begins. The :py:obj:`~.CUmemcpyAttributes.srcAccessOrder` indicates the source access ordering to be observed for copies associated with the @@ -33487,7 +33484,7 @@ def cuArrayCreate(pAllocateArray : Optional[CUDA_ARRAY_DESCRIPTOR]): :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocArray` """ cdef CUarray pHandle = CUarray() - cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL with nogil: err = cydriver.cuArrayCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: @@ -33987,7 +33984,7 @@ def cuArray3DCreate(pAllocateArray : Optional[CUDA_ARRAY3D_DESCRIPTOR]): :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc3DArray` """ cdef CUarray pHandle = CUarray() - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL with nogil: err = cydriver.cuArray3DCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: @@ -34157,7 +34154,7 @@ def cuMipmappedArrayCreate(pMipmappedArrayDesc : Optional[CUDA_ARRAY3D_DESCRIPTO :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaMallocMipmappedArray` """ cdef CUmipmappedArray pHandle = CUmipmappedArray() - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypMipmappedArrayDesc_ptr = pMipmappedArrayDesc._pvt_ptr if pMipmappedArrayDesc is not None else NULL + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypMipmappedArrayDesc_ptr = pMipmappedArrayDesc._pvt_ptr if pMipmappedArrayDesc is not None else NULL with nogil: err = cydriver.cuMipmappedArrayCreate(pHandle._pvt_ptr, cypMipmappedArrayDesc_ptr, numMipmapLevels) if err != cydriver.CUDA_SUCCESS: @@ -34401,7 +34398,7 @@ def cuMemBatchDecompressAsync(paramsArray : Optional[CUmemDecompressParams], siz else: pstream = int(CUstream(stream)) cystream = pstream - cdef cydriver.CUmemDecompressParams* cyparamsArray_ptr = paramsArray._pvt_ptr if paramsArray is not None else NULL + cdef cydriver.CUmemDecompressParams* cyparamsArray_ptr = paramsArray._pvt_ptr if paramsArray is not None else NULL cdef size_t errorIndex = 0 with nogil: err = cydriver.cuMemBatchDecompressAsync(cyparamsArray_ptr, count, flags, &errorIndex, cystream) @@ -34522,7 +34519,7 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long :py:obj:`~.cuMemGetAllocationGranularity` with the :py:obj:`~.CU_MEM_ALLOC_GRANULARITY_MINIMUM` flag. To create a CPU allocation targeting a specific host NUMA node, applications must set - :py:obj:`~.CUmemAllocationProp`::CUmemLocation::type to + :py:obj:`~.CUmemAllocationProp.CUmemLocation.type` to :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` and :py:obj:`~.CUmemAllocationProp`::CUmemLocation::id must specify the NUMA ID of the CPU. On systems where NUMA is not available @@ -34552,7 +34549,7 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long /proc/devices users can execute the following command: `mknod /dev/nvidia-caps-imex-channels/channel0 c 0` - If :py:obj:`~.CUmemAllocationProp`::allocFlags::usage contains + If :py:obj:`~.CUmemAllocationProp.allocFlags.usage` contains :py:obj:`~.CU_MEM_CREATE_USAGE_TILE_POOL` flag then the memory allocation is intended only to be used as backing tile pool for sparse CUDA arrays and sparse CUDA mipmapped arrays. (see @@ -34580,7 +34577,7 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` """ cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() - cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL with nogil: err = cydriver.cuMemCreate(handle._pvt_ptr, size, cyprop_ptr, flags) if err != cydriver.CUDA_SUCCESS: @@ -34731,17 +34728,17 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr where :py:obj:`~.CUarrayMapInfo.resourceType` specifies the type of resource to be operated on. If :py:obj:`~.CUarrayMapInfo.resourceType` is set to :py:obj:`~.CUresourcetype`::CU_RESOURCE_TYPE_ARRAY then - :py:obj:`~.CUarrayMapInfo`::resource::array must be set to a valid - sparse CUDA array handle. The CUDA array must be either a 2D, 2D - layered or 3D CUDA array and must have been allocated using - :py:obj:`~.cuArrayCreate` or :py:obj:`~.cuArray3DCreate` with the flag + :py:obj:`~.CUarrayMapInfo.resource.array` must be set to a valid sparse + CUDA array handle. The CUDA array must be either a 2D, 2D layered or 3D + CUDA array and must have been allocated using :py:obj:`~.cuArrayCreate` + or :py:obj:`~.cuArray3DCreate` with the flag :py:obj:`~.CUDA_ARRAY3D_SPARSE` or :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING`. For CUDA arrays obtained using :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. If :py:obj:`~.CUarrayMapInfo.resourceType` is set to :py:obj:`~.CUresourcetype`::CU_RESOURCE_TYPE_MIPMAPPED_ARRAY then - :py:obj:`~.CUarrayMapInfo`::resource::mipmap must be set to a valid + :py:obj:`~.CUarrayMapInfo.resource.mipmap` must be set to a valid sparse CUDA mipmapped array handle. The CUDA mipmapped array must be either a 2D, 2D layered or 3D CUDA mipmapped array and must have been allocated using :py:obj:`~.cuMipmappedArrayCreate` with the flag @@ -34765,26 +34762,25 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr If :py:obj:`~.CUarrayMapInfo.subresourceType` is set to :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL - then :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel struct must + then :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel` struct must contain valid array subregion offsets and extents. The - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetX, - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetY and - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetZ must - specify valid X, Y and Z offsets respectively. The - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentWidth, - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentHeight and - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentDepth must + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.offsetX`, + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.offsetY` and + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.offsetZ` must specify + valid X, Y and Z offsets respectively. The + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.extentWidth`, + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.extentHeight` and + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.extentDepth` must specify valid width, height and depth extents respectively. These offsets and extents must be aligned to the corresponding tile dimension. For CUDA mipmapped arrays - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::level must - specify a valid mip level index. Otherwise, must be zero. For layered - CUDA arrays and layered CUDA mipmapped arrays - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::layer must - specify a valid layer index. Otherwise, must be zero. - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetZ must be - zero and - :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentDepth must + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.level` must specify a + valid mip level index. Otherwise, must be zero. For layered CUDA arrays + and layered CUDA mipmapped arrays + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.layer` must specify a + valid layer index. Otherwise, must be zero. + :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.offsetZ` must be zero + and :py:obj:`~.CUarrayMapInfo.subresource.sparseLevel.extentDepth` must be set to 1 for 2D and 2D layered CUDA arrays and CUDA mipmapped arrays. Tile extents can be obtained by calling :py:obj:`~.cuArrayGetSparseProperties` and @@ -34792,23 +34788,23 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr If :py:obj:`~.CUarrayMapInfo.subresourceType` is set to :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL - then :py:obj:`~.CUarrayMapInfo`::subresource::miptail struct must - contain valid mip tail offset in - :py:obj:`~.CUarrayMapInfo`::subresource::miptail::offset and size in - :py:obj:`~.CUarrayMapInfo`::subresource::miptail::size. Both, mip tail + then :py:obj:`~.CUarrayMapInfo.subresource.miptail` struct must contain + valid mip tail offset in + :py:obj:`~.CUarrayMapInfo.subresource.miptail.offset` and size in + :py:obj:`~.CUarrayMapInfo.subresource.miptail.size`. Both, mip tail offset and mip tail size must be aligned to the tile size. For layered CUDA mipmapped arrays which don't have the flag :py:obj:`~.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL` set in :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.flags` as returned by :py:obj:`~.cuMipmappedArrayGetSparseProperties`, - :py:obj:`~.CUarrayMapInfo`::subresource::miptail::layer must specify a + :py:obj:`~.CUarrayMapInfo.subresource.miptail.layer` must specify a valid layer index. Otherwise, must be zero. - If :py:obj:`~.CUarrayMapInfo`::resource::array or - :py:obj:`~.CUarrayMapInfo`::resource::mipmap was created with + If :py:obj:`~.CUarrayMapInfo.resource.array` or + :py:obj:`~.CUarrayMapInfo.resource.mipmap` was created with :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING` flag set the :py:obj:`~.CUarrayMapInfo.subresourceType` and the contents of - :py:obj:`~.CUarrayMapInfo`::subresource will be ignored. + :py:obj:`~.CUarrayMapInfo.subresource` will be ignored. :py:obj:`~.CUarrayMapInfo.memOperationType` specifies the type of operation. :py:obj:`~.CUmemOperationType` is defined as: @@ -34818,7 +34814,7 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr If :py:obj:`~.CUarrayMapInfo.memOperationType` is set to :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_MAP then the subresource will be mapped onto the tile pool memory specified by - :py:obj:`~.CUarrayMapInfo`::memHandle at offset + :py:obj:`~.CUarrayMapInfo.memHandle` at offset :py:obj:`~.CUarrayMapInfo.offset`. The tile pool allocation has to be created by specifying the :py:obj:`~.CU_MEM_CREATE_USAGE_TILE_POOL` flag when calling :py:obj:`~.cuMemCreate`. Also, @@ -34827,7 +34823,7 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr If :py:obj:`~.CUarrayMapInfo.memOperationType` is set to :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_UNMAP then an - unmapping operation is performed. :py:obj:`~.CUarrayMapInfo`::memHandle + unmapping operation is performed. :py:obj:`~.CUarrayMapInfo.memHandle` must be NULL. :py:obj:`~.CUarrayMapInfo.deviceBitMask` specifies the list of devices @@ -34837,7 +34833,7 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr :py:obj:`~.CUarrayMapInfo.memOperationType` is set to :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_MAP, the device must also match the device associated with the tile pool memory - allocation as specified by :py:obj:`~.CUarrayMapInfo`::memHandle. + allocation as specified by :py:obj:`~.CUarrayMapInfo.memHandle`. :py:obj:`~.CUarrayMapInfo.flags` and :py:obj:`~.CUarrayMapInfo.reserved`[] are unused and must be set to @@ -35043,7 +35039,7 @@ def cuMemGetAccess(location : Optional[CUmemLocation], ptr): pptr = int(CUdeviceptr(ptr)) cyptr = pptr cdef unsigned long long flags = 0 - cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL with nogil: err = cydriver.cuMemGetAccess(&flags, cylocation_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: @@ -35192,7 +35188,7 @@ def cuMemGetAllocationGranularity(prop : Optional[CUmemAllocationProp], option n :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` """ cdef size_t granularity = 0 - cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL cdef cydriver.CUmemAllocationGranularity_flags cyoption = int(option) with nogil: err = cydriver.cuMemGetAllocationGranularity(&granularity, cyprop_ptr, cyoption) @@ -35682,7 +35678,7 @@ def cuMemPoolGetAccess(memPool, location : Optional[CUmemLocation]): pmemPool = int(CUmemoryPool(memPool)) cymemPool = pmemPool cdef cydriver.CUmemAccess_flags flags - cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL with nogil: err = cydriver.cuMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) if err != cydriver.CUDA_SUCCESS: @@ -35757,7 +35753,7 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC. """ cdef CUmemoryPool pool = CUmemoryPool() - cdef cydriver.CUmemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps is not None else NULL + cdef cydriver.CUmemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps is not None else NULL with nogil: err = cydriver.cuMemPoolCreate(pool._pvt_ptr, cypoolProps_ptr) if err != cydriver.CUDA_SUCCESS: @@ -36065,7 +36061,7 @@ def cuMemPoolImportPointer(pool, shareData : Optional[CUmemPoolPtrExportData]): ppool = int(CUmemoryPool(pool)) cypool = ppool cdef CUdeviceptr ptr_out = CUdeviceptr() - cdef cydriver.CUmemPoolPtrExportData* cyshareData_ptr = shareData._pvt_ptr if shareData is not None else NULL + cdef cydriver.CUmemPoolPtrExportData* cyshareData_ptr = shareData._pvt_ptr if shareData is not None else NULL with nogil: err = cydriver.cuMemPoolImportPointer(ptr_out._pvt_ptr, cypool, cyshareData_ptr) if err != cydriver.CUDA_SUCCESS: @@ -36126,7 +36122,7 @@ def cuMulticastCreate(prop : Optional[CUmulticastObjectProp]): :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` """ cdef CUmemGenericAllocationHandle mcHandle = CUmemGenericAllocationHandle() - cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL with nogil: err = cydriver.cuMulticastCreate(mcHandle._pvt_ptr, cyprop_ptr) if err != cydriver.CUDA_SUCCESS: @@ -36435,7 +36431,7 @@ def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not :py:obj:`~.cuMulticastCreate`, :py:obj:`~.cuMulticastBindMem`, :py:obj:`~.cuMulticastBindAddr`, :py:obj:`~.cuMulticastUnbind` """ cdef size_t granularity = 0 - cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL cdef cydriver.CUmulticastGranularity_flags cyoption = int(option) with nogil: err = cydriver.cuMulticastGetGranularity(&granularity, cyprop_ptr, cyoption) @@ -39346,7 +39342,7 @@ def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : Option phStream = int(CUstream(hStream)) cyhStream = phStream cdef cydriver.CUstreamAttrID cyattr = int(attr) - cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) return (_CUresult(err),) @@ -39832,89 +39828,84 @@ def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_ If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD`, then - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::fd must be a - valid file descriptor referencing a memory object. Ownership of the - file descriptor is transferred to the CUDA driver when the handle is + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.fd` must be a valid + file descriptor referencing a memory object. Ownership of the file + descriptor is transferred to the CUDA driver when the handle is imported successfully. Performing any operations on the file descriptor after it is imported results in undefined behavior. If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32`, then exactly - one of - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle and - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must + one of :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` + and :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` must not be NULL. If - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is - not NULL, then it must represent a valid shared NT handle that - references a memory object. Ownership of this handle is not transferred - to CUDA after the import operation, so the application must release the - handle using the appropriate system call. If - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is - not NULL, then it must point to a NULL-terminated array of UTF-16 + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` is not + NULL, then it must represent a valid shared NT handle that references a + memory object. Ownership of this handle is not transferred to CUDA + after the import operation, so the application must release the handle + using the appropriate system call. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` is not + NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a memory object. If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT`, then - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle - must be non-NULL and - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must - be NULL. The handle specified must be a globally shared KMT handle. - This handle does not hold a reference to the underlying object, and - thus will be invalid when all references to the memory object are - destroyed. + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` must + be non-NULL and + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` must be + NULL. The handle specified must be a globally shared KMT handle. This + handle does not hold a reference to the underlying object, and thus + will be invalid when all references to the memory object are destroyed. If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP`, then exactly one - of :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle - and :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name - must not be NULL. If - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is - not NULL, then it must represent a valid shared NT handle that is - returned by ID3D12Device::CreateSharedHandle when referring to a - ID3D12Heap object. This handle holds a reference to the underlying - object. If - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is - not NULL, then it must point to a NULL-terminated array of UTF-16 + of :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` and + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` must not + be NULL. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` is not + NULL, then it must represent a valid shared NT handle that is returned + by ID3D12Device::CreateSharedHandle when referring to a ID3D12Heap + object. This handle holds a reference to the underlying object. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` is not + NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a ID3D12Heap object. If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE`, then exactly - one of - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle and - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must + one of :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` + and :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` must not be NULL. If - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is - not NULL, then it must represent a valid shared NT handle that is - returned by ID3D12Device::CreateSharedHandle when referring to a - ID3D12Resource object. This handle holds a reference to the underlying - object. If - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is - not NULL, then it must point to a NULL-terminated array of UTF-16 + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` is not + NULL, then it must represent a valid shared NT handle that is returned + by ID3D12Device::CreateSharedHandle when referring to a ID3D12Resource + object. This handle holds a reference to the underlying object. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` is not + NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a ID3D12Resource object. If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE`, then - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle - must represent a valid shared NT handle that is returned by + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` must + represent a valid shared NT handle that is returned by IDXGIResource1::CreateSharedHandle when referring to a ID3D11Resource object. If - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is - not NULL, then it must point to a NULL-terminated array of UTF-16 + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` is not + NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a ID3D11Resource object. If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT`, then - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle - must represent a valid shared KMT handle that is returned by + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.handle` must + represent a valid shared KMT handle that is returned by IDXGIResource::GetSharedHandle when referring to a ID3D11Resource object and - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must - be NULL. + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.win32.name` must be + NULL. If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, then - :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::nvSciBufObject - must be non-NULL and reference a valid NvSciBuf object. If the NvSciBuf + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.nvSciBufObject` must + be non-NULL and reference a valid NvSciBuf object. If the NvSciBuf object imported into CUDA is also mapped by other drivers, then the application must use :py:obj:`~.cuWaitExternalSemaphoresAsync` or :py:obj:`~.cuSignalExternalSemaphoresAsync` as appropriate barriers to @@ -39957,7 +39948,7 @@ def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_ and Cache Control" chapter from Vulkan specification. """ cdef CUexternalMemory extMem_out = CUexternalMemory() - cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc is not None else NULL with nogil: err = cydriver.cuImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -40027,7 +40018,7 @@ def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[CUDA_EXTERNAL_ pextMem = int(CUexternalMemory(extMem)) cyextMem = pextMem cdef CUdeviceptr devPtr = CUdeviceptr() - cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc is not None else NULL with nogil: err = cydriver.cuExternalMemoryGetMappedBuffer(devPtr._pvt_ptr, cyextMem, cybufferDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -40100,7 +40091,7 @@ def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[CUDA_E pextMem = int(CUexternalMemory(extMem)) cyextMem = pextMem cdef CUmipmappedArray mipmap = CUmipmappedArray() - cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc is not None else NULL with nogil: err = cydriver.cuExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -40169,7 +40160,7 @@ def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_H If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`, then - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::fd must be a + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.fd` must be a valid file descriptor referencing a synchronization object. Ownership of the file descriptor is transferred to the CUDA driver when the handle is imported successfully. Performing any operations on the file @@ -40178,98 +40169,95 @@ def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_H If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`, then exactly one of - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle - and - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name - must not be NULL. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle - is not NULL, then it must represent a valid shared NT handle that + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` must + not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` is + not NULL, then it must represent a valid shared NT handle that references a synchronization object. Ownership of this handle is not transferred to CUDA after the import operation, so the application must release the handle using the appropriate system call. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` is not NULL, then it must name a valid synchronization object. If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT`, then - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` must be non-NULL and - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name - must be NULL. The handle specified must be a globally shared KMT - handle. This handle does not hold a reference to the underlying object, - and thus will be invalid when all references to the synchronization - object are destroyed. + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` must + be NULL. The handle specified must be a globally shared KMT handle. + This handle does not hold a reference to the underlying object, and + thus will be invalid when all references to the synchronization object + are destroyed. If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`, then exactly one of - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle - and - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name - must not be NULL. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle - is not NULL, then it must represent a valid shared NT handle that is + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` must + not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` is + not NULL, then it must represent a valid shared NT handle that is returned by ID3D12Device::CreateSharedHandle when referring to a ID3D12Fence object. This handle holds a reference to the underlying object. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` is not NULL, then it must name a valid synchronization object that refers to a valid ID3D12Fence object. If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`, then - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` represents a valid shared NT handle that is returned by ID3D11Fence::CreateSharedHandle. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` is not NULL, then it must name a valid synchronization object that refers to a valid ID3D11Fence object. If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`, then - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::nvSciSyncObj + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.nvSciSyncObj` represents a valid NvSciSyncObj. :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`, then - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` represents a valid shared NT handle that is returned by IDXGIResource1::CreateSharedHandle when referring to a IDXGIKeyedMutex object. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` is not NULL, then it must name a valid synchronization object that refers to a valid IDXGIKeyedMutex object. If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`, then - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` represents a valid shared KMT handle that is returned by IDXGIResource::GetSharedHandle when referring to a IDXGIKeyedMutex object and - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name - must be NULL. + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` must + be NULL. If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`, - then :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::fd must - be a valid file descriptor referencing a synchronization object. - Ownership of the file descriptor is transferred to the CUDA driver when - the handle is imported successfully. Performing any operations on the - file descriptor after it is imported results in undefined behavior. + then :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.fd` must be + a valid file descriptor referencing a synchronization object. Ownership + of the file descriptor is transferred to the CUDA driver when the + handle is imported successfully. Performing any operations on the file + descriptor after it is imported results in undefined behavior. If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`, then exactly one of - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle - and - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name - must not be NULL. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle - is not NULL, then it must represent a valid shared NT handle that + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` must + not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.handle` is + not NULL, then it must represent a valid shared NT handle that references a synchronization object. Ownership of this handle is not transferred to CUDA after the import operation, so the application must release the handle using the appropriate system call. If - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.handle.win32.name` is not NULL, then it must name a valid synchronization object. Parameters @@ -40289,7 +40277,7 @@ def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_H :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` """ cdef CUexternalSemaphore extSem_out = CUexternalSemaphore() - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc is not None else NULL + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc is not None else NULL with nogil: err = cydriver.cuImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -40322,15 +40310,15 @@ def cuSignalExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemap :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`, :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32` then the semaphore will be set to the value specified in - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::fence::value. + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.params.fence.value`. If the semaphore object is of the type :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC` this API sets - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.params.nvSciSync.fence` to a value that can be used by subsequent waiters of the same NvSciSync object to order operations with those currently submitted in `stream`. Such an update will overwrite previous contents of - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence. + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.params.nvSciSync.fence`. By default, signaling such an external semaphore object causes appropriate memory synchronization operations to be performed over all external memory objects that are imported as @@ -40465,12 +40453,12 @@ def cuWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemapho :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32` then waiting on the semaphore will wait until the value of the semaphore is greater than or equal to - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::fence::value. + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.params.fence.value`. If the semaphore object is of the type :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC` then, waiting on the semaphore will wait until the - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.params.nvSciSync.fence` is signaled by the signaler of the NvSciSyncObj that was associated with this semaphore object. By default, waiting on such an external semaphore object causes appropriate memory synchronization operations @@ -40494,9 +40482,9 @@ def cuWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemapho :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT` then the keyed mutex will be acquired when it is released with the key specified in - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::keyedmutex::key + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.params.keyedmutex.key` or until the timeout specified by - :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::keyedmutex::timeoutMs + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.params.keyedmutex.timeoutMs` has lapsed. The timeout interval can either be a finite value specified in milliseconds or an infinite value. In case an infinite value is specified the timeout never elapses. The windows INFINITE macro must be @@ -41725,7 +41713,7 @@ def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_pt other than 0 or 1 is not allowed. On success, a handle will be returned via - :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode + :py:obj:`~.CUlaunchAttributeValue.deviceUpdatableKernelNode.devNode` which can be passed to the various device-side update functions to update the node's kernel parameters from within another kernel. For more information on the types of device updates that can be made, as @@ -41827,7 +41815,7 @@ def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_pt else: pf = int(CUfunction(f)) cyf = pf - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL cykernelParams = _HelperKernelParams(kernelParams) cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: @@ -42645,7 +42633,7 @@ def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream): Notes ----- - In certain cases where cubins are created with no ABI (i.e., using `ptxas` `None` `no`), this function may serialize kernel launches. The CUDA driver retains asynchronous behavior by growing the per-thread stack as needed per launch and not shrinking it afterwards. + In certain cases where cubins are created with no ABI (i.e., using `ptxas` `--abi-compile` `no`), this function may serialize kernel launches. The CUDA driver retains asynchronous behavior by growing the per-thread stack as needed per launch and not shrinking it afterwards. """ cdef cydriver.CUstream cyhStream if hStream is None: @@ -42936,7 +42924,7 @@ def cuGraphAddKernelNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddKernelNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -43027,7 +43015,7 @@ def cuGraphKernelNodeSetParams(hNode, nodeParams : Optional[CUDA_KERNEL_NODE_PAR else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -43114,7 +43102,7 @@ def cuGraphAddMemcpyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL with nogil: err = cydriver.cuGraphAddMemcpyNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cycopyParams_ptr, cyctx) if len(dependencies) > 1 and cydependencies is not NULL: @@ -43196,7 +43184,7 @@ def cuGraphMemcpyNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMCPY3D]): else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphMemcpyNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -43273,7 +43261,7 @@ def cuGraphAddMemsetNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL with nogil: err = cydriver.cuGraphAddMemsetNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cymemsetParams_ptr, cyctx) if len(dependencies) > 1 and cydependencies is not NULL: @@ -43355,7 +43343,7 @@ def cuGraphMemsetNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMSET_NODE_PAR else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphMemsetNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -43422,7 +43410,7 @@ def cuGraphAddHostNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddHostNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -43504,7 +43492,7 @@ def cuGraphHostNodeSetParams(hNode, nodeParams : Optional[CUDA_HOST_NODE_PARAMS] else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphHostNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -44097,7 +44085,7 @@ def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : Optional[tuple elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -44186,7 +44174,7 @@ def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[CU else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -44254,7 +44242,7 @@ def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : Optional[tuple[C elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -44343,7 +44331,7 @@ def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[CUDA else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -44414,7 +44402,7 @@ def cuGraphAddBatchMemOpNode(hGraph, dependencies : Optional[tuple[CUgraphNode] elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddBatchMemOpNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -44504,7 +44492,7 @@ def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : Optional[CUDA_BATCH_MEM_O else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphBatchMemOpNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -44575,7 +44563,7 @@ def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : Optional[ else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecBatchMemOpNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -44683,7 +44671,7 @@ def cuGraphAddMemAllocNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddMemAllocNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -46350,7 +46338,7 @@ def cuGraphInstantiateWithParams(hGraph, instantiateParams : Optional[CUDA_GRAPH phGraph = int(CUgraph(hGraph)) cyhGraph = phGraph cdef CUgraphExec phGraphExec = CUgraphExec() - cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams is not None else NULL + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams is not None else NULL with nogil: err = cydriver.cuGraphInstantiateWithParams(phGraphExec._pvt_ptr, cyhGraph, cyinstantiateParams_ptr) if err != cydriver.CUDA_SUCCESS: @@ -46476,7 +46464,7 @@ def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecKernelNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -46551,7 +46539,7 @@ def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : Optional[CUDA else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL with nogil: err = cydriver.cuGraphExecMemcpyNodeSetParams(cyhGraphExec, cyhNode, cycopyParams_ptr, cyctx) return (_CUresult(err),) @@ -46631,7 +46619,7 @@ def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : Optional[CU else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL with nogil: err = cydriver.cuGraphExecMemsetNodeSetParams(cyhGraphExec, cyhNode, cymemsetParams_ptr, cyctx) return (_CUresult(err),) @@ -46686,7 +46674,7 @@ def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_H else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecHostNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -46942,7 +46930,7 @@ def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePara else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -47002,7 +46990,7 @@ def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -47620,7 +47608,7 @@ def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, val phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef cydriver.CUkernelNodeAttrID cyattr = int(attr) - cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) return (_CUresult(err),) @@ -47993,7 +47981,7 @@ def cuGraphAddNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUg elif len(dependencies) == 1: cydependencies = (dependencies[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -48089,7 +48077,7 @@ def cuGraphAddNode_v2(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[ cydependencyData = (dependencyData[0])._pvt_ptr if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphAddNode_v2(phGraphNode._pvt_ptr, cyhGraph, cydependencies, cydependencyData, numDependencies, cynodeParams_ptr) if len(dependencies) > 1 and cydependencies is not NULL: @@ -48139,7 +48127,7 @@ def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -48199,7 +48187,7 @@ def cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUgraphNod else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (_CUresult(err),) @@ -48662,7 +48650,7 @@ def cuOccupancyMaxPotentialClusterSize(func, config : Optional[CUlaunchConfig]): pfunc = int(CUfunction(func)) cyfunc = pfunc cdef int clusterSize = 0 - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL with nogil: err = cydriver.cuOccupancyMaxPotentialClusterSize(&clusterSize, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: @@ -48722,7 +48710,7 @@ def cuOccupancyMaxActiveClusters(func, config : Optional[CUlaunchConfig]): pfunc = int(CUfunction(func)) cyfunc = pfunc cdef int numClusters = 0 - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL with nogil: err = cydriver.cuOccupancyMaxActiveClusters(&numClusters, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: @@ -48986,7 +48974,7 @@ def cuTexRefSetAddress2D(hTexRef, desc : Optional[CUDA_ARRAY_DESCRIPTOR], dptr, else: phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef - cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL with nogil: err = cydriver.cuTexRefSetAddress2D(cyhTexRef, cydesc_ptr, cydptr, Pitch) return (_CUresult(err),) @@ -50159,23 +50147,23 @@ def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Option If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to :py:obj:`~.CU_RESOURCE_TYPE_ARRAY`, - :py:obj:`~.CUDA_RESOURCE_DESC`::res::array::hArray must be set to a - valid CUDA array handle. + :py:obj:`~.CUDA_RESOURCE_DESC.res.array.hArray` must be set to a valid + CUDA array handle. If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to :py:obj:`~.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY`, - :py:obj:`~.CUDA_RESOURCE_DESC`::res::mipmap::hMipmappedArray must be - set to a valid CUDA mipmapped array handle. + :py:obj:`~.CUDA_RESOURCE_DESC.res.mipmap.hMipmappedArray` must be set + to a valid CUDA mipmapped array handle. If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to :py:obj:`~.CU_RESOURCE_TYPE_LINEAR`, - :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::devPtr must be set to a - valid device pointer, that is aligned to + :py:obj:`~.CUDA_RESOURCE_DESC.res.linear.devPtr` must be set to a valid + device pointer, that is aligned to :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`. - :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::format and - :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::numChannels describe the + :py:obj:`~.CUDA_RESOURCE_DESC.res.linear.format` and + :py:obj:`~.CUDA_RESOURCE_DESC.res.linear.numChannels` describe the format of each component and the number of components per array - element. :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::sizeInBytes + element. :py:obj:`~.CUDA_RESOURCE_DESC.res.linear.sizeInBytes` specifies the size of the array in bytes. The total number of elements in the linear address range cannot exceed :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH`. The @@ -50184,20 +50172,19 @@ def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Option If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to :py:obj:`~.CU_RESOURCE_TYPE_PITCH2D`, - :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::devPtr must be set to a + :py:obj:`~.CUDA_RESOURCE_DESC.res.pitch2D.devPtr` must be set to a valid device pointer, that is aligned to :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`. - :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::format and - :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::numChannels describe the + :py:obj:`~.CUDA_RESOURCE_DESC.res.pitch2D.format` and + :py:obj:`~.CUDA_RESOURCE_DESC.res.pitch2D.numChannels` describe the format of each component and the number of components per array - element. :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::width and - :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::height specify the width - and height of the array in elements, and cannot exceed + element. :py:obj:`~.CUDA_RESOURCE_DESC.res.pitch2D.width` and + :py:obj:`~.CUDA_RESOURCE_DESC.res.pitch2D.height` specify the width and + height of the array in elements, and cannot exceed :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH` and :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT` - respectively. - :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::pitchInBytes specifies - the pitch between two rows in bytes and has to be aligned to + respectively. :py:obj:`~.CUDA_RESOURCE_DESC.res.pitch2D.pitchInBytes` + specifies the pitch between two rows in bytes and has to be aligned to :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT`. Pitch cannot exceed :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH`. @@ -50357,9 +50344,9 @@ def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Option :py:obj:`~.cuTexObjectDestroy`, :py:obj:`~.cudaCreateTextureObject` """ cdef CUtexObject pTexObject = CUtexObject() - cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL - cdef cydriver.CUDA_TEXTURE_DESC* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc is not None else NULL - cdef cydriver.CUDA_RESOURCE_VIEW_DESC* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc is not None else NULL + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + cdef cydriver.CUDA_TEXTURE_DESC* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc is not None else NULL + cdef cydriver.CUDA_RESOURCE_VIEW_DESC* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc is not None else NULL with nogil: err = cydriver.cuTexObjectCreate(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -50536,9 +50523,9 @@ def cuSurfObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC]): describes the data to perform surface load/stores on. :py:obj:`~.CUDA_RESOURCE_DESC.resType` must be :py:obj:`~.CU_RESOURCE_TYPE_ARRAY` and - :py:obj:`~.CUDA_RESOURCE_DESC`::res::array::hArray must be set to a - valid CUDA array handle. :py:obj:`~.CUDA_RESOURCE_DESC.flags` must be - set to zero. + :py:obj:`~.CUDA_RESOURCE_DESC.res.array.hArray` must be set to a valid + CUDA array handle. :py:obj:`~.CUDA_RESOURCE_DESC.flags` must be set to + zero. Surface objects are only supported on devices of compute capability 3.0 or higher. Additionally, a surface object is an opaque value, and, as @@ -50561,7 +50548,7 @@ def cuSurfObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC]): :py:obj:`~.cuSurfObjectDestroy`, :py:obj:`~.cudaCreateSurfaceObject` """ cdef CUsurfObject pSurfObject = CUsurfObject() - cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL with nogil: err = cydriver.cuSurfObjectCreate(pSurfObject._pvt_ptr, cypResDesc_ptr) if err != cydriver.CUDA_SUCCESS: @@ -51653,7 +51640,7 @@ def cuTensorMapReplaceAddress(tensorMap : Optional[CUtensorMap], globalAddress): -------- :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapEncodeIm2colWide` """ - cdef cydriver.CUtensorMap* cytensorMap_ptr = tensorMap._pvt_ptr if tensorMap is not None else NULL + cdef cydriver.CUtensorMap* cytensorMap_ptr = tensorMap._pvt_ptr if tensorMap is not None else NULL cdef _HelperInputVoidPtrStruct cyglobalAddressHelper cdef void* cyglobalAddress = _helper_input_void_ptr(globalAddress, &cyglobalAddressHelper) with nogil: @@ -52882,7 +52869,7 @@ def cuGetExportTable(pExportTableId : Optional[CUuuid]): None """ cdef void_ptr ppExportTable = 0 - cdef cydriver.CUuuid* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId is not None else NULL + cdef cydriver.CUuuid* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId is not None else NULL with nogil: err = cydriver.cuGetExportTable(&ppExportTable, cypExportTableId_ptr) if err != cydriver.CUDA_SUCCESS: @@ -53271,8 +53258,8 @@ def cuDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[CUdevRe CUresult :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_TYPE`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION` result : list[:py:obj:`~.CUdevResource`] - Output array of `None` resources. Can be NULL to query the number - of groups. + Output array of `CUdevResource` resources. Can be NULL to query the + number of groups. nbGroups : unsigned int This is a pointer, specifying the number of groups that would be or should be created as described below. @@ -53292,7 +53279,7 @@ def cuDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[CUdevRe if cyresult is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(nbGroups) + 'x' + str(sizeof(cydriver.CUdevResource))) cdef unsigned int cynbGroups = nbGroups - cdef cydriver.CUdevResource* cyinput__ptr = input_._pvt_ptr if input_ is not None else NULL + cdef cydriver.CUdevResource* cyinput__ptr = input_._pvt_ptr if input_ is not None else NULL cdef CUdevResource remaining = CUdevResource() with nogil: err = cydriver.cuDevSmResourceSplitByCount(cyresult, &cynbGroups, cyinput__ptr, remaining._pvt_ptr, useFlags, minCount) @@ -53927,7 +53914,7 @@ def cuCheckpointProcessLock(int pid, args : Optional[CUcheckpointLockArgs]): CUresult :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` :py:obj:`~.CUDA_ERROR_NOT_READY` """ - cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessLock(pid, cyargs_ptr) return (_CUresult(err),) @@ -53958,7 +53945,7 @@ def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpoin CUresult :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` """ - cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessCheckpoint(pid, cyargs_ptr) return (_CUresult(err),) @@ -53994,7 +53981,7 @@ def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs] -------- :py:obj:`~.cuInit` """ - cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessRestore(pid, cyargs_ptr) return (_CUresult(err),) @@ -54023,7 +54010,7 @@ def cuCheckpointProcessUnlock(int pid, args : Optional[CUcheckpointUnlockArgs]): CUresult :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` """ - cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessUnlock(pid, cyargs_ptr) return (_CUresult(err),) @@ -54642,7 +54629,7 @@ def cuEGLStreamProducerReturnFrame(conn, eglframe : Optional[CUeglFrame], pStrea cyconn = conn else: raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) - cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL + cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL with nogil: err = cydriver.cuEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) return (_CUresult(err),) diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 3dc3f58e5d..964073f49f 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from libc.stdint cimport intptr_t @@ -52,9 +52,6 @@ ctypedef nvmlMask255_t Mask255 ctypedef nvmlHostname_v1_t Hostname_v1 ctypedef nvmlUnrepairableMemoryStatus_v1_t UnrepairableMemoryStatus_v1 ctypedef nvmlRusdSettings_v1_t RusdSettings_v1 -ctypedef nvmlVgpuSchedulerStateInfo_v2_t VgpuSchedulerStateInfo_v2 -ctypedef nvmlVgpuSchedulerLogEntry_v2_t VgpuSchedulerLogEntry_v2 -ctypedef nvmlVgpuSchedulerState_v2_t VgpuSchedulerState_v2 ctypedef nvmlPowerValue_v2_t PowerValue_v2 ctypedef nvmlVgpuTypeMaxInstance_v1_t VgpuTypeMaxInstance_v1 ctypedef nvmlVgpuProcessUtilizationSample_t VgpuProcessUtilizationSample @@ -70,7 +67,6 @@ ctypedef nvmlWorkloadPowerProfileCurrentProfiles_v1_t WorkloadPowerProfileCurren ctypedef nvmlWorkloadPowerProfileRequestedProfiles_v1_t WorkloadPowerProfileRequestedProfiles_v1 ctypedef nvmlWorkloadPowerProfileUpdateProfiles_v1_t WorkloadPowerProfileUpdateProfiles_v1 ctypedef nvmlPRMTLV_v1_t PRMTLV_v1 -ctypedef nvmlVgpuSchedulerLogInfo_v2_t VgpuSchedulerLogInfo_v2 ctypedef nvmlVgpuSchedulerSetState_t VgpuSchedulerSetState ctypedef nvmlGpmMetricsGet_t GpmMetricsGet ctypedef nvmlPRMCounterList_v1_t PRMCounterList_v1 @@ -158,7 +154,7 @@ cpdef int system_get_cuda_driver_version_v2() except 0 cpdef str system_get_process_name(unsigned int pid) cpdef object system_get_hic_version() cpdef unsigned int unit_get_count() except? 0 -cpdef intptr_t unit_get_handle_by_index(unsigned int ind_ex) except? 0 +cpdef intptr_t unit_get_handle_by_index(unsigned int index) except? 0 cpdef object unit_get_unit_info(intptr_t unit) cpdef object unit_get_led_state(intptr_t unit) cpdef object unit_get_psu_info(intptr_t unit) @@ -166,7 +162,7 @@ cpdef unsigned int unit_get_temperature(intptr_t unit, unsigned int type) except cpdef object unit_get_fan_speed_info(intptr_t unit) cpdef unsigned int device_get_count_v2() except? 0 cpdef object device_get_attributes_v2(intptr_t device) -cpdef intptr_t device_get_handle_by_index_v2(unsigned int ind_ex) except? 0 +cpdef intptr_t device_get_handle_by_index_v2(unsigned int index) except? 0 cpdef intptr_t device_get_handle_by_serial(serial) except? 0 cpdef intptr_t device_get_handle_by_uuid(uuid) except? 0 cpdef intptr_t device_get_handle_by_pci_bus_id_v2(pci_bus_id) except? 0 @@ -183,7 +179,7 @@ cpdef device_set_cpu_affinity(intptr_t device) cpdef device_clear_cpu_affinity(intptr_t device) cpdef unsigned int device_get_numa_node_id(intptr_t device) except? 0 cpdef int device_get_topology_common_ancestor(intptr_t device1, intptr_t device2) except? -1 -cpdef int device_get_p2p_status(intptr_t device1, intptr_t device2, int p2p_ind_ex) except? -1 +cpdef int device_get_p2p_status(intptr_t device1, intptr_t device2, int p2p_index) except? -1 cpdef str device_get_uuid(intptr_t device) cpdef unsigned int device_get_minor_number(intptr_t device) except? 0 cpdef str device_get_board_part_number(intptr_t device) @@ -220,7 +216,7 @@ cpdef unsigned int device_get_fan_control_policy_v2(intptr_t device, unsigned in cpdef unsigned int device_get_num_fans(intptr_t device) except? 0 cpdef object device_get_cooler_info(intptr_t device) cpdef unsigned int device_get_temperature_threshold(intptr_t device, int threshold_type) except? 0 -cpdef object device_get_thermal_settings(intptr_t device, unsigned int sensor_ind_ex) +cpdef object device_get_thermal_settings(intptr_t device, unsigned int sensor_index) cpdef int device_get_performance_state(intptr_t device) except? -1 cpdef unsigned long long device_get_current_clocks_event_reasons(intptr_t device) except? 0 cpdef unsigned long long device_get_supported_clocks_event_reasons(intptr_t device) except? 0 @@ -261,6 +257,7 @@ cpdef tuple device_get_driver_model_v2(intptr_t device) cpdef str device_get_vbios_version(intptr_t device) cpdef object device_get_bridge_chip_info(intptr_t device) cpdef object device_get_compute_running_processes_v3(intptr_t device) +cpdef object device_get_graphics_running_processes_v3(intptr_t device) cpdef object device_get_mps_compute_running_processes_v3(intptr_t device) cpdef int device_on_same_board(intptr_t device1, intptr_t device2) except? 0 cpdef int device_get_api_restriction(intptr_t device, int api_type) except? -1 @@ -350,7 +347,7 @@ cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_ cpdef tuple vgpu_type_get_device_id(unsigned int vgpu_type_id) cpdef unsigned long long vgpu_type_get_framebuffer_size(unsigned int vgpu_type_id) except? 0 cpdef unsigned int vgpu_type_get_num_display_heads(unsigned int vgpu_type_id) except? 0 -cpdef tuple vgpu_type_get_resolution(unsigned int vgpu_type_id, unsigned int display_ind_ex) +cpdef tuple vgpu_type_get_resolution(unsigned int vgpu_type_id, unsigned int display_index) cpdef str vgpu_type_get_license(unsigned int vgpu_type_id) cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0 cpdef unsigned int vgpu_type_get_max_instances(intptr_t device, unsigned int vgpu_type_id) except? 0 @@ -389,7 +386,7 @@ cpdef object vgpu_instance_get_accounting_stats(unsigned int vgpu_instance, unsi cpdef vgpu_instance_clear_accounting_pids(unsigned int vgpu_instance) cpdef object vgpu_instance_get_license_info_v2(unsigned int vgpu_instance) cpdef unsigned int get_excluded_device_count() except? 0 -cpdef object get_excluded_device_info_by_index(unsigned int ind_ex) +cpdef object get_excluded_device_info_by_index(unsigned int index) cpdef int device_set_mig_mode(intptr_t device, unsigned int mode) except? -1 cpdef tuple device_get_mig_mode(intptr_t device) cpdef object device_get_gpu_instance_possible_placements_v2(intptr_t device, unsigned int profile_id) @@ -411,7 +408,7 @@ cpdef unsigned int device_is_mig_device_handle(intptr_t device) except? 0 cpdef unsigned int device_get_gpu_instance_id(intptr_t device) except? 0 cpdef unsigned int device_get_compute_instance_id(intptr_t device) except? 0 cpdef unsigned int device_get_max_mig_device_count(intptr_t device) except? 0 -cpdef intptr_t device_get_mig_device_handle_by_index(intptr_t device, unsigned int ind_ex) except? 0 +cpdef intptr_t device_get_mig_device_handle_by_index(intptr_t device, unsigned int index) except? 0 cpdef intptr_t device_get_device_handle_from_mig_device_handle(intptr_t mig_device) except? 0 cpdef device_power_smoothing_activate_preset_profile(intptr_t device, intptr_t profile) cpdef device_power_smoothing_update_preset_profile_param(intptr_t device, intptr_t profile) @@ -420,3 +417,10 @@ cpdef object device_get_addressing_mode(intptr_t device) cpdef object device_get_repair_status(intptr_t device) cpdef object device_get_power_mizer_mode_v1(intptr_t device) cpdef device_set_power_mizer_mode_v1(intptr_t device, intptr_t power_mizer_mode) +cpdef device_vgpu_force_gsp_unload(intptr_t device) +cpdef object device_get_vgpu_scheduler_state_v2(intptr_t device) +cpdef object gpu_instance_get_vgpu_scheduler_state_v2(intptr_t gpu_instance) +cpdef object device_get_vgpu_scheduler_log_v2(intptr_t device) +cpdef object gpu_instance_get_vgpu_scheduler_log_v2(intptr_t gpu_instance) +cpdef device_set_vgpu_scheduler_state_v2(intptr_t device, intptr_t p_scheduler_state) +cpdef gpu_instance_set_vgpu_scheduler_state_v2(intptr_t gpu_instance, intptr_t p_scheduler_state) diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index 42c9fdcc87..47db816934 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. cimport cython # NOQA @@ -528,7 +528,7 @@ class Return(_FastEnum): See `nvmlReturn_t`. """ SUCCESS = (NVML_SUCCESS, 'The operation was successful.') - ERROR_UNINITIALIZED = (NVML_ERROR_UNINITIALIZED, 'NVML was not first initialized with nvmlInit()') + ERROR_UNINITIALIZED = (NVML_ERROR_UNINITIALIZED, 'NVML was not first initialized with `nvmlInit()`') ERROR_INVALID_ARGUMENT = (NVML_ERROR_INVALID_ARGUMENT, 'A supplied argument is invalid.') ERROR_NOT_SUPPORTED = (NVML_ERROR_NOT_SUPPORTED, 'The requested operation is not available on target device.') ERROR_NO_PERMISSION = (NVML_ERROR_NO_PERMISSION, 'The current user does not have permission for operation.') @@ -759,7 +759,7 @@ class FBCSessionType(_FastEnum): class DetachGpuState(_FastEnum): """ Is the GPU device to be removed from the kernel by - nvmlDeviceRemoveGpu() + `nvmlDeviceRemoveGpu()` See `nvmlDetachGpuState_t`. """ @@ -768,7 +768,7 @@ class DetachGpuState(_FastEnum): class PcieLinkState(_FastEnum): """ - Parent bridge PCIe link state requested by nvmlDeviceRemoveGpu() + Parent bridge PCIe link state requested by `nvmlDeviceRemoveGpu()` See `nvmlPcieLinkState_t`. """ @@ -1903,97 +1903,66 @@ class NvmlError(Exception): class UninitializedError(NvmlError): pass - class InvalidArgumentError(NvmlError): pass - class NotSupportedError(NvmlError): pass - class NoPermissionError(NvmlError): pass - class AlreadyInitializedError(NvmlError): pass - class NotFoundError(NvmlError): pass - class InsufficientSizeError(NvmlError): pass - class InsufficientPowerError(NvmlError): pass - class DriverNotLoadedError(NvmlError): pass - class TimeoutError(NvmlError): pass - class IrqIssueError(NvmlError): pass - class LibraryNotFoundError(NvmlError): pass - class FunctionNotFoundError(NvmlError): pass - class CorruptedInforomError(NvmlError): pass - class GpuIsLostError(NvmlError): pass - class ResetRequiredError(NvmlError): pass - class OperatingSystemError(NvmlError): pass - class LibRmVersionMismatchError(NvmlError): pass - class InUseError(NvmlError): pass - class MemoryError(NvmlError): pass - class NoDataError(NvmlError): pass - class VgpuEccNotSupportedError(NvmlError): pass - class InsufficientResourcesError(NvmlError): pass - class FreqNotSupportedError(NvmlError): pass - class ArgumentVersionMismatchError(NvmlError): pass - class DeprecatedError(NvmlError): pass - class NotReadyError(NvmlError): pass - class GpuNotFoundError(NvmlError): pass - class InvalidStateError(NvmlError): pass - class ResetTypeNotSupportedError(NvmlError): pass - class UnknownError(NvmlError): pass - cdef object _nvml_error_factory(int status): cdef object pystatus = status if status == 1: @@ -2061,7 +2030,6 @@ cdef object _nvml_error_factory(int status): return NvmlError(status) - @cython.profile(False) cpdef int check_status(int status) except 1 nogil: if status != 0: @@ -3174,21 +3142,17 @@ process_info_dtype = _get_process_info_dtype_offsets() cdef class ProcessInfo: """Empty-initialize an array of `nvmlProcessInfo_t`. - The resulting object is of length `size` and of dtype `process_info_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlProcessInfo_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=process_info_dtype) self._data = arr.view(_numpy.recarray) @@ -3356,21 +3320,17 @@ process_detail_v1_dtype = _get_process_detail_v1_dtype_offsets() cdef class ProcessDetail_v1: """Empty-initialize an array of `nvmlProcessDetail_v1_t`. - The resulting object is of length `size` and of dtype `process_detail_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlProcessDetail_v1_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=process_detail_v1_dtype) self._data = arr.view(_numpy.recarray) @@ -4083,21 +4043,17 @@ bridge_chip_info_dtype = _get_bridge_chip_info_dtype_offsets() cdef class BridgeChipInfo: """Empty-initialize an array of `nvmlBridgeChipInfo_t`. - The resulting object is of length `size` and of dtype `bridge_chip_info_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlBridgeChipInfo_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=bridge_chip_info_dtype) self._data = arr.view(_numpy.recarray) @@ -4237,7 +4193,6 @@ value_dtype = _numpy.dtype(( } )) - cdef class Value: """Empty-initialize an instance of `nvmlValue_t`. @@ -4423,7 +4378,7 @@ cdef class Value: cdef _get__py_anon_pod0_dtype_offsets(): - cdef _anon_pod0 pod = _anon_pod0() + cdef cuda_bindings_nvml__anon_pod0 pod = cuda_bindings_nvml__anon_pod0() return _numpy.dtype({ 'names': ['controller', 'default_min_temp', 'default_max_temp', 'current_temp', 'target'], 'formats': [_numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32], @@ -4434,25 +4389,25 @@ cdef _get__py_anon_pod0_dtype_offsets(): (&(pod.currentTemp)) - (&pod), (&(pod.target)) - (&pod), ], - 'itemsize': sizeof(_anon_pod0), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod0), }) _py_anon_pod0_dtype = _get__py_anon_pod0_dtype_offsets() cdef class _py_anon_pod0: - """Empty-initialize an instance of `_anon_pod0`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod0`. - .. seealso:: `_anon_pod0` + .. seealso:: `cuda_bindings_nvml__anon_pod0` """ cdef: - _anon_pod0 *_ptr + cuda_bindings_nvml__anon_pod0 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod0 *>calloc(1, sizeof(_anon_pod0)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") self._owner = None @@ -4460,7 +4415,7 @@ cdef class _py_anon_pod0: self._readonly = False def __dealloc__(self): - cdef _anon_pod0 *ptr + cdef cuda_bindings_nvml__anon_pod0 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -4485,20 +4440,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod0)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod0), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod0), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod0 *>malloc(sizeof(_anon_pod0)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod0)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod0)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4563,7 +4518,7 @@ cdef class _py_anon_pod0: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod0 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod0), _py_anon_pod0) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4587,14 +4542,14 @@ cdef class _py_anon_pod0: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod0 obj = _py_anon_pod0.__new__(_py_anon_pod0) if owner is None: - obj._ptr = <_anon_pod0 *>malloc(sizeof(_anon_pod0)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - memcpy((obj._ptr), ptr, sizeof(_anon_pod0)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod0 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -4604,7 +4559,7 @@ cdef class _py_anon_pod0: cdef _get_cooler_info_v1_dtype_offsets(): cdef nvmlCoolerInfo_v1_t pod = nvmlCoolerInfo_v1_t() return _numpy.dtype({ - 'names': ['version', 'ind_ex', 'signal_type', 'target'], + 'names': ['version', 'index', 'signal_type', 'target'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.int32, _numpy.int32], 'offsets': [ (&(pod.version)) - (&pod), @@ -4695,12 +4650,12 @@ cdef class CoolerInfo_v1: self._ptr[0].version = val @property - def ind_ex(self): + def index(self): """int: the cooler index""" return self._ptr[0].index - @ind_ex.setter - def ind_ex(self, val): + @index.setter + def index(self, val): if self._readonly: raise ValueError("This CoolerInfo_v1 instance is read-only") self._ptr[0].index = val @@ -4784,21 +4739,17 @@ clk_mon_fault_info_dtype = _get_clk_mon_fault_info_dtype_offsets() cdef class ClkMonFaultInfo: """Empty-initialize an array of `nvmlClkMonFaultInfo_t`. - The resulting object is of length `size` and of dtype `clk_mon_fault_info_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlClkMonFaultInfo_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=clk_mon_fault_info_dtype) self._data = arr.view(_numpy.recarray) @@ -5136,21 +5087,17 @@ process_utilization_sample_dtype = _get_process_utilization_sample_dtype_offsets cdef class ProcessUtilizationSample: """Empty-initialize an array of `nvmlProcessUtilizationSample_t`. - The resulting object is of length `size` and of dtype `process_utilization_sample_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlProcessUtilizationSample_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=process_utilization_sample_dtype) self._data = arr.view(_numpy.recarray) @@ -5343,21 +5290,17 @@ process_utilization_info_v1_dtype = _get_process_utilization_info_v1_dtype_offse cdef class ProcessUtilizationInfo_v1: """Empty-initialize an array of `nvmlProcessUtilizationInfo_v1_t`. - The resulting object is of length `size` and of dtype `process_utilization_info_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlProcessUtilizationInfo_v1_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=process_utilization_info_v1_dtype) self._data = arr.view(_numpy.recarray) @@ -5828,7 +5771,7 @@ cdef class EccSramErrorStatus_v1: cdef _get_platform_info_v1_dtype_offsets(): cdef nvmlPlatformInfo_v1_t pod = nvmlPlatformInfo_v1_t() return _numpy.dtype({ - 'names': ['version', 'ib_guid', 'rack_guid', 'chassis_physical_slot_number', 'compute_slot_ind_ex', 'node_ind_ex', 'peer_type', 'module_id'], + 'names': ['version', 'ib_guid', 'rack_guid', 'chassis_physical_slot_number', 'compute_slot_index', 'node_index', 'peer_type', 'module_id'], 'formats': [_numpy.uint32, (_numpy.uint8, 16), (_numpy.uint8, 16), _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8], 'offsets': [ (&(pod.version)) - (&pod), @@ -5968,23 +5911,23 @@ cdef class PlatformInfo_v1: self._ptr[0].chassisPhysicalSlotNumber = val @property - def compute_slot_ind_ex(self): + def compute_slot_index(self): """int: The index within the compute slots in the rack containing this GPU (does not include switches)""" return self._ptr[0].computeSlotIndex - @compute_slot_ind_ex.setter - def compute_slot_ind_ex(self, val): + @compute_slot_index.setter + def compute_slot_index(self, val): if self._readonly: raise ValueError("This PlatformInfo_v1 instance is read-only") self._ptr[0].computeSlotIndex = val @property - def node_ind_ex(self): + def node_index(self): """int: Index of the node within the slot containing this GPU.""" return self._ptr[0].nodeIndex - @node_ind_ex.setter - def node_ind_ex(self, val): + @node_index.setter + def node_index(self, val): if self._readonly: raise ValueError("This PlatformInfo_v1 instance is read-only") self._ptr[0].nodeIndex = val @@ -6055,7 +5998,7 @@ cdef class PlatformInfo_v1: cdef _get_platform_info_v2_dtype_offsets(): cdef nvmlPlatformInfo_v2_t pod = nvmlPlatformInfo_v2_t() return _numpy.dtype({ - 'names': ['version', 'ib_guid', 'chassis_serial_number', 'slot_number', 'tray_ind_ex', 'host_id', 'peer_type', 'module_id'], + 'names': ['version', 'ib_guid', 'chassis_serial_number', 'slot_number', 'tray_index', 'host_id', 'peer_type', 'module_id'], 'formats': [_numpy.uint32, (_numpy.uint8, 16), (_numpy.uint8, 16), _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8], 'offsets': [ (&(pod.version)) - (&pod), @@ -6195,12 +6138,12 @@ cdef class PlatformInfo_v2: self._ptr[0].slotNumber = val @property - def tray_ind_ex(self): + def tray_index(self): """int: The tray index within the compute slots in the chassis containing this GPU (does not include switches)""" return self._ptr[0].trayIndex - @tray_ind_ex.setter - def tray_ind_ex(self, val): + @tray_index.setter + def tray_index(self, val): if self._readonly: raise ValueError("This PlatformInfo_v2 instance is read-only") self._ptr[0].trayIndex = val @@ -6280,7 +6223,7 @@ cdef class PlatformInfo_v2: cdef _get__py_anon_pod1_dtype_offsets(): - cdef _anon_pod1 pod = _anon_pod1() + cdef cuda_bindings_nvml__anon_pod1 pod = cuda_bindings_nvml__anon_pod1() return _numpy.dtype({ 'names': ['b_is_present', 'percentage', 'inc_threshold', 'dec_threshold'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -6290,25 +6233,25 @@ cdef _get__py_anon_pod1_dtype_offsets(): (&(pod.incThreshold)) - (&pod), (&(pod.decThreshold)) - (&pod), ], - 'itemsize': sizeof(_anon_pod1), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod1), }) _py_anon_pod1_dtype = _get__py_anon_pod1_dtype_offsets() cdef class _py_anon_pod1: - """Empty-initialize an instance of `_anon_pod1`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod1`. - .. seealso:: `_anon_pod1` + .. seealso:: `cuda_bindings_nvml__anon_pod1` """ cdef: - _anon_pod1 *_ptr + cuda_bindings_nvml__anon_pod1 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod1 *>calloc(1, sizeof(_anon_pod1)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -6316,7 +6259,7 @@ cdef class _py_anon_pod1: self._readonly = False def __dealloc__(self): - cdef _anon_pod1 *ptr + cdef cuda_bindings_nvml__anon_pod1 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -6341,20 +6284,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod1)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod1), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod1), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod1 *>malloc(sizeof(_anon_pod1)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod1)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod1)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6408,7 +6351,7 @@ cdef class _py_anon_pod1: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod1), _py_anon_pod1) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6432,14 +6375,14 @@ cdef class _py_anon_pod1: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) if owner is None: - obj._ptr = <_anon_pod1 *>malloc(sizeof(_anon_pod1)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof(_anon_pod1)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod1 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -6792,21 +6735,17 @@ vgpu_process_utilization_info_v1_dtype = _get_vgpu_process_utilization_info_v1_d cdef class VgpuProcessUtilizationInfo_v1: """Empty-initialize an array of `nvmlVgpuProcessUtilizationInfo_v1_t`. - The resulting object is of length `size` and of dtype `vgpu_process_utilization_info_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuProcessUtilizationInfo_v1_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=vgpu_process_utilization_info_v1_dtype) self._data = arr.view(_numpy.recarray) @@ -7020,7 +6959,7 @@ cdef class VgpuProcessUtilizationInfo_v1: cdef _get__py_anon_pod2_dtype_offsets(): - cdef _anon_pod2 pod = _anon_pod2() + cdef cuda_bindings_nvml__anon_pod2 pod = cuda_bindings_nvml__anon_pod2() return _numpy.dtype({ 'names': ['avg_factor', 'timeslice'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -7028,25 +6967,25 @@ cdef _get__py_anon_pod2_dtype_offsets(): (&(pod.avgFactor)) - (&pod), (&(pod.timeslice)) - (&pod), ], - 'itemsize': sizeof(_anon_pod2), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod2), }) _py_anon_pod2_dtype = _get__py_anon_pod2_dtype_offsets() cdef class _py_anon_pod2: - """Empty-initialize an instance of `_anon_pod2`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod2`. - .. seealso:: `_anon_pod2` + .. seealso:: `cuda_bindings_nvml__anon_pod2` """ cdef: - _anon_pod2 *_ptr + cuda_bindings_nvml__anon_pod2 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod2 *>calloc(1, sizeof(_anon_pod2)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -7054,7 +6993,7 @@ cdef class _py_anon_pod2: self._readonly = False def __dealloc__(self): - cdef _anon_pod2 *ptr + cdef cuda_bindings_nvml__anon_pod2 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7079,20 +7018,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod2)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod2), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod2), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod2 *>malloc(sizeof(_anon_pod2)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod2)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod2)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7124,7 +7063,7 @@ cdef class _py_anon_pod2: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod2), _py_anon_pod2) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7148,14 +7087,14 @@ cdef class _py_anon_pod2: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) if owner is None: - obj._ptr = <_anon_pod2 *>malloc(sizeof(_anon_pod2)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof(_anon_pod2)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod2 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -7163,32 +7102,32 @@ cdef class _py_anon_pod2: cdef _get__py_anon_pod3_dtype_offsets(): - cdef _anon_pod3 pod = _anon_pod3() + cdef cuda_bindings_nvml__anon_pod3 pod = cuda_bindings_nvml__anon_pod3() return _numpy.dtype({ 'names': ['timeslice'], 'formats': [_numpy.uint32], 'offsets': [ (&(pod.timeslice)) - (&pod), ], - 'itemsize': sizeof(_anon_pod3), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod3), }) _py_anon_pod3_dtype = _get__py_anon_pod3_dtype_offsets() cdef class _py_anon_pod3: - """Empty-initialize an instance of `_anon_pod3`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod3`. - .. seealso:: `_anon_pod3` + .. seealso:: `cuda_bindings_nvml__anon_pod3` """ cdef: - _anon_pod3 *_ptr + cuda_bindings_nvml__anon_pod3 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod3 *>calloc(1, sizeof(_anon_pod3)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -7196,7 +7135,7 @@ cdef class _py_anon_pod3: self._readonly = False def __dealloc__(self): - cdef _anon_pod3 *ptr + cdef cuda_bindings_nvml__anon_pod3 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7221,20 +7160,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod3)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod3), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod3), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod3 *>malloc(sizeof(_anon_pod3)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod3)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod3)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7255,7 +7194,7 @@ cdef class _py_anon_pod3: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod3), _py_anon_pod3) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7279,14 +7218,14 @@ cdef class _py_anon_pod3: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) if owner is None: - obj._ptr = <_anon_pod3 *>malloc(sizeof(_anon_pod3)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof(_anon_pod3)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod3 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -7313,21 +7252,17 @@ vgpu_scheduler_log_entry_dtype = _get_vgpu_scheduler_log_entry_dtype_offsets() cdef class VgpuSchedulerLogEntry: """Empty-initialize an array of `nvmlVgpuSchedulerLogEntry_t`. - The resulting object is of length `size` and of dtype `vgpu_scheduler_log_entry_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuSchedulerLogEntry_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=vgpu_scheduler_log_entry_dtype) self._data = arr.view(_numpy.recarray) @@ -7499,7 +7434,7 @@ cdef class VgpuSchedulerLogEntry: cdef _get__py_anon_pod4_dtype_offsets(): - cdef _anon_pod4 pod = _anon_pod4() + cdef cuda_bindings_nvml__anon_pod4 pod = cuda_bindings_nvml__anon_pod4() return _numpy.dtype({ 'names': ['avg_factor', 'frequency'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -7507,25 +7442,25 @@ cdef _get__py_anon_pod4_dtype_offsets(): (&(pod.avgFactor)) - (&pod), (&(pod.frequency)) - (&pod), ], - 'itemsize': sizeof(_anon_pod4), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod4), }) _py_anon_pod4_dtype = _get__py_anon_pod4_dtype_offsets() cdef class _py_anon_pod4: - """Empty-initialize an instance of `_anon_pod4`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod4`. - .. seealso:: `_anon_pod4` + .. seealso:: `cuda_bindings_nvml__anon_pod4` """ cdef: - _anon_pod4 *_ptr + cuda_bindings_nvml__anon_pod4 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod4 *>calloc(1, sizeof(_anon_pod4)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") self._owner = None @@ -7533,7 +7468,7 @@ cdef class _py_anon_pod4: self._readonly = False def __dealloc__(self): - cdef _anon_pod4 *ptr + cdef cuda_bindings_nvml__anon_pod4 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7558,20 +7493,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod4)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod4), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod4), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod4 *>malloc(sizeof(_anon_pod4)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod4)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod4)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7603,7 +7538,7 @@ cdef class _py_anon_pod4: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod4 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod4), _py_anon_pod4) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7627,14 +7562,14 @@ cdef class _py_anon_pod4: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod4 obj = _py_anon_pod4.__new__(_py_anon_pod4) if owner is None: - obj._ptr = <_anon_pod4 *>malloc(sizeof(_anon_pod4)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - memcpy((obj._ptr), ptr, sizeof(_anon_pod4)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod4 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -7642,32 +7577,32 @@ cdef class _py_anon_pod4: cdef _get__py_anon_pod5_dtype_offsets(): - cdef _anon_pod5 pod = _anon_pod5() + cdef cuda_bindings_nvml__anon_pod5 pod = cuda_bindings_nvml__anon_pod5() return _numpy.dtype({ 'names': ['timeslice'], 'formats': [_numpy.uint32], 'offsets': [ (&(pod.timeslice)) - (&pod), ], - 'itemsize': sizeof(_anon_pod5), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod5), }) _py_anon_pod5_dtype = _get__py_anon_pod5_dtype_offsets() cdef class _py_anon_pod5: - """Empty-initialize an instance of `_anon_pod5`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod5`. - .. seealso:: `_anon_pod5` + .. seealso:: `cuda_bindings_nvml__anon_pod5` """ cdef: - _anon_pod5 *_ptr + cuda_bindings_nvml__anon_pod5 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod5 *>calloc(1, sizeof(_anon_pod5)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") self._owner = None @@ -7675,7 +7610,7 @@ cdef class _py_anon_pod5: self._readonly = False def __dealloc__(self): - cdef _anon_pod5 *ptr + cdef cuda_bindings_nvml__anon_pod5 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7700,20 +7635,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod5)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod5), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod5), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod5 *>malloc(sizeof(_anon_pod5)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod5)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod5)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7734,7 +7669,7 @@ cdef class _py_anon_pod5: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod5 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod5), _py_anon_pod5) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -7758,14 +7693,14 @@ cdef class _py_anon_pod5: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod5 obj = _py_anon_pod5.__new__(_py_anon_pod5) if owner is None: - obj._ptr = <_anon_pod5 *>malloc(sizeof(_anon_pod5)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - memcpy((obj._ptr), ptr, sizeof(_anon_pod5)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod5 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -8425,6 +8360,7 @@ cdef class VgpuTypeIdInfo_v1: object _owner bint _owned bint _readonly + dict _refs def __init__(self): self._ptr = calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) @@ -8433,6 +8369,7 @@ cdef class VgpuTypeIdInfo_v1: self._owner = None self._owned = True self._readonly = False + self._refs = {} def __dealloc__(self): cdef nvmlVgpuTypeIdInfo_v1_t *ptr @@ -8548,6 +8485,7 @@ cdef class VgpuTypeIdInfo_v1: obj._owner = owner obj._owned = False obj._readonly = readonly + obj._refs = {} return obj @@ -8577,6 +8515,7 @@ cdef class ActiveVgpuInstanceInfo_v1: object _owner bint _owned bint _readonly + dict _refs def __init__(self): self._ptr = calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) @@ -8585,6 +8524,7 @@ cdef class ActiveVgpuInstanceInfo_v1: self._owner = None self._owned = True self._readonly = False + self._refs = {} def __dealloc__(self): cdef nvmlActiveVgpuInstanceInfo_v1_t *ptr @@ -8700,6 +8640,7 @@ cdef class ActiveVgpuInstanceInfo_v1: obj._owner = owner obj._owned = False obj._readonly = readonly + obj._refs = {} return obj @@ -8898,21 +8839,17 @@ hwbc_entry_dtype = _get_hwbc_entry_dtype_offsets() cdef class HwbcEntry: """Empty-initialize an array of `nvmlHwbcEntry_t`. - The resulting object is of length `size` and of dtype `hwbc_entry_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlHwbcEntry_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=hwbc_entry_dtype) self._data = arr.view(_numpy.recarray) @@ -9554,21 +9491,17 @@ unit_fan_info_dtype = _get_unit_fan_info_dtype_offsets() cdef class UnitFanInfo: """Empty-initialize an array of `nvmlUnitFanInfo_t`. - The resulting object is of length `size` and of dtype `unit_fan_info_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlUnitFanInfo_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=unit_fan_info_dtype) self._data = arr.view(_numpy.recarray) @@ -9890,21 +9823,17 @@ system_event_data_v1_dtype = _get_system_event_data_v1_dtype_offsets() cdef class SystemEventData_v1: """Empty-initialize an array of `nvmlSystemEventData_v1_t`. - The resulting object is of length `size` and of dtype `system_event_data_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlSystemEventData_v1_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=system_event_data_v1_dtype) self._data = arr.view(_numpy.recarray) @@ -10245,21 +10174,17 @@ encoder_session_info_dtype = _get_encoder_session_info_dtype_offsets() cdef class EncoderSessionInfo: """Empty-initialize an array of `nvmlEncoderSessionInfo_t`. - The resulting object is of length `size` and of dtype `encoder_session_info_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlEncoderSessionInfo_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=encoder_session_info_dtype) self._data = arr.view(_numpy.recarray) @@ -10633,21 +10558,17 @@ fbc_session_info_dtype = _get_fbc_session_info_dtype_offsets() cdef class FBCSessionInfo: """Empty-initialize an array of `nvmlFBCSessionInfo_t`. - The resulting object is of length `size` and of dtype `fbc_session_info_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlFBCSessionInfo_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=fbc_session_info_dtype) self._data = arr.view(_numpy.recarray) @@ -13072,21 +12993,17 @@ gpu_instance_placement_dtype = _get_gpu_instance_placement_dtype_offsets() cdef class GpuInstancePlacement: """Empty-initialize an array of `nvmlGpuInstancePlacement_t`. - The resulting object is of length `size` and of dtype `gpu_instance_placement_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlGpuInstancePlacement_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=gpu_instance_placement_dtype) self._data = arr.view(_numpy.recarray) @@ -13508,21 +13425,17 @@ compute_instance_placement_dtype = _get_compute_instance_placement_dtype_offsets cdef class ComputeInstancePlacement: """Empty-initialize an array of `nvmlComputeInstancePlacement_t`. - The resulting object is of length `size` and of dtype `compute_instance_placement_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlComputeInstancePlacement_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=compute_instance_placement_dtype) self._data = arr.view(_numpy.recarray) @@ -14645,21 +14558,17 @@ ecc_sram_unique_uncorrected_error_entry_v1_dtype = _get_ecc_sram_unique_uncorrec cdef class EccSramUniqueUncorrectedErrorEntry_v1: """Empty-initialize an array of `nvmlEccSramUniqueUncorrectedErrorEntry_v1_t`. - The resulting object is of length `size` and of dtype `ecc_sram_unique_uncorrected_error_entry_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlEccSramUniqueUncorrectedErrorEntry_v1_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=ecc_sram_unique_uncorrected_error_entry_v1_dtype) self._data = arr.view(_numpy.recarray) @@ -15491,49 +15400,51 @@ cdef class PRMCounterInput_v1: return obj -cdef _get_excluded_device_info_dtype_offsets(): - cdef nvmlExcludedDeviceInfo_t pod = nvmlExcludedDeviceInfo_t() +cdef _get_vgpu_scheduler_state_info_v2_dtype_offsets(): + cdef nvmlVgpuSchedulerStateInfo_v2_t pod = nvmlVgpuSchedulerStateInfo_v2_t() return _numpy.dtype({ - 'names': ['pci_info', 'uuid'], - 'formats': [pci_info_dtype, (_numpy.int8, 80)], + 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'timeslice'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], 'offsets': [ - (&(pod.pciInfo)) - (&pod), - (&(pod.uuid)) - (&pod), + (&(pod.engineId)) - (&pod), + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.avgFactor)) - (&pod), + (&(pod.timeslice)) - (&pod), ], - 'itemsize': sizeof(nvmlExcludedDeviceInfo_t), + 'itemsize': sizeof(nvmlVgpuSchedulerStateInfo_v2_t), }) -excluded_device_info_dtype = _get_excluded_device_info_dtype_offsets() +vgpu_scheduler_state_info_v2_dtype = _get_vgpu_scheduler_state_info_v2_dtype_offsets() -cdef class ExcludedDeviceInfo: - """Empty-initialize an instance of `nvmlExcludedDeviceInfo_t`. +cdef class VgpuSchedulerStateInfo_v2: + """Empty-initialize an instance of `nvmlVgpuSchedulerStateInfo_v2_t`. - .. seealso:: `nvmlExcludedDeviceInfo_t` + .. seealso:: `nvmlVgpuSchedulerStateInfo_v2_t` """ cdef: - nvmlExcludedDeviceInfo_t *_ptr + nvmlVgpuSchedulerStateInfo_v2_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ExcludedDeviceInfo") + raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlExcludedDeviceInfo_t *ptr + cdef nvmlVgpuSchedulerStateInfo_v2_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL free(ptr) def __repr__(self): - return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" + return f"<{__name__}.VgpuSchedulerStateInfo_v2 object at {hex(id(self))}>" @property def ptr(self): @@ -15547,24 +15458,24 @@ cdef class ExcludedDeviceInfo: return (self._ptr) def __eq__(self, other): - cdef ExcludedDeviceInfo other_ - if not isinstance(other, ExcludedDeviceInfo): + cdef VgpuSchedulerStateInfo_v2 other_ + if not isinstance(other, VgpuSchedulerStateInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15572,49 +15483,66 @@ cdef class ExcludedDeviceInfo: setattr(self, key, val) @property - def pci_info(self): - """PciInfo: """ - return PciInfo.from_ptr(&(self._ptr[0].pciInfo), self._readonly, self) + def engine_id(self): + """int: IN: Engine whose software scheduler state info is fetched. One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" + return self._ptr[0].engineId - @pci_info.setter - def pci_info(self, val): + @engine_id.setter + def engine_id(self, val): if self._readonly: - raise ValueError("This ExcludedDeviceInfo instance is read-only") - cdef PciInfo val_ = val - memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + raise ValueError("This VgpuSchedulerStateInfo_v2 instance is read-only") + self._ptr[0].engineId = val @property - def uuid(self): - """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].uuid) + def scheduler_policy(self): + """int: OUT: Scheduler policy.""" + return self._ptr[0].schedulerPolicy - @uuid.setter - def uuid(self, val): + @scheduler_policy.setter + def scheduler_policy(self, val): if self._readonly: - raise ValueError("This ExcludedDeviceInfo instance is read-only") - cdef bytes buf = val.encode() - if len(buf) >= 80: - raise ValueError("String too long for field uuid, max length is 79") - cdef char *ptr = buf - memcpy((self._ptr[0].uuid), ptr, 80) + raise ValueError("This VgpuSchedulerStateInfo_v2 instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def avg_factor(self): + """int: OUT: Average factor in compensating the timeslice for Adaptive Round Robin mode.""" + return self._ptr[0].avgFactor + + @avg_factor.setter + def avg_factor(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerStateInfo_v2 instance is read-only") + self._ptr[0].avgFactor = val + + @property + def timeslice(self): + """int: OUT: The timeslice in ns for each software run list as configured, or the default value otherwise.""" + return self._ptr[0].timeslice + + @timeslice.setter + def timeslice(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerStateInfo_v2 instance is read-only") + self._ptr[0].timeslice = val @staticmethod def from_buffer(buffer): - """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + """Create an VgpuSchedulerStateInfo_v2 instance with the memory from the given buffer.""" + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) @staticmethod def from_data(data): - """Create an ExcludedDeviceInfo instance wrapping the given NumPy array. + """Create an VgpuSchedulerStateInfo_v2 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v2_dtype` holding the data. """ - return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return __from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an ExcludedDeviceInfo instance wrapping the given pointer. + """Create an VgpuSchedulerStateInfo_v2 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -15623,87 +15551,615 @@ cdef class ExcludedDeviceInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) + cdef VgpuSchedulerStateInfo_v2 obj = VgpuSchedulerStateInfo_v2.__new__(VgpuSchedulerStateInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_process_detail_list_v1_dtype_offsets(): - cdef nvmlProcessDetailList_v1_t pod = nvmlProcessDetailList_v1_t() +cdef _get_vgpu_scheduler_log_entry_v2_dtype_offsets(): + cdef nvmlVgpuSchedulerLogEntry_v2_t pod = nvmlVgpuSchedulerLogEntry_v2_t() return _numpy.dtype({ - 'names': ['version', 'mode', 'num_proc_array_entries', 'proc_array'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp], + 'names': ['timestamp', 'time_run_total', 'time_run', 'sw_runlist_id', 'target_time_slice', 'cumulative_preemption_time', 'weight'], + 'formats': [_numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint32, _numpy.uint64, _numpy.uint64, _numpy.uint32], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.mode)) - (&pod), - (&(pod.numProcArrayEntries)) - (&pod), - (&(pod.procArray)) - (&pod), + (&(pod.timestamp)) - (&pod), + (&(pod.timeRunTotal)) - (&pod), + (&(pod.timeRun)) - (&pod), + (&(pod.swRunlistId)) - (&pod), + (&(pod.targetTimeSlice)) - (&pod), + (&(pod.cumulativePreemptionTime)) - (&pod), + (&(pod.weight)) - (&pod), ], - 'itemsize': sizeof(nvmlProcessDetailList_v1_t), + 'itemsize': sizeof(nvmlVgpuSchedulerLogEntry_v2_t), }) -process_detail_list_v1_dtype = _get_process_detail_list_v1_dtype_offsets() +vgpu_scheduler_log_entry_v2_dtype = _get_vgpu_scheduler_log_entry_v2_dtype_offsets() -cdef class ProcessDetailList_v1: - """Empty-initialize an instance of `nvmlProcessDetailList_v1_t`. +cdef class VgpuSchedulerLogEntry_v2: + """Empty-initialize an array of `nvmlVgpuSchedulerLogEntry_v2_t`. + The resulting object is of length `size` and of dtype `vgpu_scheduler_log_entry_v2_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlProcessDetailList_v1_t` + .. seealso:: `nvmlVgpuSchedulerLogEntry_v2_t` """ cdef: - nvmlProcessDetailList_v1_t *_ptr - object _owner - bint _owned - bint _readonly - dict _refs - - def __init__(self): - self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating ProcessDetailList_v1") - self._owner = None - self._owned = True - self._readonly = False - self._refs = {} + readonly object _data - def __dealloc__(self): - cdef nvmlProcessDetailList_v1_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - free(ptr) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=vgpu_scheduler_log_entry_v2_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlVgpuSchedulerLogEntry_v2_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlVgpuSchedulerLogEntry_v2_t) }" def __repr__(self): - return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" + if self._data.size > 1: + return f"<{__name__}.VgpuSchedulerLogEntry_v2_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.VgpuSchedulerLogEntry_v2 object at {hex(id(self))}>" @property def ptr(self): """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + return self._data.ctypes.data cdef intptr_t _get_ptr(self): - return (self._ptr) + return self._data.ctypes.data def __int__(self): - return (self._ptr) + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size def __eq__(self, other): - cdef ProcessDetailList_v1 other_ - if not isinstance(other, ProcessDetailList_v1): + cdef object self_data = self._data + if (not isinstance(other, VgpuSchedulerLogEntry_v2)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False - other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + cpython.PyBuffer_Release(buffer) + + @property + def timestamp(self): + """Union[~_numpy.uint64, int]: OUT: Timestamp in ns when this software runlist was preeempted.""" + if self._data.size == 1: + return int(self._data.timestamp[0]) + return self._data.timestamp + + @timestamp.setter + def timestamp(self, val): + self._data.timestamp = val + + @property + def time_run_total(self): + """Union[~_numpy.uint64, int]: OUT: Total time in ns this software runlist has run.""" + if self._data.size == 1: + return int(self._data.time_run_total[0]) + return self._data.time_run_total + + @time_run_total.setter + def time_run_total(self, val): + self._data.time_run_total = val + + @property + def time_run(self): + """Union[~_numpy.uint64, int]: OUT: Time in ns this software runlist ran before preemption.""" + if self._data.size == 1: + return int(self._data.time_run[0]) + return self._data.time_run + + @time_run.setter + def time_run(self, val): + self._data.time_run = val + + @property + def sw_runlist_id(self): + """Union[~_numpy.uint32, int]: OUT: Software runlist Id.""" + if self._data.size == 1: + return int(self._data.sw_runlist_id[0]) + return self._data.sw_runlist_id + + @sw_runlist_id.setter + def sw_runlist_id(self, val): + self._data.sw_runlist_id = val + + @property + def target_time_slice(self): + """Union[~_numpy.uint64, int]: OUT: The actual timeslice after deduction.""" + if self._data.size == 1: + return int(self._data.target_time_slice[0]) + return self._data.target_time_slice + + @target_time_slice.setter + def target_time_slice(self, val): + self._data.target_time_slice = val + + @property + def cumulative_preemption_time(self): + """Union[~_numpy.uint64, int]: OUT: Preemption time in ns for this SW runlist.""" + if self._data.size == 1: + return int(self._data.cumulative_preemption_time[0]) + return self._data.cumulative_preemption_time + + @cumulative_preemption_time.setter + def cumulative_preemption_time(self, val): + self._data.cumulative_preemption_time = val + + @property + def weight(self): + """Union[~_numpy.uint32, int]: OUT: Current weight of this SW runlist.""" + if self._data.size == 1: + return int(self._data.weight[0]) + return self._data.weight + + @weight.setter + def weight(self, val): + self._data.weight = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return VgpuSchedulerLogEntry_v2.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == vgpu_scheduler_log_entry_v2_dtype: + return VgpuSchedulerLogEntry_v2.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerLogEntry_v2 instance with the memory from the given buffer.""" + return VgpuSchedulerLogEntry_v2.from_data(_numpy.frombuffer(buffer, dtype=vgpu_scheduler_log_entry_v2_dtype)) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerLogEntry_v2 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `vgpu_scheduler_log_entry_v2_dtype` holding the data. + """ + cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != vgpu_scheduler_log_entry_v2_dtype: + raise ValueError("data array must be of dtype vgpu_scheduler_log_entry_v2_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + """Create an VgpuSchedulerLogEntry_v2 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_v2_dtype) + obj._data = data.view(_numpy.recarray) + + return obj + + +cdef _get_vgpu_scheduler_state_v2_dtype_offsets(): + cdef nvmlVgpuSchedulerState_v2_t pod = nvmlVgpuSchedulerState_v2_t() + return _numpy.dtype({ + 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'frequency'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], + 'offsets': [ + (&(pod.engineId)) - (&pod), + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.avgFactor)) - (&pod), + (&(pod.frequency)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerState_v2_t), + }) + +vgpu_scheduler_state_v2_dtype = _get_vgpu_scheduler_state_v2_dtype_offsets() + +cdef class VgpuSchedulerState_v2: + """Empty-initialize an instance of `nvmlVgpuSchedulerState_v2_t`. + + + .. seealso:: `nvmlVgpuSchedulerState_v2_t` + """ + cdef: + nvmlVgpuSchedulerState_v2_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerState_v2") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerState_v2_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerState_v2 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerState_v2 other_ + if not isinstance(other, VgpuSchedulerState_v2): + return False + other_ = other + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerState_v2") + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def engine_id(self): + """int: IN: One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" + return self._ptr[0].engineId + + @engine_id.setter + def engine_id(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerState_v2 instance is read-only") + self._ptr[0].engineId = val + + @property + def scheduler_policy(self): + """int: IN: Scheduler policy.""" + return self._ptr[0].schedulerPolicy + + @scheduler_policy.setter + def scheduler_policy(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerState_v2 instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def avg_factor(self): + """int: IN: Average factor in compensating the timeslice for Adaptive Round Robin mode. 0 or unspecified uses default.""" + return self._ptr[0].avgFactor + + @avg_factor.setter + def avg_factor(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerState_v2 instance is read-only") + self._ptr[0].avgFactor = val + + @property + def frequency(self): + """int: IN: Frequency for Adaptive Round Robin mode. 0 or unspecified uses default.""" + return self._ptr[0].frequency + + @frequency.setter + def frequency(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerState_v2 instance is read-only") + self._ptr[0].frequency = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerState_v2 instance with the memory from the given buffer.""" + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerState_v2 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v2_dtype` holding the data. + """ + return __from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuSchedulerState_v2 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerState_v2 obj = VgpuSchedulerState_v2.__new__(VgpuSchedulerState_v2) + if owner is None: + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerState_v2") + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_excluded_device_info_dtype_offsets(): + cdef nvmlExcludedDeviceInfo_t pod = nvmlExcludedDeviceInfo_t() + return _numpy.dtype({ + 'names': ['pci_info', 'uuid'], + 'formats': [pci_info_dtype, (_numpy.int8, 80)], + 'offsets': [ + (&(pod.pciInfo)) - (&pod), + (&(pod.uuid)) - (&pod), + ], + 'itemsize': sizeof(nvmlExcludedDeviceInfo_t), + }) + +excluded_device_info_dtype = _get_excluded_device_info_dtype_offsets() + +cdef class ExcludedDeviceInfo: + """Empty-initialize an instance of `nvmlExcludedDeviceInfo_t`. + + + .. seealso:: `nvmlExcludedDeviceInfo_t` + """ + cdef: + nvmlExcludedDeviceInfo_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ExcludedDeviceInfo") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlExcludedDeviceInfo_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + free(ptr) + + def __repr__(self): + return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef ExcludedDeviceInfo other_ + if not isinstance(other, ExcludedDeviceInfo): + return False + other_ = other + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ExcludedDeviceInfo") + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def pci_info(self): + """PciInfo: """ + return PciInfo.from_ptr(&(self._ptr[0].pciInfo), self._readonly, self) + + @pci_info.setter + def pci_info(self, val): + if self._readonly: + raise ValueError("This ExcludedDeviceInfo instance is read-only") + cdef PciInfo val_ = val + memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + + @property + def uuid(self): + """~_numpy.int8: (array of length 80).""" + return cpython.PyUnicode_FromString(self._ptr[0].uuid) + + @uuid.setter + def uuid(self, val): + if self._readonly: + raise ValueError("This ExcludedDeviceInfo instance is read-only") + cdef bytes buf = val.encode() + if len(buf) >= 80: + raise ValueError("String too long for field uuid, max length is 79") + cdef char *ptr = buf + memcpy((self._ptr[0].uuid), ptr, 80) + + @staticmethod + def from_buffer(buffer): + """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" + return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + + @staticmethod + def from_data(data): + """Create an ExcludedDeviceInfo instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. + """ + return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an ExcludedDeviceInfo instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) + if owner is None: + obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating ExcludedDeviceInfo") + memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_process_detail_list_v1_dtype_offsets(): + cdef nvmlProcessDetailList_v1_t pod = nvmlProcessDetailList_v1_t() + return _numpy.dtype({ + 'names': ['version', 'mode', 'num_proc_array_entries', 'proc_array'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.mode)) - (&pod), + (&(pod.numProcArrayEntries)) - (&pod), + (&(pod.procArray)) - (&pod), + ], + 'itemsize': sizeof(nvmlProcessDetailList_v1_t), + }) + +process_detail_list_v1_dtype = _get_process_detail_list_v1_dtype_offsets() + +cdef class ProcessDetailList_v1: + """Empty-initialize an instance of `nvmlProcessDetailList_v1_t`. + + + .. seealso:: `nvmlProcessDetailList_v1_t` + """ + cdef: + nvmlProcessDetailList_v1_t *_ptr + object _owner + bint _owned + bint _readonly + dict _refs + + def __init__(self): + self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ProcessDetailList_v1") + self._owner = None + self._owned = True + self._readonly = False + self._refs = {} + + def __dealloc__(self): + cdef nvmlProcessDetailList_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + free(ptr) + + def __repr__(self): + return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef ProcessDetailList_v1 other_ + if not isinstance(other, ProcessDetailList_v1): + return False + other_ = other + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) @@ -15957,21 +16413,17 @@ sample_dtype = _get_sample_dtype_offsets() cdef class Sample: """Empty-initialize an array of `nvmlSample_t`. - The resulting object is of length `size` and of dtype `sample_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlSample_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=sample_dtype) self._data = arr.view(_numpy.recarray) @@ -16116,21 +16568,17 @@ vgpu_instance_utilization_sample_dtype = _get_vgpu_instance_utilization_sample_d cdef class VgpuInstanceUtilizationSample: """Empty-initialize an array of `nvmlVgpuInstanceUtilizationSample_t`. - The resulting object is of length `size` and of dtype `vgpu_instance_utilization_sample_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuInstanceUtilizationSample_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=vgpu_instance_utilization_sample_dtype) self._data = arr.view(_numpy.recarray) @@ -16315,21 +16763,17 @@ vgpu_instance_utilization_info_v1_dtype = _get_vgpu_instance_utilization_info_v1 cdef class VgpuInstanceUtilizationInfo_v1: """Empty-initialize an array of `nvmlVgpuInstanceUtilizationInfo_v1_t`. - The resulting object is of length `size` and of dtype `vgpu_instance_utilization_info_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuInstanceUtilizationInfo_v1_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=vgpu_instance_utilization_info_v1_dtype) self._data = arr.view(_numpy.recarray) @@ -16531,21 +16975,17 @@ field_value_dtype = _get_field_value_dtype_offsets() cdef class FieldValue: """Empty-initialize an array of `nvmlFieldValue_t`. - The resulting object is of length `size` and of dtype `field_value_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlFieldValue_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=field_value_dtype) self._data = arr.view(_numpy.recarray) @@ -16973,7 +17413,7 @@ cdef class GpuThermalSettings: cdef _py_anon_pod0 val_ = val if len(val) != 3: raise ValueError(f"Expected length { 3 } for field sensor, got {len(val)}") - memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(_anon_pod0) * 3) + memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17433,7 +17873,7 @@ cdef class GpuDynamicPstatesInfo: cdef _py_anon_pod1 val_ = val if len(val) != 8: raise ValueError(f"Expected length { 8 } for field utilization, got {len(val)}") - memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(_anon_pod1) * 8) + memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -17659,7 +18099,6 @@ vgpu_scheduler_params_dtype = _numpy.dtype(( } )) - cdef class VgpuSchedulerParams: """Empty-initialize an instance of `nvmlVgpuSchedulerParams_t`. @@ -17736,7 +18175,7 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod2 val_ = val - memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(_anon_pod2) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -17748,7 +18187,7 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod3 val_ = val - memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(_anon_pod3) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): @@ -17799,7 +18238,6 @@ vgpu_scheduler_set_params_dtype = _numpy.dtype(( } )) - cdef class VgpuSchedulerSetParams: """Empty-initialize an instance of `nvmlVgpuSchedulerSetParams_t`. @@ -17876,7 +18314,7 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod4 val_ = val - memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(_anon_pod4) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -17888,7 +18326,7 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod5 val_ = val - memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(_anon_pod5) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): @@ -18107,21 +18545,17 @@ grid_licensable_feature_dtype = _get_grid_licensable_feature_dtype_offsets() cdef class GridLicensableFeature: """Empty-initialize an array of `nvmlGridLicensableFeature_t`. - The resulting object is of length `size` and of dtype `grid_licensable_feature_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlGridLicensableFeature_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=grid_licensable_feature_dtype) self._data = arr.view(_numpy.recarray) @@ -19208,17 +19642,167 @@ cdef class NvlinkFirmwareInfo: return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating NvlinkFirmwareInfo") + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def firmware_version(self): + """NvlinkFirmwareVersion: OUT - NVLINK firmware version.""" + return NvlinkFirmwareVersion.from_ptr(&(self._ptr[0].firmwareVersion), 100, self._readonly) + + @firmware_version.setter + def firmware_version(self, val): + if self._readonly: + raise ValueError("This NvlinkFirmwareInfo instance is read-only") + cdef NvlinkFirmwareVersion val_ = val + if len(val) != 100: + raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") + memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + + @property + def num_valid_entries(self): + """int: OUT - Number of valid firmware entries.""" + return self._ptr[0].numValidEntries + + @num_valid_entries.setter + def num_valid_entries(self, val): + if self._readonly: + raise ValueError("This NvlinkFirmwareInfo instance is read-only") + self._ptr[0].numValidEntries = val + + @staticmethod + def from_buffer(buffer): + """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" + return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + + @staticmethod + def from_data(data): + """Create an NvlinkFirmwareInfo instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. + """ + return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an NvlinkFirmwareInfo instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) + if owner is None: + obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating NvlinkFirmwareInfo") + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_scheduler_log_info_v2_dtype_offsets(): + cdef nvmlVgpuSchedulerLogInfo_v2_t pod = nvmlVgpuSchedulerLogInfo_v2_t() + return _numpy.dtype({ + 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'timeslice', 'entries_count', 'log_entries'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (vgpu_scheduler_log_entry_v2_dtype, 200)], + 'offsets': [ + (&(pod.engineId)) - (&pod), + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.avgFactor)) - (&pod), + (&(pod.timeslice)) - (&pod), + (&(pod.entriesCount)) - (&pod), + (&(pod.logEntries)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerLogInfo_v2_t), + }) + +vgpu_scheduler_log_info_v2_dtype = _get_vgpu_scheduler_log_info_v2_dtype_offsets() + +cdef class VgpuSchedulerLogInfo_v2: + """Empty-initialize an instance of `nvmlVgpuSchedulerLogInfo_v2_t`. + + + .. seealso:: `nvmlVgpuSchedulerLogInfo_v2_t` + """ + cdef: + nvmlVgpuSchedulerLogInfo_v2_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerLogInfo_v2_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerLogInfo_v2 other_ + if not isinstance(other, VgpuSchedulerLogInfo_v2): + return False + other_ = other + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: - raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19226,47 +19810,91 @@ cdef class NvlinkFirmwareInfo: setattr(self, key, val) @property - def firmware_version(self): - """NvlinkFirmwareVersion: OUT - NVLINK firmware version.""" - return NvlinkFirmwareVersion.from_ptr(&(self._ptr[0].firmwareVersion), 100, self._readonly) + def log_entries(self): + """VgpuSchedulerLogEntry_v2: OUT: Structure to store the state and logs of a software runlist.""" + return VgpuSchedulerLogEntry_v2.from_ptr(&(self._ptr[0].logEntries), 200, self._readonly) - @firmware_version.setter - def firmware_version(self, val): + @log_entries.setter + def log_entries(self, val): if self._readonly: - raise ValueError("This NvlinkFirmwareInfo instance is read-only") - cdef NvlinkFirmwareVersion val_ = val - if len(val) != 100: - raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + cdef VgpuSchedulerLogEntry_v2 val_ = val + if len(val) != 200: + raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) @property - def num_valid_entries(self): - """int: OUT - Number of valid firmware entries.""" - return self._ptr[0].numValidEntries + def engine_id(self): + """int: IN: Engine whose software runlist log entries are fetched. One of One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" + return self._ptr[0].engineId - @num_valid_entries.setter - def num_valid_entries(self, val): + @engine_id.setter + def engine_id(self, val): if self._readonly: - raise ValueError("This NvlinkFirmwareInfo instance is read-only") - self._ptr[0].numValidEntries = val + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].engineId = val + + @property + def scheduler_policy(self): + """int: OUT: Scheduler policy.""" + return self._ptr[0].schedulerPolicy + + @scheduler_policy.setter + def scheduler_policy(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def avg_factor(self): + """int: OUT: Average factor in compensating the timeslice for Adaptive Round Robin mode.""" + return self._ptr[0].avgFactor + + @avg_factor.setter + def avg_factor(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].avgFactor = val + + @property + def timeslice(self): + """int: OUT: The timeslice in ns for each software run list as configured, or the default value otherwise.""" + return self._ptr[0].timeslice + + @timeslice.setter + def timeslice(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].timeslice = val + + @property + def entries_count(self): + """int: OUT: Count of log entries fetched.""" + return self._ptr[0].entriesCount + + @entries_count.setter + def entries_count(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].entriesCount = val @staticmethod def from_buffer(buffer): - """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) @staticmethod def from_data(data): - """Create an NvlinkFirmwareInfo instance wrapping the given NumPy array. + """Create an VgpuSchedulerLogInfo_v2 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. """ - return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return __from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an NvlinkFirmwareInfo instance wrapping the given pointer. + """Create an VgpuSchedulerLogInfo_v2 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -19275,16 +19903,16 @@ cdef class NvlinkFirmwareInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) + cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -19484,21 +20112,17 @@ prm_counter_v1_dtype = _get_prm_counter_v1_dtype_offsets() cdef class PRMCounter_v1: """Empty-initialize an array of `nvmlPRMCounter_v1_t`. - The resulting object is of length `size` and of dtype `prm_counter_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlPRMCounter_v1_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=prm_counter_v1_dtype) self._data = arr.view(_numpy.recarray) @@ -19542,7 +20166,7 @@ cdef class PRMCounter_v1: @property def counter_id(self): - """Union[~_numpy.uint32, int]: Counter ID, one of nvmlPRMCounterId_t.""" + """Union[~_numpy.uint32, int]: Counter ID, one of `nvmlPRMCounterId_t`.""" if self._data.size == 1: return int(self._data.counter_id[0]) return self._data.counter_id @@ -20856,7 +21480,6 @@ cdef class NvLinkInfo_v2: return obj - cpdef init_v2(): """Initialize NVML, but don't initialize any GPUs yet. @@ -20868,7 +21491,7 @@ cpdef init_v2(): cpdef init_with_flags(unsigned int flags): - """nvmlInitWithFlags is a variant of nvmlInit(), that allows passing a set of boolean values modifying the behaviour of nvmlInit(). Other than the "flags" parameter it is completely similar to ``nvmlInit_v2``. + """nvmlInitWithFlags is a variant of ``nvmlInit()``, that allows passing a set of boolean values modifying the behaviour of ``nvmlInit()``. Other than the "flags" parameter it is completely similar to ``nvmlInit_v2``. Args: flags (unsigned int): behaviour modifier flags. @@ -20906,6 +21529,9 @@ cpdef str error_string(int result): cpdef str system_get_driver_version(): """Retrieves the version of the system's graphics driver. + Returns: + char: Reference in which to return the version identifier. + .. seealso:: `nvmlSystemGetDriverVersion` """ cdef unsigned int length = 80 @@ -20919,6 +21545,9 @@ cpdef str system_get_driver_version(): cpdef str system_get_nvml_version(): """Retrieves the version of the NVML library. + Returns: + char: Reference in which to return the version identifier. + .. seealso:: `nvmlSystemGetNVMLVersion` """ cdef unsigned int length = 80 @@ -20965,6 +21594,9 @@ cpdef str system_get_process_name(unsigned int pid): Args: pid (unsigned int): The identifier of the process. + Returns: + char: Reference in which to return the process name. + .. seealso:: `nvmlSystemGetProcessName` """ cdef unsigned int length = 1024 @@ -20978,6 +21610,9 @@ cpdef str system_get_process_name(unsigned int pid): cpdef object system_get_hic_version(): """Retrieves the IDs and firmware versions for any Host Interface Cards (HICs) in the system. + Returns: + nvmlHwbcEntry_t: Array holding information about hwbc. + .. seealso:: `nvmlSystemGetHicVersion` """ cdef unsigned int[1] hwbc_count = [0] @@ -21009,11 +21644,11 @@ cpdef unsigned int unit_get_count() except? 0: return unit_count -cpdef intptr_t unit_get_handle_by_index(unsigned int ind_ex) except? 0: - """Acquire the handle for a particular unit, based on its ind_ex. +cpdef intptr_t unit_get_handle_by_index(unsigned int index) except? 0: + """Acquire the handle for a particular unit, based on its index. Args: - ind_ex (unsigned int): The ind_ex of the target unit, >= 0 and < ``unitCount``. + index (unsigned int): The index of the target unit, >= 0 and < ``unitCount``. Returns: intptr_t: Reference in which to return the unit handle. @@ -21022,7 +21657,7 @@ cpdef intptr_t unit_get_handle_by_index(unsigned int ind_ex) except? 0: """ cdef Unit unit with nogil: - __status__ = nvmlUnitGetHandleByIndex(ind_ex, &unit) + __status__ = nvmlUnitGetHandleByIndex(index, &unit) check_status(__status__) return unit @@ -21156,11 +21791,11 @@ cpdef object device_get_attributes_v2(intptr_t device): return attributes_py -cpdef intptr_t device_get_handle_by_index_v2(unsigned int ind_ex) except? 0: - """Acquire the handle for a particular device, based on its ind_ex. +cpdef intptr_t device_get_handle_by_index_v2(unsigned int index) except? 0: + """Acquire the handle for a particular device, based on its index. Args: - ind_ex (unsigned int): The ind_ex of the target GPU, >= 0 and < ``accessibleDevices``. + index (unsigned int): The index of the target GPU, >= 0 and < ``accessibleDevices``. Returns: intptr_t: Reference in which to return the device handle. @@ -21169,7 +21804,7 @@ cpdef intptr_t device_get_handle_by_index_v2(unsigned int ind_ex) except? 0: """ cdef Device device with nogil: - __status__ = nvmlDeviceGetHandleByIndex_v2(ind_ex, &device) + __status__ = nvmlDeviceGetHandleByIndex_v2(index, &device) check_status(__status__) return device @@ -21246,6 +21881,9 @@ cpdef str device_get_name(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + char: Reference in which to return the product name. + .. seealso:: `nvmlDeviceGetName` """ cdef unsigned int length = 96 @@ -21285,11 +21923,11 @@ cpdef unsigned int device_get_index(intptr_t device) except? 0: .. seealso:: `nvmlDeviceGetIndex` """ - cdef unsigned int ind_ex + cdef unsigned int index with nogil: - __status__ = nvmlDeviceGetIndex(device, &ind_ex) + __status__ = nvmlDeviceGetIndex(device, &index) check_status(__status__) - return ind_ex + return index cpdef str device_get_serial(intptr_t device): @@ -21298,6 +21936,9 @@ cpdef str device_get_serial(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + char: Reference in which to return the board/module serial number. + .. seealso:: `nvmlDeviceGetSerial` """ cdef unsigned int length = 30 @@ -21350,8 +21991,11 @@ cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_s Args: device (intptr_t): The identifier of the target device. - node_set_size (unsigned int): The size of the nodeSet array that is safe to access. - scope (unsigned int): Array reference in which to return a bitmask of NODEs, 64 NODEs per unsigned long on 64-bit machines, 32 on 32-bit machines. + node_set_size (unsigned int): The size of the node_set array that is safe to access. + scope (unsigned int): Scope that change the default behavior. + + Returns: + unsigned long: Array reference in which to return a bitmask of NODEs, 64 NODEs per unsigned long on 64-bit machines, 32 on 32-bit machines. .. seealso:: `nvmlDeviceGetMemoryAffinity` """ @@ -21370,8 +22014,11 @@ cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int Args: device (intptr_t): The identifier of the target device. - cpu_set_size (unsigned int): The size of the cpuSet array that is safe to access. - scope (unsigned int): Array reference in which to return a bitmask of CPUs, 64 CPUs per unsigned long on 64-bit machines, 32 on 32-bit machines. + cpu_set_size (unsigned int): The size of the cpu_set array that is safe to access. + scope (unsigned int): Scope that change the default behavior. + + Returns: + unsigned long: Array reference in which to return a bitmask of CPUs, 64 CPUs per unsigned long on 64-bit machines, 32 on 32-bit machines. .. seealso:: `nvmlDeviceGetCpuAffinityWithinScope` """ @@ -21390,7 +22037,10 @@ cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) Args: device (intptr_t): The identifier of the target device. - cpu_set_size (unsigned int): The size of the cpuSet array that is safe to access. + cpu_set_size (unsigned int): The size of the cpu_set array that is safe to access. + + Returns: + unsigned long: Array reference in which to return a bitmask of CPUs, 64 CPUs per unsigned long on 64-bit machines, 32 on 32-bit machines. .. seealso:: `nvmlDeviceGetCpuAffinity` """ @@ -21467,22 +22117,22 @@ cpdef int device_get_topology_common_ancestor(intptr_t device1, intptr_t device2 return path_info -cpdef int device_get_p2p_status(intptr_t device1, intptr_t device2, int p2p_ind_ex) except? -1: +cpdef int device_get_p2p_status(intptr_t device1, intptr_t device2, int p2p_index) except? -1: """Retrieve the status for a given p2p capability index between a given pair of GPU. Args: device1 (intptr_t): The first device. device2 (intptr_t): The second device. - p2p_ind_ex (GpuP2PCapsIndex): p2p Capability Index being looked for between ``device1`` and ``device2``. + p2p_index (GpuP2PCapsIndex): p2p Capability Index being looked for between ``device1`` and ``device2``. Returns: - int: Reference in which to return the status of the ``p2p_ind_ex`` between ``device1`` and ``device2``. + int: Reference in which to return the status of the ``p2p_index`` between ``device1`` and ``device2``. .. seealso:: `nvmlDeviceGetP2PStatus` """ cdef _GpuP2PStatus p2p_status with nogil: - __status__ = nvmlDeviceGetP2PStatus(device1, device2, <_GpuP2PCapsIndex>p2p_ind_ex, &p2p_status) + __status__ = nvmlDeviceGetP2PStatus(device1, device2, <_GpuP2PCapsIndex>p2p_index, &p2p_status) check_status(__status__) return p2p_status @@ -21493,6 +22143,9 @@ cpdef str device_get_uuid(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + char: Reference in which to return the GPU UUID. + .. seealso:: `nvmlDeviceGetUUID` """ cdef unsigned int length = 96 @@ -21527,6 +22180,9 @@ cpdef str device_get_board_part_number(intptr_t device): Args: device (intptr_t): Identifier of the target device. + Returns: + char: Reference to the buffer to return. + .. seealso:: `nvmlDeviceGetBoardPartNumber` """ cdef unsigned int length = 80 @@ -21544,6 +22200,9 @@ cpdef str device_get_inforom_version(intptr_t device, int object): device (intptr_t): The identifier of the target device. object (InforomObject): The target infoROM object. + Returns: + char: Reference in which to return the infoROM version. + .. seealso:: `nvmlDeviceGetInforomVersion` """ cdef unsigned int length = 16 @@ -21560,6 +22219,9 @@ cpdef str device_get_inforom_image_version(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + char: Reference in which to return the infoROM image version. + .. seealso:: `nvmlDeviceGetInforomImageVersion` """ cdef unsigned int length = 16 @@ -21944,6 +22606,9 @@ cpdef object device_get_supported_memory_clocks(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + unsigned int: Reference in which to return the clock in MHz. + .. seealso:: `nvmlDeviceGetSupportedMemoryClocks` """ cdef unsigned int[1] count = [0] @@ -21967,6 +22632,9 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int device (intptr_t): The identifier of the target device. memory_clock_m_hz (unsigned int): Memory clock for which to return possible graphics clocks. + Returns: + unsigned int: Reference in which to return the clocks in MHz. + .. seealso:: `nvmlDeviceGetSupportedGraphicsClocks` """ cdef unsigned int[1] count = [0] @@ -21984,7 +22652,7 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int cpdef tuple device_get_auto_boosted_clocks_enabled(intptr_t device): - """Retrieve the current state of Auto Boosted clocks on a device and store it in ``isEnabled``. + """Retrieve the current state of Auto Boosted clocks on a device and store it in ``is_enabled``. Args: device (intptr_t): The identifier of the target device. @@ -22159,12 +22827,12 @@ cpdef unsigned int device_get_temperature_threshold(intptr_t device, int thresho return temp -cpdef object device_get_thermal_settings(intptr_t device, unsigned int sensor_ind_ex): +cpdef object device_get_thermal_settings(intptr_t device, unsigned int sensor_index): """Used to execute a list of thermal system instructions. Args: device (intptr_t): The identifier of the target device. - sensor_ind_ex (unsigned int): The index of the thermal sensor. + sensor_index (unsigned int): The index of the thermal sensor. Returns: nvmlGpuThermalSettings_t: Reference in which to return the thermal sensor information. @@ -22174,7 +22842,7 @@ cpdef object device_get_thermal_settings(intptr_t device, unsigned int sensor_in cdef GpuThermalSettings p_thermal_settings_py = GpuThermalSettings() cdef nvmlGpuThermalSettings_t *p_thermal_settings = (p_thermal_settings_py._get_ptr()) with nogil: - __status__ = nvmlDeviceGetThermalSettings(device, sensor_ind_ex, p_thermal_settings) + __status__ = nvmlDeviceGetThermalSettings(device, sensor_index, p_thermal_settings) check_status(__status__) return p_thermal_settings_py @@ -22605,7 +23273,7 @@ cpdef int device_get_default_ecc_mode(intptr_t device) except? -1: cpdef unsigned int device_get_board_id(intptr_t device) except? 0: - """Retrieves the device boardId from 0-N. Devices with the same boardId indicate GPUs connected to the same PLX. Use in conjunction with :func:`device_get_multi_gpu_board` to decide if they are on the same board as well. The boardId returned is a unique ID for the current configuration. Uniqueness and ordering across reboots and system configurations is not guaranteed (i.e. if a Tesla K40c returns 0x100 and the two GPUs on a Tesla K10 in the same system returns 0x200 it is not guaranteed they will always return those values but they will always be different from each other). + """Retrieves the device board_id from 0-N. Devices with the same board_id indicate GPUs connected to the same PLX. Use in conjunction with :func:`device_get_multi_gpu_board` to decide if they are on the same board as well. The board_id returned is a unique ID for the current configuration. Uniqueness and ordering across reboots and system configurations is not guaranteed (i.e. if a Tesla K40c returns 0x100 and the two GPUs on a Tesla K10 in the same system returns 0x200 it is not guaranteed they will always return those values but they will always be different from each other). Args: device (intptr_t): The identifier of the target device. @@ -22623,7 +23291,7 @@ cpdef unsigned int device_get_board_id(intptr_t device) except? 0: cpdef unsigned int device_get_multi_gpu_board(intptr_t device) except? 0: - """Retrieves whether the device is on a Multi-GPU Board Devices that are on multi-GPU boards will set ``multiGpuBool`` to a non-zero value. + """Retrieves whether the device is on a Multi-GPU Board Devices that are on multi-GPU boards will set ``multi_gpu_bool`` to a non-zero value. Args: device (intptr_t): The identifier of the target device. @@ -22771,6 +23439,9 @@ cpdef object device_get_encoder_sessions(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + nvmlEncoderSessionInfo_t: Reference in which to return the session information. + .. seealso:: `nvmlDeviceGetEncoderSessions` """ cdef unsigned int[1] session_count = [0] @@ -22878,6 +23549,9 @@ cpdef object device_get_fbc_sessions(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + nvmlFBCSessionInfo_t: Reference in which to return the session information. + .. seealso:: `nvmlDeviceGetFBCSessions` """ cdef unsigned int[1] session_count = [0] @@ -22922,6 +23596,9 @@ cpdef str device_get_vbios_version(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + char: Reference to which to return the VBIOS version. + .. seealso:: `nvmlDeviceGetVbiosVersion` """ cdef unsigned int length = 32 @@ -22957,6 +23634,9 @@ cpdef object device_get_compute_running_processes_v3(intptr_t device): Args: device (intptr_t): The device handle or MIG device handle. + Returns: + nvmlProcessInfo_t: Reference in which to return the process information. + .. seealso:: `nvmlDeviceGetComputeRunningProcesses_v3` """ cdef unsigned int[1] info_count = [0] @@ -22973,12 +23653,40 @@ cpdef object device_get_compute_running_processes_v3(intptr_t device): return infos +cpdef object device_get_graphics_running_processes_v3(intptr_t device): + """Get information about processes with a graphics context on a device. + + Args: + device (intptr_t): The device handle or MIG device handle. + + Returns: + nvmlProcessInfo_t: Reference in which to return the process information. + + .. seealso:: `nvmlDeviceGetGraphicsRunningProcesses_v3` + """ + cdef unsigned int[1] info_count = [0] + with nogil: + __status__ = nvmlDeviceGetGraphicsRunningProcesses_v3(device, info_count, NULL) + check_status_size(__status__) + cdef ProcessInfo infos = ProcessInfo(info_count[0]) + cdef nvmlProcessInfo_t *infos_ptr = (infos._get_ptr()) + if info_count[0] == 0: + return infos + with nogil: + __status__ = nvmlDeviceGetGraphicsRunningProcesses_v3(device, info_count, infos_ptr) + check_status(__status__) + return infos + + cpdef object device_get_mps_compute_running_processes_v3(intptr_t device): """Get information about processes with a Multi-Process Service (MPS) compute context on a device. Args: device (intptr_t): The device handle or MIG device handle. + Returns: + nvmlProcessInfo_t: Reference in which to return the process information. + .. seealso:: `nvmlDeviceGetMPSComputeRunningProcesses_v3` """ cdef unsigned int[1] info_count = [0] @@ -23448,6 +24156,9 @@ cpdef object device_get_accounting_pids(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + unsigned int: Reference in which to return list of process ids. + .. seealso:: `nvmlDeviceGetAccountingPids` """ cdef unsigned int[1] count = [0] @@ -23489,6 +24200,9 @@ cpdef object device_get_retired_pages(intptr_t device, int cause): device (intptr_t): The identifier of the target device. cause (PageRetirementCause): Filter page addresses by cause of retirement. + Returns: + unsigned long long: Buffer to write the page addresses into. + .. seealso:: `nvmlDeviceGetRetiredPages` """ cdef unsigned int[1] page_count = [0] @@ -23524,7 +24238,7 @@ cpdef int device_get_retired_pages_pending_status(intptr_t device) except? -1: cpdef tuple device_get_remapped_rows(intptr_t device): - """Get number of remapped rows. The number of rows reported will be based on the cause of the remapping. isPending indicates whether or not there are pending remappings. A reset will be required to actually remap the row. failureOccurred will be set if a row remapping ever failed in the past. A pending remapping won't affect future work on the GPU since error-containment and dynamic page blacklisting will take care of that. + """Get number of remapped rows. The number of rows reported will be based on the cause of the remapping. is_pending indicates whether or not there are pending remappings. A reset will be required to actually remap the row. failure_occurred will be set if a row remapping ever failed in the past. A pending remapping won't affect future work on the GPU since error-containment and dynamic page blacklisting will take care of that. Args: device (intptr_t): The identifier of the target device. @@ -23610,7 +24324,10 @@ cpdef object device_get_process_utilization(intptr_t device, unsigned long long Args: device (intptr_t): The identifier of the target device. - last_seen_time_stamp (unsigned long long): Pointer to caller-supplied buffer in which guest process utilization samples are returned. + last_seen_time_stamp (unsigned long long): Return only samples with timestamp greater than last_seen_time_stamp. + + Returns: + nvmlProcessUtilizationSample_t: Pointer to caller-supplied buffer in which guest process utilization samples are returned. .. seealso:: `nvmlDeviceGetProcessUtilization` """ @@ -24411,11 +25128,14 @@ cpdef unsigned int device_get_vgpu_capabilities(intptr_t device, int capability) cpdef str vgpu_type_get_class(unsigned int vgpu_type_id): - """Retrieve the class of a vGPU type. It will not exceed 64 characters in length (including the NUL terminator). See ``nvmlConstants.NVML_DEVICE_NAME_BUFFER_SIZE``. + """Retrieve the class of a vGPU type. It will not exceed 64 characters in length (including the NUL terminator). See nvmlConstants::NVML_DEVICE_NAME_BUFFER_SIZE. Args: vgpu_type_id (unsigned int): Handle to vGPU type. + Returns: + char: Pointer to string array to return class in. + .. seealso:: `nvmlVgpuTypeGetClass` """ cdef unsigned int[1] size = [0] @@ -24508,12 +25228,12 @@ cpdef unsigned int vgpu_type_get_num_display_heads(unsigned int vgpu_type_id) ex return num_display_heads -cpdef tuple vgpu_type_get_resolution(unsigned int vgpu_type_id, unsigned int display_ind_ex): +cpdef tuple vgpu_type_get_resolution(unsigned int vgpu_type_id, unsigned int display_index): """Retrieve vGPU display head's maximum supported resolution. Args: vgpu_type_id (unsigned int): Handle to vGPU type. - display_ind_ex (unsigned int): Zero-based index of display head. + display_index (unsigned int): Zero-based index of display head. Returns: A 2-tuple containing: @@ -24526,7 +25246,7 @@ cpdef tuple vgpu_type_get_resolution(unsigned int vgpu_type_id, unsigned int dis cdef unsigned int xdim cdef unsigned int ydim with nogil: - __status__ = nvmlVgpuTypeGetResolution(vgpu_type_id, display_ind_ex, &xdim, &ydim) + __status__ = nvmlVgpuTypeGetResolution(vgpu_type_id, display_index, &xdim, &ydim) check_status(__status__) return (xdim, ydim) @@ -24537,6 +25257,9 @@ cpdef str vgpu_type_get_license(unsigned int vgpu_type_id): Args: vgpu_type_id (unsigned int): Handle to vGPU type. + Returns: + char: Pointer to buffer to return license info. + .. seealso:: `nvmlVgpuTypeGetLicense` """ cdef unsigned int size = 128 @@ -24628,6 +25351,9 @@ cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance): Args: vgpu_instance (unsigned int): Identifier of the target vGPU instance. + Returns: + char: Pointer to caller-supplied buffer to hold vGPU UUID. + .. seealso:: `nvmlVgpuInstanceGetUUID` """ cdef unsigned int size = 80 @@ -24644,6 +25370,9 @@ cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): Args: vgpu_instance (unsigned int): Identifier of the target vGPU instance. + Returns: + char: Caller-supplied buffer to return driver version string. + .. seealso:: `nvmlVgpuInstanceGetVmDriverVersion` """ cdef unsigned int length = 80 @@ -24697,7 +25426,7 @@ cpdef unsigned int vgpu_instance_get_type(unsigned int vgpu_instance) except? 0: vgpu_instance (unsigned int): Identifier of the target vGPU instance. Returns: - unsigned int: Reference to return the vgpuTypeId. + unsigned int: Reference to return the vgpu_type_id. .. seealso:: `nvmlVgpuInstanceGetType` """ @@ -24806,6 +25535,9 @@ cpdef object vgpu_instance_get_encoder_sessions(unsigned int vgpu_instance): Args: vgpu_instance (unsigned int): Identifier of the target vGPU instance. + Returns: + nvmlEncoderSessionInfo_t: Reference to caller supplied array in which the list of session information us returned. + .. seealso:: `nvmlVgpuInstanceGetEncoderSessions` """ cdef unsigned int[1] session_count = [0] @@ -24847,6 +25579,9 @@ cpdef object vgpu_instance_get_fbc_sessions(unsigned int vgpu_instance): Args: vgpu_instance (unsigned int): Identifier of the target vGPU instance. + Returns: + nvmlFBCSessionInfo_t: Reference in which to return the session information. + .. seealso:: `nvmlVgpuInstanceGetFBCSessions` """ cdef unsigned int[1] session_count = [0] @@ -24887,6 +25622,9 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): Args: vgpu_instance (unsigned int): Identifier of the target vGPU instance. + Returns: + char: Caller-supplied buffer to return vGPU PCI Id string. + .. seealso:: `nvmlVgpuInstanceGetGpuPciId` """ cdef unsigned int[1] length = [0] @@ -24904,7 +25642,7 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0: - """Retrieve the requested capability for a given vGPU type. Refer to the ``nvmlVgpuCapability_t`` structure for the specific capabilities that can be queried. The return value in ``capResult`` should be treated as a boolean, with a non-zero value indicating that the capability is supported. + """Retrieve the requested capability for a given vGPU type. Refer to the ``nvmlVgpuCapability_t`` structure for the specific capabilities that can be queried. The return value in ``cap_result`` should be treated as a boolean, with a non-zero value indicating that the capability is supported. Args: vgpu_type_id (unsigned int): Handle to vGPU type. @@ -24928,6 +25666,9 @@ cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance): Args: vgpu_instance (unsigned int): Identifier of the target vGPU instance. + Returns: + char: Pointer to caller-supplied buffer to hold MDEV UUID. + .. seealso:: `nvmlVgpuInstanceGetMdevUUID` """ cdef unsigned int size = 80 @@ -24960,7 +25701,7 @@ cpdef object gpu_instance_get_vgpu_scheduler_state(intptr_t gpu_instance): gpu_instance (intptr_t): The GPU instance handle. Returns: - nvmlVgpuSchedulerStateInfo_v1_t: Reference in which ``pSchedulerStateInfo`` is returned. + nvmlVgpuSchedulerStateInfo_v1_t: Reference in which ``p_scheduler_state_info`` is returned. .. seealso:: `nvmlGpuInstanceGetVgpuSchedulerState` """ @@ -24974,13 +25715,13 @@ cpdef object gpu_instance_get_vgpu_scheduler_state(intptr_t gpu_instance): cpdef object gpu_instance_get_vgpu_scheduler_log(intptr_t gpu_instance): - """Returns the vGPU scheduler logs for the given GPU instance. ``pSchedulerLogInfo`` points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed ``NVML_SCHEDULER_SW_MAX_LOG_ENTRIES``. + """Returns the vGPU scheduler logs for the given GPU instance. ``p_scheduler_log_info`` points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed ``NVML_SCHEDULER_SW_MAX_LOG_ENTRIES``. Args: gpu_instance (intptr_t): The GPU instance handle. Returns: - nvmlVgpuSchedulerLogInfo_v1_t: Reference in which ``pSchedulerLogInfo`` is written. + nvmlVgpuSchedulerLogInfo_v1_t: Reference in which ``p_scheduler_log_info`` is written. .. seealso:: `nvmlGpuInstanceGetVgpuSchedulerLog` """ @@ -24999,6 +25740,9 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): Args: device (intptr_t): The identifier of the target device. + Returns: + char: Pointer to caller-supplied buffer into which ``pgpu_metadata`` is written. + .. seealso:: `nvmlDeviceGetPgpuMetadataString` """ cdef unsigned int[1] buffer_size = [0] @@ -25016,13 +25760,13 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): cpdef object device_get_vgpu_scheduler_log(intptr_t device): - """Returns the vGPU Software scheduler logs. ``pSchedulerLog`` points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed ``NVML_SCHEDULER_SW_MAX_LOG_ENTRIES``. + """Returns the vGPU Software scheduler logs. ``p_scheduler_log`` points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed ``NVML_SCHEDULER_SW_MAX_LOG_ENTRIES``. Args: device (intptr_t): The identifier of the target ``device``. Returns: - nvmlVgpuSchedulerLog_t: Reference in which ``pSchedulerLog`` is written. + nvmlVgpuSchedulerLog_t: Reference in which ``p_scheduler_log`` is written. .. seealso:: `nvmlDeviceGetVgpuSchedulerLog` """ @@ -25041,7 +25785,7 @@ cpdef object device_get_vgpu_scheduler_state(intptr_t device): device (intptr_t): The identifier of the target ``device``. Returns: - nvmlVgpuSchedulerGetState_t: Reference in which ``pSchedulerState`` is returned. + nvmlVgpuSchedulerGetState_t: Reference in which ``p_scheduler_state`` is returned. .. seealso:: `nvmlDeviceGetVgpuSchedulerState` """ @@ -25060,7 +25804,7 @@ cpdef object device_get_vgpu_scheduler_capabilities(intptr_t device): device (intptr_t): The identifier of the target ``device``. Returns: - nvmlVgpuSchedulerCapabilities_t: Reference in which ``pCapabilities`` is written. + nvmlVgpuSchedulerCapabilities_t: Reference in which ``p_capabilities`` is written. .. seealso:: `nvmlDeviceGetVgpuSchedulerCapabilities` """ @@ -25146,6 +25890,9 @@ cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance): Args: vgpu_instance (unsigned int): The identifier of the target vGPU instance. + Returns: + unsigned int: Reference in which to return list of process ids. + .. seealso:: `nvmlVgpuInstanceGetAccountingPids` """ cdef unsigned int[1] count = [0] @@ -25229,11 +25976,11 @@ cpdef unsigned int get_excluded_device_count() except? 0: return device_count -cpdef object get_excluded_device_info_by_index(unsigned int ind_ex): - """Acquire the device information for an excluded GPU device, based on its ind_ex. +cpdef object get_excluded_device_info_by_index(unsigned int index): + """Acquire the device information for an excluded GPU device, based on its index. Args: - ind_ex (unsigned int): The ind_ex of the target GPU, >= 0 and < ``deviceCount``. + index (unsigned int): The index of the target GPU, >= 0 and < ``deviceCount``. Returns: nvmlExcludedDeviceInfo_t: Reference in which to return the device information. @@ -25243,7 +25990,7 @@ cpdef object get_excluded_device_info_by_index(unsigned int ind_ex): cdef ExcludedDeviceInfo info_py = ExcludedDeviceInfo() cdef nvmlExcludedDeviceInfo_t *info = (info_py._get_ptr()) with nogil: - __status__ = nvmlGetExcludedDeviceInfoByIndex(ind_ex, info) + __status__ = nvmlGetExcludedDeviceInfoByIndex(index, info) check_status(__status__) return info_py @@ -25256,7 +26003,7 @@ cpdef int device_set_mig_mode(intptr_t device, unsigned int mode) except? -1: mode (unsigned int): The mode to be set, ``NVML_DEVICE_MIG_DISABLE`` or ``NVML_DEVICE_MIG_ENABLE``. Returns: - int: The activationStatus status. + int: The activation_status status. .. seealso:: `nvmlDeviceSetMigMode` """ @@ -25296,6 +26043,9 @@ cpdef object device_get_gpu_instance_possible_placements_v2(intptr_t device, uns device (intptr_t): The identifier of the target device. profile_id (unsigned int): The GPU instance profile ID. See ``nvmlDeviceGetGpuInstanceProfileInfo``. + Returns: + nvmlGpuInstancePlacement_t: Returns placements allowed for the profile. Can be NULL to discover number of allowed placements for this profile. If non-NULL must be large enough to accommodate the placements supported by the profile. + .. seealso:: `nvmlDeviceGetGpuInstancePossiblePlacements_v2` """ cdef unsigned int[1] count = [0] @@ -25469,6 +26219,9 @@ cpdef object gpu_instance_get_compute_instance_possible_placements(intptr_t gpu_ gpu_instance (intptr_t): The identifier of the target GPU instance. profile_id (unsigned int): The compute instance profile ID. See ``nvmlGpuInstanceGetComputeInstanceProfileInfo``. + Returns: + nvmlComputeInstancePlacement_t: Returns placements allowed for the profile. Can be NULL to discover number of allowed placements for this profile. If non-NULL must be large enough to accommodate the placements supported by the profile. + .. seealso:: `nvmlGpuInstanceGetComputeInstancePossiblePlacements` """ cdef unsigned int[1] count = [0] @@ -25647,12 +26400,12 @@ cpdef unsigned int device_get_max_mig_device_count(intptr_t device) except? 0: return count -cpdef intptr_t device_get_mig_device_handle_by_index(intptr_t device, unsigned int ind_ex) except? 0: - """Get MIG device handle for the given ind_ex under its parent NVML device. +cpdef intptr_t device_get_mig_device_handle_by_index(intptr_t device, unsigned int index) except? 0: + """Get MIG device handle for the given index under its parent NVML device. Args: device (intptr_t): Reference to the parent GPU device handle. - ind_ex (unsigned int): Index of the MIG device. + index (unsigned int): Index of the MIG device. Returns: intptr_t: Reference to the MIG device handle. @@ -25661,7 +26414,7 @@ cpdef intptr_t device_get_mig_device_handle_by_index(intptr_t device, unsigned i """ cdef Device mig_device with nogil: - __status__ = nvmlDeviceGetMigDeviceHandleByIndex(device, ind_ex, &mig_device) + __status__ = nvmlDeviceGetMigDeviceHandleByIndex(device, index, &mig_device) check_status(__status__) return mig_device @@ -25799,6 +26552,123 @@ cpdef device_set_power_mizer_mode_v1(intptr_t device, intptr_t power_mizer_mode) check_status(__status__) +cpdef device_vgpu_force_gsp_unload(intptr_t device): + """Executes a forced GSP unload operation on a device. + + Args: + device (intptr_t): The identifier of the target device. + + .. seealso:: `nvmlDeviceVgpuForceGspUnload` + """ + with nogil: + __status__ = nvmlDeviceVgpuForceGspUnload(device) + check_status(__status__) + + +cpdef object device_get_vgpu_scheduler_state_v2(intptr_t device): + """Returns the vGPU scheduler state. The information returned in ``nvmlVgpuSchedulerStateInfo_v2_t`` is not relevant if the BEST EFFORT policy is set. + + Args: + device (intptr_t): The identifier of the target ``device``. + + Returns: + nvmlVgpuSchedulerStateInfo_v2_t: Reference in which ``p_scheduler_state_info`` is returned. + + .. seealso:: `nvmlDeviceGetVgpuSchedulerState_v2` + """ + cdef VgpuSchedulerStateInfo_v2 p_scheduler_state_info_py = VgpuSchedulerStateInfo_v2() + cdef nvmlVgpuSchedulerStateInfo_v2_t *p_scheduler_state_info = (p_scheduler_state_info_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceGetVgpuSchedulerState_v2(device, p_scheduler_state_info) + check_status(__status__) + return p_scheduler_state_info_py + + +cpdef object gpu_instance_get_vgpu_scheduler_state_v2(intptr_t gpu_instance): + """Returns the vGPU scheduler state for the given GPU instance. The information returned in ``nvmlVgpuSchedulerStateInfo_v2_t`` is not relevant if the BEST EFFORT policy is set. + + Args: + gpu_instance (intptr_t): The GPU instance handle. + + Returns: + nvmlVgpuSchedulerStateInfo_v2_t: Reference in which ``p_scheduler_state_info`` is returned. + + .. seealso:: `nvmlGpuInstanceGetVgpuSchedulerState_v2` + """ + cdef VgpuSchedulerStateInfo_v2 p_scheduler_state_info_py = VgpuSchedulerStateInfo_v2() + cdef nvmlVgpuSchedulerStateInfo_v2_t *p_scheduler_state_info = (p_scheduler_state_info_py._get_ptr()) + with nogil: + __status__ = nvmlGpuInstanceGetVgpuSchedulerState_v2(gpu_instance, p_scheduler_state_info) + check_status(__status__) + return p_scheduler_state_info_py + + +cpdef object device_get_vgpu_scheduler_log_v2(intptr_t device): + """Returns the vGPU Software scheduler logs for the device. ``p_scheduler_log_info`` points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed ``NVML_SCHEDULER_SW_MAX_LOG_ENTRIES``. + + Args: + device (intptr_t): The identifier of the target ``device``. + + Returns: + nvmlVgpuSchedulerLogInfo_v2_t: Reference in which ``p_scheduler_log_info`` is written. + + .. seealso:: `nvmlDeviceGetVgpuSchedulerLog_v2` + """ + cdef VgpuSchedulerLogInfo_v2 p_scheduler_log_info_py = VgpuSchedulerLogInfo_v2() + cdef nvmlVgpuSchedulerLogInfo_v2_t *p_scheduler_log_info = (p_scheduler_log_info_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceGetVgpuSchedulerLog_v2(device, p_scheduler_log_info) + check_status(__status__) + return p_scheduler_log_info_py + + +cpdef object gpu_instance_get_vgpu_scheduler_log_v2(intptr_t gpu_instance): + """Returns the vGPU scheduler logs for the given GPU instance. ``p_scheduler_log_info`` points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed ``NVML_SCHEDULER_SW_MAX_LOG_ENTRIES``. + + Args: + gpu_instance (intptr_t): The GPU instance handle. + + Returns: + nvmlVgpuSchedulerLogInfo_v2_t: Reference in which ``p_scheduler_log_info`` is written. + + .. seealso:: `nvmlGpuInstanceGetVgpuSchedulerLog_v2` + """ + cdef VgpuSchedulerLogInfo_v2 p_scheduler_log_info_py = VgpuSchedulerLogInfo_v2() + cdef nvmlVgpuSchedulerLogInfo_v2_t *p_scheduler_log_info = (p_scheduler_log_info_py._get_ptr()) + with nogil: + __status__ = nvmlGpuInstanceGetVgpuSchedulerLog_v2(gpu_instance, p_scheduler_log_info) + check_status(__status__) + return p_scheduler_log_info_py + + +cpdef device_set_vgpu_scheduler_state_v2(intptr_t device, intptr_t p_scheduler_state): + """Sets the vGPU scheduler state. + + Args: + device (intptr_t): The identifier of the target ``device``. + p_scheduler_state (intptr_t): vGPU ``p_scheduler_state`` to set. + + .. seealso:: `nvmlDeviceSetVgpuSchedulerState_v2` + """ + with nogil: + __status__ = nvmlDeviceSetVgpuSchedulerState_v2(device, p_scheduler_state) + check_status(__status__) + + +cpdef gpu_instance_set_vgpu_scheduler_state_v2(intptr_t gpu_instance, intptr_t p_scheduler_state): + """Set vGPU scheduler state for the given GPU instance. + + Args: + gpu_instance (intptr_t): The GPU instance handle. + p_scheduler_state (intptr_t): Pointer to the caller-provided structure of ``nvmlVgpuSchedulerState_v2_t``. + + .. seealso:: `nvmlGpuInstanceSetVgpuSchedulerState_v2` + """ + with nogil: + __status__ = nvmlGpuInstanceSetVgpuSchedulerState_v2(gpu_instance, p_scheduler_state) + check_status(__status__) + + cpdef object system_get_topology_gpu_set(unsigned int cpuNumber): """Retrieve the set of GPUs that have a CPU affinity with the given CPU number @@ -27472,3 +28342,8 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): check_status(__status__) return cpython.PyUnicode_FromStringAndSize(vgpu_type_name, size[0]) + +# Cleanup some docstrings that don't parse as rst. +device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") +device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") +GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``." \ No newline at end of file diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index 0b17a143ca..2ef677c0a8 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. from libc.stdint cimport intptr_t @@ -39,3 +39,4 @@ cpdef size_t get_compiled_result_size(intptr_t prog) except? 0 cpdef get_compiled_result(intptr_t prog, buffer) cpdef size_t get_program_log_size(intptr_t prog) except? 0 cpdef get_program_log(intptr_t prog, buffer) +cpdef int llvm_version(arch) except? 0 diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index 0077d594e0..cab4a61d1a 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. cimport cython # NOQA @@ -299,3 +299,25 @@ cpdef get_program_log(intptr_t prog, buffer): with nogil: __status__ = nvvmGetProgramLog(prog, _buffer_) check_status(__status__) + + +cpdef int llvm_version(arch) except? 0: + """Get the LLVM IR version guaranteed to be supported by NVVM. + + Args: + arch (str): Architecture string. + + Returns: + int: IR version number. + + .. seealso:: `nvvmLLVMVersion` + """ + if not isinstance(arch, str): + raise TypeError("arch must be a Python str") + cdef bytes _temp_arch_ = (arch).encode() + cdef char* _arch_ = _temp_arch_ + cdef int major + with nogil: + __status__ = nvvmLLVMVersion(_arch_, &major) + check_status(__status__) + return major diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index 154406c684..b7823a070d 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# This code was automatically generated with version 12.9.0, generator version 49a8141. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1588+g61faef43a. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime include "_lib/utils.pxd" @@ -447,7 +447,7 @@ cdef class cudaArrayMemoryRequirements: cdef class cudaPitchedPtr: """ - CUDA Pitched memory pointer ::make_cudaPitchedPtr + CUDA Pitched memory pointer make_cudaPitchedPtr Attributes ---------- @@ -483,7 +483,7 @@ cdef class cudaPitchedPtr: cdef class cudaExtent: """ - CUDA extent ::make_cudaExtent + CUDA extent make_cudaExtent Attributes ---------- @@ -513,7 +513,7 @@ cdef class cudaExtent: cdef class cudaPos: """ - CUDA 3D position ::make_cudaPos + CUDA 3D position make_cudaPos Attributes ---------- @@ -3444,9 +3444,9 @@ cdef class cudaGraphEdgeData_st: {{endif}} {{if 'cudaGraphEdgeData_st.type' in found_struct}} type : bytes - This should be populated with a value from - ::cudaGraphDependencyType. (It is typed as char due to compiler- - specific layout of bitfields.) See ::cudaGraphDependencyType. + This should be populated with a value from cudaGraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See cudaGraphDependencyType. {{endif}} {{if 'cudaGraphEdgeData_st.reserved' in found_struct}} reserved : bytes @@ -3644,8 +3644,8 @@ cdef class cudaLaunchMemSyncDomainMap_st: Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By default, kernels are launched in domain 0. Kernel launched with cudaLaunchMemSyncDomainRemote will have a different domain ID. User - may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for - a specific stream / graph node / kernel launch. See + may also alter the domain ID with cudaLaunchMemSyncDomainMap for a + specific stream / graph node / kernel launch. See cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available through cudaDevAttrMemSyncDomainCount. @@ -3803,8 +3803,7 @@ cdef class anon_struct26: cdef class cudaLaunchAttributeValue: """ - Launch attributes union; used as value field of - ::cudaLaunchAttribute + Launch attributes union; used as value field of cudaLaunchAttribute Attributes ---------- @@ -3824,7 +3823,7 @@ cdef class cudaLaunchAttributeValue: {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} syncPolicy : cudaSynchronizationPolicy Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. - ::cudaSynchronizationPolicy for work queued up in this stream. + cudaSynchronizationPolicy for work queued up in this stream. {{endif}} {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} clusterDim : anon_struct22 @@ -3852,9 +3851,10 @@ cdef class cudaLaunchAttributeValue: Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see - cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - - `int` triggerAtBlockStart - If this is set to non-0, each block - launch will automatically trigger the event. + ::cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. - `int` triggerAtBlockStart - If this + is set to non-0, each block launch will automatically trigger the + event. {{endif}} {{if 'cudaLaunchAttributeValue.priority' in found_struct}} priority : int @@ -3864,7 +3864,7 @@ cdef class cudaLaunchAttributeValue: {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} memSyncDomainMap : cudaLaunchMemSyncDomainMap Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See - ::cudaLaunchMemSyncDomainMap. + cudaLaunchMemSyncDomainMap. {{endif}} {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} memSyncDomain : cudaLaunchMemSyncDomain @@ -3879,19 +3879,19 @@ cdef class cudaLaunchAttributeValue: with the following fields: - `x` - The X dimension of the preferred cluster, in blocks. Must be a divisor of the grid X dimension, and must be a multiple of the `x` field of - cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of - the preferred cluster, in blocks. Must be a divisor of the grid Y - dimension, and must be a multiple of the `y` field of - cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of - the preferred cluster, in blocks. Must be equal to the `z` field of - cudaLaunchAttributeValue::clusterDim. + ::cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension + of the preferred cluster, in blocks. Must be a divisor of the grid + Y dimension, and must be a multiple of the `y` field of + ::cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension + of the preferred cluster, in blocks. Must be equal to the `z` field + of ::cudaLaunchAttributeValue::clusterDim. {{endif}} {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct25 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record - flags, see cudaEventRecordWithFlags. Does not accept + flags, see ::cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. {{endif}} {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} @@ -4349,9 +4349,9 @@ cdef class cudaGraphEdgeData(cudaGraphEdgeData_st): {{endif}} {{if 'cudaGraphEdgeData_st.type' in found_struct}} type : bytes - This should be populated with a value from - ::cudaGraphDependencyType. (It is typed as char due to compiler- - specific layout of bitfields.) See ::cudaGraphDependencyType. + This should be populated with a value from cudaGraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See cudaGraphDependencyType. {{endif}} {{if 'cudaGraphEdgeData_st.reserved' in found_struct}} reserved : bytes @@ -4436,8 +4436,8 @@ cdef class cudaLaunchMemSyncDomainMap(cudaLaunchMemSyncDomainMap_st): Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By default, kernels are launched in domain 0. Kernel launched with cudaLaunchMemSyncDomainRemote will have a different domain ID. User - may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for - a specific stream / graph node / kernel launch. See + may also alter the domain ID with cudaLaunchMemSyncDomainMap for a + specific stream / graph node / kernel launch. See cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available through cudaDevAttrMemSyncDomainCount. @@ -4512,8 +4512,7 @@ cdef class cudaAsyncNotificationInfo_t(cudaAsyncNotificationInfo): cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): """ - Launch attributes union; used as value field of - ::cudaLaunchAttribute + Launch attributes union; used as value field of cudaLaunchAttribute Attributes ---------- @@ -4533,7 +4532,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} syncPolicy : cudaSynchronizationPolicy Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. - ::cudaSynchronizationPolicy for work queued up in this stream. + cudaSynchronizationPolicy for work queued up in this stream. {{endif}} {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} clusterDim : anon_struct22 @@ -4561,9 +4560,10 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see - cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - - `int` triggerAtBlockStart - If this is set to non-0, each block - launch will automatically trigger the event. + ::cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. - `int` triggerAtBlockStart - If this + is set to non-0, each block launch will automatically trigger the + event. {{endif}} {{if 'cudaLaunchAttributeValue.priority' in found_struct}} priority : int @@ -4573,7 +4573,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} memSyncDomainMap : cudaLaunchMemSyncDomainMap Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See - ::cudaLaunchMemSyncDomainMap. + cudaLaunchMemSyncDomainMap. {{endif}} {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} memSyncDomain : cudaLaunchMemSyncDomain @@ -4588,19 +4588,19 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): with the following fields: - `x` - The X dimension of the preferred cluster, in blocks. Must be a divisor of the grid X dimension, and must be a multiple of the `x` field of - cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of - the preferred cluster, in blocks. Must be a divisor of the grid Y - dimension, and must be a multiple of the `y` field of - cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of - the preferred cluster, in blocks. Must be equal to the `z` field of - cudaLaunchAttributeValue::clusterDim. + ::cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension + of the preferred cluster, in blocks. Must be a divisor of the grid + Y dimension, and must be a multiple of the `y` field of + ::cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension + of the preferred cluster, in blocks. Must be equal to the `z` field + of ::cudaLaunchAttributeValue::clusterDim. {{endif}} {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct25 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record - flags, see cudaEventRecordWithFlags. Does not accept + flags, see ::cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. {{endif}} {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} @@ -4629,8 +4629,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): """ - Launch attributes union; used as value field of - ::cudaLaunchAttribute + Launch attributes union; used as value field of cudaLaunchAttribute Attributes ---------- @@ -4650,7 +4649,7 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} syncPolicy : cudaSynchronizationPolicy Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. - ::cudaSynchronizationPolicy for work queued up in this stream. + cudaSynchronizationPolicy for work queued up in this stream. {{endif}} {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} clusterDim : anon_struct22 @@ -4678,9 +4677,10 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see - cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - - `int` triggerAtBlockStart - If this is set to non-0, each block - launch will automatically trigger the event. + ::cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. - `int` triggerAtBlockStart - If this + is set to non-0, each block launch will automatically trigger the + event. {{endif}} {{if 'cudaLaunchAttributeValue.priority' in found_struct}} priority : int @@ -4690,7 +4690,7 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} memSyncDomainMap : cudaLaunchMemSyncDomainMap Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See - ::cudaLaunchMemSyncDomainMap. + cudaLaunchMemSyncDomainMap. {{endif}} {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} memSyncDomain : cudaLaunchMemSyncDomain @@ -4705,19 +4705,19 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): with the following fields: - `x` - The X dimension of the preferred cluster, in blocks. Must be a divisor of the grid X dimension, and must be a multiple of the `x` field of - cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of - the preferred cluster, in blocks. Must be a divisor of the grid Y - dimension, and must be a multiple of the `y` field of - cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of - the preferred cluster, in blocks. Must be equal to the `z` field of - cudaLaunchAttributeValue::clusterDim. + ::cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension + of the preferred cluster, in blocks. Must be a divisor of the grid + Y dimension, and must be a multiple of the `y` field of + ::cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension + of the preferred cluster, in blocks. Must be equal to the `z` field + of ::cudaLaunchAttributeValue::clusterDim. {{endif}} {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct25 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record - flags, see cudaEventRecordWithFlags. Does not accept + flags, see ::cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. {{endif}} {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}}