Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cuda_bindings/cuda/bindings/_internal/_nvml.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.9.1 to 13.0.1. Do not modify it directly.
# This code was automatically generated across versions from 12.9.1 to 13.1.0. Do not modify it directly.

from ..cy_nvml cimport *

Expand Down Expand Up @@ -358,3 +358,6 @@ cdef nvmlReturn_t _nvmlDeviceGetNvLinkInfo(nvmlDevice_t device, nvmlNvLinkInfo_t
cdef nvmlReturn_t _nvmlDeviceReadWritePRM_v1(nvmlDevice_t device, nvmlPRMTLV_v1_t* buffer) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
cdef nvmlReturn_t _nvmlDeviceGetGpuInstanceProfileInfoByIdV(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstanceProfileInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
cdef nvmlReturn_t _nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts(nvmlDevice_t device, nvmlEccSramUniqueUncorrectedErrorCounts_t* errorCounts) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
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
65 changes: 64 additions & 1 deletion cuda_bindings/cuda/bindings/_internal/_nvml_linux.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.9.1 to 13.0.1. Do not modify it directly.
# This code was automatically generated across versions from 12.9.1 to 13.1.0. Do not modify it directly.

from libc.stdint cimport intptr_t, uintptr_t

Expand Down Expand Up @@ -407,6 +407,9 @@ cdef void* __nvmlDeviceGetNvLinkInfo = NULL
cdef void* __nvmlDeviceReadWritePRM_v1 = NULL
cdef void* __nvmlDeviceGetGpuInstanceProfileInfoByIdV = NULL
cdef void* __nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts = NULL
cdef void* __nvmlDeviceGetUnrepairableMemoryFlag_v1 = NULL
cdef void* __nvmlDeviceReadPRMCounters_v1 = NULL
cdef void* __nvmlDeviceSetRusdSettings_v1 = NULL


cdef void* load_library() except* with gil:
Expand Down Expand Up @@ -2852,6 +2855,27 @@ cdef int _init_nvml() except -1 nogil:
handle = load_library()
__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts = dlsym(handle, 'nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts')

global __nvmlDeviceGetUnrepairableMemoryFlag_v1
__nvmlDeviceGetUnrepairableMemoryFlag_v1 = dlsym(RTLD_DEFAULT, 'nvmlDeviceGetUnrepairableMemoryFlag_v1')
if __nvmlDeviceGetUnrepairableMemoryFlag_v1 == NULL:
if handle == NULL:
handle = load_library()
__nvmlDeviceGetUnrepairableMemoryFlag_v1 = dlsym(handle, 'nvmlDeviceGetUnrepairableMemoryFlag_v1')

global __nvmlDeviceReadPRMCounters_v1
__nvmlDeviceReadPRMCounters_v1 = dlsym(RTLD_DEFAULT, 'nvmlDeviceReadPRMCounters_v1')
if __nvmlDeviceReadPRMCounters_v1 == NULL:
if handle == NULL:
handle = load_library()
__nvmlDeviceReadPRMCounters_v1 = dlsym(handle, 'nvmlDeviceReadPRMCounters_v1')

global __nvmlDeviceSetRusdSettings_v1
__nvmlDeviceSetRusdSettings_v1 = dlsym(RTLD_DEFAULT, 'nvmlDeviceSetRusdSettings_v1')
if __nvmlDeviceSetRusdSettings_v1 == NULL:
if handle == NULL:
handle = load_library()
__nvmlDeviceSetRusdSettings_v1 = dlsym(handle, 'nvmlDeviceSetRusdSettings_v1')

__py_nvml_init = True
return 0

Expand Down Expand Up @@ -3915,6 +3939,15 @@ cpdef dict _inspect_function_pointers():
global __nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts
data["__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts"] = <intptr_t>__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts

global __nvmlDeviceGetUnrepairableMemoryFlag_v1
data["__nvmlDeviceGetUnrepairableMemoryFlag_v1"] = <intptr_t>__nvmlDeviceGetUnrepairableMemoryFlag_v1

global __nvmlDeviceReadPRMCounters_v1
data["__nvmlDeviceReadPRMCounters_v1"] = <intptr_t>__nvmlDeviceReadPRMCounters_v1

global __nvmlDeviceSetRusdSettings_v1
data["__nvmlDeviceSetRusdSettings_v1"] = <intptr_t>__nvmlDeviceSetRusdSettings_v1

func_ptrs = data
return data

Expand Down Expand Up @@ -7398,3 +7431,33 @@ cdef nvmlReturn_t _nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts(nvmlDevice_t
raise FunctionNotFoundError("function nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlEccSramUniqueUncorrectedErrorCounts_t*) noexcept nogil>__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts)(
device, errorCounts)


cdef nvmlReturn_t _nvmlDeviceGetUnrepairableMemoryFlag_v1(nvmlDevice_t device, nvmlUnrepairableMemoryStatus_v1_t* unrepairableMemoryStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
global __nvmlDeviceGetUnrepairableMemoryFlag_v1
_check_or_init_nvml()
if __nvmlDeviceGetUnrepairableMemoryFlag_v1 == NULL:
with gil:
raise FunctionNotFoundError("function nvmlDeviceGetUnrepairableMemoryFlag_v1 is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlUnrepairableMemoryStatus_v1_t*) noexcept nogil>__nvmlDeviceGetUnrepairableMemoryFlag_v1)(
device, unrepairableMemoryStatus)


cdef nvmlReturn_t _nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCounterList_v1_t* counterList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
global __nvmlDeviceReadPRMCounters_v1
_check_or_init_nvml()
if __nvmlDeviceReadPRMCounters_v1 == NULL:
with gil:
raise FunctionNotFoundError("function nvmlDeviceReadPRMCounters_v1 is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlPRMCounterList_v1_t*) noexcept nogil>__nvmlDeviceReadPRMCounters_v1)(
device, counterList)


cdef nvmlReturn_t _nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
global __nvmlDeviceSetRusdSettings_v1
_check_or_init_nvml()
if __nvmlDeviceSetRusdSettings_v1 == NULL:
with gil:
raise FunctionNotFoundError("function nvmlDeviceSetRusdSettings_v1 is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlRusdSettings_v1_t*) noexcept nogil>__nvmlDeviceSetRusdSettings_v1)(
device, settings)
53 changes: 52 additions & 1 deletion cuda_bindings/cuda/bindings/_internal/_nvml_windows.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.9.1 to 13.0.1. Do not modify it directly.
# This code was automatically generated across versions from 12.9.1 to 13.1.0. Do not modify it directly.

from libc.stdint cimport intptr_t

Expand Down Expand Up @@ -424,6 +424,9 @@ cdef void* __nvmlDeviceGetNvLinkInfo = NULL
cdef void* __nvmlDeviceReadWritePRM_v1 = NULL
cdef void* __nvmlDeviceGetGpuInstanceProfileInfoByIdV = NULL
cdef void* __nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts = NULL
cdef void* __nvmlDeviceGetUnrepairableMemoryFlag_v1 = NULL
cdef void* __nvmlDeviceReadPRMCounters_v1 = NULL
cdef void* __nvmlDeviceSetRusdSettings_v1 = NULL


cdef uintptr_t load_library() except* with gil:
Expand Down Expand Up @@ -1506,6 +1509,15 @@ cdef int _init_nvml() except -1 nogil:
global __nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts
__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts = GetProcAddress(handle, 'nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts')

global __nvmlDeviceGetUnrepairableMemoryFlag_v1
__nvmlDeviceGetUnrepairableMemoryFlag_v1 = GetProcAddress(handle, 'nvmlDeviceGetUnrepairableMemoryFlag_v1')

global __nvmlDeviceReadPRMCounters_v1
__nvmlDeviceReadPRMCounters_v1 = GetProcAddress(handle, 'nvmlDeviceReadPRMCounters_v1')

global __nvmlDeviceSetRusdSettings_v1
__nvmlDeviceSetRusdSettings_v1 = GetProcAddress(handle, 'nvmlDeviceSetRusdSettings_v1')

__py_nvml_init = True
return 0

Expand Down Expand Up @@ -2569,6 +2581,15 @@ cpdef dict _inspect_function_pointers():
global __nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts
data["__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts"] = <intptr_t>__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts

global __nvmlDeviceGetUnrepairableMemoryFlag_v1
data["__nvmlDeviceGetUnrepairableMemoryFlag_v1"] = <intptr_t>__nvmlDeviceGetUnrepairableMemoryFlag_v1

global __nvmlDeviceReadPRMCounters_v1
data["__nvmlDeviceReadPRMCounters_v1"] = <intptr_t>__nvmlDeviceReadPRMCounters_v1

global __nvmlDeviceSetRusdSettings_v1
data["__nvmlDeviceSetRusdSettings_v1"] = <intptr_t>__nvmlDeviceSetRusdSettings_v1

func_ptrs = data
return data

Expand Down Expand Up @@ -6052,3 +6073,33 @@ cdef nvmlReturn_t _nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts(nvmlDevice_t
raise FunctionNotFoundError("function nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlEccSramUniqueUncorrectedErrorCounts_t*) noexcept nogil>__nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts)(
device, errorCounts)


cdef nvmlReturn_t _nvmlDeviceGetUnrepairableMemoryFlag_v1(nvmlDevice_t device, nvmlUnrepairableMemoryStatus_v1_t* unrepairableMemoryStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
global __nvmlDeviceGetUnrepairableMemoryFlag_v1
_check_or_init_nvml()
if __nvmlDeviceGetUnrepairableMemoryFlag_v1 == NULL:
with gil:
raise FunctionNotFoundError("function nvmlDeviceGetUnrepairableMemoryFlag_v1 is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlUnrepairableMemoryStatus_v1_t*) noexcept nogil>__nvmlDeviceGetUnrepairableMemoryFlag_v1)(
device, unrepairableMemoryStatus)


cdef nvmlReturn_t _nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCounterList_v1_t* counterList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
global __nvmlDeviceReadPRMCounters_v1
_check_or_init_nvml()
if __nvmlDeviceReadPRMCounters_v1 == NULL:
with gil:
raise FunctionNotFoundError("function nvmlDeviceReadPRMCounters_v1 is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlPRMCounterList_v1_t*) noexcept nogil>__nvmlDeviceReadPRMCounters_v1)(
device, counterList)


cdef nvmlReturn_t _nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
global __nvmlDeviceSetRusdSettings_v1
_check_or_init_nvml()
if __nvmlDeviceSetRusdSettings_v1 == NULL:
with gil:
raise FunctionNotFoundError("function nvmlDeviceSetRusdSettings_v1 is not found")
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlRusdSettings_v1_t*) noexcept nogil>__nvmlDeviceSetRusdSettings_v1)(
device, settings)
8 changes: 7 additions & 1 deletion cuda_bindings/cuda/bindings/_nvml.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.9.1 to 13.0.1. Do not modify it directly.
# This code was automatically generated across versions from 12.9.1 to 13.1.0. Do not modify it directly.

from libc.stdint cimport intptr_t

Expand Down Expand Up @@ -55,6 +55,7 @@ ctypedef nvmlGpmMetric_t GpmMetric
ctypedef nvmlWorkloadPowerProfileInfo_v1_t WorkloadPowerProfileInfo_v1
ctypedef nvmlWorkloadPowerProfileCurrentProfiles_v1_t WorkloadPowerProfileCurrentProfiles_v1
ctypedef nvmlWorkloadPowerProfileRequestedProfiles_v1_t WorkloadPowerProfileRequestedProfiles_v1
ctypedef nvmlWorkloadPowerProfileUpdateProfiles_v1_t WorkloadPowerProfileUpdateProfiles_v1
ctypedef nvmlPRMTLV_v1_t PRMTLV_v1
ctypedef nvmlVgpuSchedulerSetState_t VgpuSchedulerSetState
ctypedef nvmlGpmMetricsGet_t GpmMetricsGet
Expand Down Expand Up @@ -123,6 +124,8 @@ ctypedef nvmlVgpuPgpuCompatibilityLimitCode_t _VgpuPgpuCompatibilityLimitCode
ctypedef nvmlGpmMetricId_t _GpmMetricId
ctypedef nvmlPowerProfileType_t _PowerProfileType
ctypedef nvmlDeviceAddressingModeType_t _DeviceAddressingModeType
ctypedef nvmlPRMCounterId_t _PRMCounterId
ctypedef nvmlPowerProfileOperation_t _PowerProfileOperation


###############################################################################
Expand Down Expand Up @@ -445,3 +448,6 @@ cpdef object device_get_pdi(intptr_t device)
cpdef object device_get_nvlink_info(intptr_t device)
cpdef device_read_write_prm_v1(intptr_t device, intptr_t buffer)
cpdef object device_get_gpu_instance_profile_info_by_id_v(intptr_t device, unsigned int profile_id)
cpdef object device_get_unrepairable_memory_flag_v1(intptr_t device)
cpdef device_read_prm_counters_v1(intptr_t device, intptr_t counter_list)
cpdef device_set_rusd_settings_v1(intptr_t device, intptr_t settings)
Loading
Loading