Skip to content

Commit 7c8c742

Browse files
committed
Merge origin/main into cythonize-module
2 parents e492d54 + bcb803f commit 7c8c742

File tree

20 files changed

+2568
-4225
lines changed

20 files changed

+2568
-4225
lines changed

cuda_bindings/cuda/bindings/_internal/_nvml.pxd

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
@@ -198,7 +198,6 @@ cdef nvmlReturn_t _nvmlDeviceSetDefaultAutoBoostedClocksEnabled(nvmlDevice_t dev
198198
cdef nvmlReturn_t _nvmlDeviceSetDefaultFanSpeed_v2(nvmlDevice_t device, unsigned int fan) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
199199
cdef nvmlReturn_t _nvmlDeviceSetFanControlPolicy(nvmlDevice_t device, unsigned int fan, nvmlFanControlPolicy_t policy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
200200
cdef nvmlReturn_t _nvmlDeviceSetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, int* temp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
201-
cdef nvmlReturn_t _nvmlDeviceSetPowerManagementLimit(nvmlDevice_t device, unsigned int limit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
202201
cdef nvmlReturn_t _nvmlDeviceSetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
203202
cdef nvmlReturn_t _nvmlDeviceSetAPIRestriction(nvmlDevice_t device, nvmlRestrictedAPI_t apiType, nvmlEnableState_t isRestricted) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
204203
cdef nvmlReturn_t _nvmlDeviceSetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int speed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
@@ -337,13 +336,7 @@ cdef nvmlReturn_t _nvmlDeviceGetComputeInstanceId(nvmlDevice_t device, unsigned
337336
cdef nvmlReturn_t _nvmlDeviceGetMaxMigDeviceCount(nvmlDevice_t device, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
338337
cdef nvmlReturn_t _nvmlDeviceGetMigDeviceHandleByIndex(nvmlDevice_t device, unsigned int index, nvmlDevice_t* migDevice) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
339338
cdef nvmlReturn_t _nvmlDeviceGetDeviceHandleFromMigDeviceHandle(nvmlDevice_t migDevice, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
340-
cdef nvmlReturn_t _nvmlGpmSampleGet(nvmlDevice_t device, nvmlGpmSample_t gpmSample) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
341-
cdef nvmlReturn_t _nvmlGpmMigSampleGet(nvmlDevice_t device, unsigned int gpuInstanceId, nvmlGpmSample_t gpmSample) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
342-
cdef nvmlReturn_t _nvmlGpmQueryDeviceSupport(nvmlDevice_t device, nvmlGpmSupport_t* gpmSupport) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
343-
cdef nvmlReturn_t _nvmlGpmQueryIfStreamingEnabled(nvmlDevice_t device, unsigned int* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
344-
cdef nvmlReturn_t _nvmlGpmSetStreamingEnabled(nvmlDevice_t device, unsigned int state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
345339
cdef nvmlReturn_t _nvmlDeviceGetCapabilities(nvmlDevice_t device, nvmlDeviceCapabilities_t* caps) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
346-
cdef nvmlReturn_t _nvmlDeviceWorkloadPowerProfileClearRequestedProfiles(nvmlDevice_t device, nvmlWorkloadPowerProfileRequestedProfiles_t* requestedProfiles) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
347340
cdef nvmlReturn_t _nvmlDevicePowerSmoothingActivatePresetProfile(nvmlDevice_t device, nvmlPowerSmoothingProfile_t* profile) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
348341
cdef nvmlReturn_t _nvmlDevicePowerSmoothingUpdatePresetProfileParam(nvmlDevice_t device, nvmlPowerSmoothingProfile_t* profile) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil
349342
cdef nvmlReturn_t _nvmlDevicePowerSmoothingSetState(nvmlDevice_t device, nvmlPowerSmoothingState_t* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil

cuda_bindings/cuda/bindings/_internal/_nvml_linux.pyx

Lines changed: 1 addition & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
@@ -247,7 +247,6 @@ cdef void* __nvmlDeviceSetDefaultAutoBoostedClocksEnabled = NULL
247247
cdef void* __nvmlDeviceSetDefaultFanSpeed_v2 = NULL
248248
cdef void* __nvmlDeviceSetFanControlPolicy = NULL
249249
cdef void* __nvmlDeviceSetTemperatureThreshold = NULL
250-
cdef void* __nvmlDeviceSetPowerManagementLimit = NULL
251250
cdef void* __nvmlDeviceSetGpuOperationMode = NULL
252251
cdef void* __nvmlDeviceSetAPIRestriction = NULL
253252
cdef void* __nvmlDeviceSetFanSpeed_v2 = NULL
@@ -386,13 +385,7 @@ cdef void* __nvmlDeviceGetComputeInstanceId = NULL
386385
cdef void* __nvmlDeviceGetMaxMigDeviceCount = NULL
387386
cdef void* __nvmlDeviceGetMigDeviceHandleByIndex = NULL
388387
cdef void* __nvmlDeviceGetDeviceHandleFromMigDeviceHandle = NULL
389-
cdef void* __nvmlGpmSampleGet = NULL
390-
cdef void* __nvmlGpmMigSampleGet = NULL
391-
cdef void* __nvmlGpmQueryDeviceSupport = NULL
392-
cdef void* __nvmlGpmQueryIfStreamingEnabled = NULL
393-
cdef void* __nvmlGpmSetStreamingEnabled = NULL
394388
cdef void* __nvmlDeviceGetCapabilities = NULL
395-
cdef void* __nvmlDeviceWorkloadPowerProfileClearRequestedProfiles = NULL
396389
cdef void* __nvmlDevicePowerSmoothingActivatePresetProfile = NULL
397390
cdef void* __nvmlDevicePowerSmoothingUpdatePresetProfileParam = NULL
398391
cdef void* __nvmlDevicePowerSmoothingSetState = NULL
@@ -1735,13 +1728,6 @@ cdef int _init_nvml() except -1 nogil:
17351728
handle = load_library()
17361729
__nvmlDeviceSetTemperatureThreshold = dlsym(handle, 'nvmlDeviceSetTemperatureThreshold')
17371730

1738-
global __nvmlDeviceSetPowerManagementLimit
1739-
__nvmlDeviceSetPowerManagementLimit = dlsym(RTLD_DEFAULT, 'nvmlDeviceSetPowerManagementLimit')
1740-
if __nvmlDeviceSetPowerManagementLimit == NULL:
1741-
if handle == NULL:
1742-
handle = load_library()
1743-
__nvmlDeviceSetPowerManagementLimit = dlsym(handle, 'nvmlDeviceSetPowerManagementLimit')
1744-
17451731
global __nvmlDeviceSetGpuOperationMode
17461732
__nvmlDeviceSetGpuOperationMode = dlsym(RTLD_DEFAULT, 'nvmlDeviceSetGpuOperationMode')
17471733
if __nvmlDeviceSetGpuOperationMode == NULL:
@@ -2708,55 +2694,13 @@ cdef int _init_nvml() except -1 nogil:
27082694
handle = load_library()
27092695
__nvmlDeviceGetDeviceHandleFromMigDeviceHandle = dlsym(handle, 'nvmlDeviceGetDeviceHandleFromMigDeviceHandle')
27102696

2711-
global __nvmlGpmSampleGet
2712-
__nvmlGpmSampleGet = dlsym(RTLD_DEFAULT, 'nvmlGpmSampleGet')
2713-
if __nvmlGpmSampleGet == NULL:
2714-
if handle == NULL:
2715-
handle = load_library()
2716-
__nvmlGpmSampleGet = dlsym(handle, 'nvmlGpmSampleGet')
2717-
2718-
global __nvmlGpmMigSampleGet
2719-
__nvmlGpmMigSampleGet = dlsym(RTLD_DEFAULT, 'nvmlGpmMigSampleGet')
2720-
if __nvmlGpmMigSampleGet == NULL:
2721-
if handle == NULL:
2722-
handle = load_library()
2723-
__nvmlGpmMigSampleGet = dlsym(handle, 'nvmlGpmMigSampleGet')
2724-
2725-
global __nvmlGpmQueryDeviceSupport
2726-
__nvmlGpmQueryDeviceSupport = dlsym(RTLD_DEFAULT, 'nvmlGpmQueryDeviceSupport')
2727-
if __nvmlGpmQueryDeviceSupport == NULL:
2728-
if handle == NULL:
2729-
handle = load_library()
2730-
__nvmlGpmQueryDeviceSupport = dlsym(handle, 'nvmlGpmQueryDeviceSupport')
2731-
2732-
global __nvmlGpmQueryIfStreamingEnabled
2733-
__nvmlGpmQueryIfStreamingEnabled = dlsym(RTLD_DEFAULT, 'nvmlGpmQueryIfStreamingEnabled')
2734-
if __nvmlGpmQueryIfStreamingEnabled == NULL:
2735-
if handle == NULL:
2736-
handle = load_library()
2737-
__nvmlGpmQueryIfStreamingEnabled = dlsym(handle, 'nvmlGpmQueryIfStreamingEnabled')
2738-
2739-
global __nvmlGpmSetStreamingEnabled
2740-
__nvmlGpmSetStreamingEnabled = dlsym(RTLD_DEFAULT, 'nvmlGpmSetStreamingEnabled')
2741-
if __nvmlGpmSetStreamingEnabled == NULL:
2742-
if handle == NULL:
2743-
handle = load_library()
2744-
__nvmlGpmSetStreamingEnabled = dlsym(handle, 'nvmlGpmSetStreamingEnabled')
2745-
27462697
global __nvmlDeviceGetCapabilities
27472698
__nvmlDeviceGetCapabilities = dlsym(RTLD_DEFAULT, 'nvmlDeviceGetCapabilities')
27482699
if __nvmlDeviceGetCapabilities == NULL:
27492700
if handle == NULL:
27502701
handle = load_library()
27512702
__nvmlDeviceGetCapabilities = dlsym(handle, 'nvmlDeviceGetCapabilities')
27522703

2753-
global __nvmlDeviceWorkloadPowerProfileClearRequestedProfiles
2754-
__nvmlDeviceWorkloadPowerProfileClearRequestedProfiles = dlsym(RTLD_DEFAULT, 'nvmlDeviceWorkloadPowerProfileClearRequestedProfiles')
2755-
if __nvmlDeviceWorkloadPowerProfileClearRequestedProfiles == NULL:
2756-
if handle == NULL:
2757-
handle = load_library()
2758-
__nvmlDeviceWorkloadPowerProfileClearRequestedProfiles = dlsym(handle, 'nvmlDeviceWorkloadPowerProfileClearRequestedProfiles')
2759-
27602704
global __nvmlDevicePowerSmoothingActivatePresetProfile
27612705
__nvmlDevicePowerSmoothingActivatePresetProfile = dlsym(RTLD_DEFAULT, 'nvmlDevicePowerSmoothingActivatePresetProfile')
27622706
if __nvmlDevicePowerSmoothingActivatePresetProfile == NULL:
@@ -3459,9 +3403,6 @@ cpdef dict _inspect_function_pointers():
34593403
global __nvmlDeviceSetTemperatureThreshold
34603404
data["__nvmlDeviceSetTemperatureThreshold"] = <intptr_t>__nvmlDeviceSetTemperatureThreshold
34613405

3462-
global __nvmlDeviceSetPowerManagementLimit
3463-
data["__nvmlDeviceSetPowerManagementLimit"] = <intptr_t>__nvmlDeviceSetPowerManagementLimit
3464-
34653406
global __nvmlDeviceSetGpuOperationMode
34663407
data["__nvmlDeviceSetGpuOperationMode"] = <intptr_t>__nvmlDeviceSetGpuOperationMode
34673408

@@ -3876,27 +3817,9 @@ cpdef dict _inspect_function_pointers():
38763817
global __nvmlDeviceGetDeviceHandleFromMigDeviceHandle
38773818
data["__nvmlDeviceGetDeviceHandleFromMigDeviceHandle"] = <intptr_t>__nvmlDeviceGetDeviceHandleFromMigDeviceHandle
38783819

3879-
global __nvmlGpmSampleGet
3880-
data["__nvmlGpmSampleGet"] = <intptr_t>__nvmlGpmSampleGet
3881-
3882-
global __nvmlGpmMigSampleGet
3883-
data["__nvmlGpmMigSampleGet"] = <intptr_t>__nvmlGpmMigSampleGet
3884-
3885-
global __nvmlGpmQueryDeviceSupport
3886-
data["__nvmlGpmQueryDeviceSupport"] = <intptr_t>__nvmlGpmQueryDeviceSupport
3887-
3888-
global __nvmlGpmQueryIfStreamingEnabled
3889-
data["__nvmlGpmQueryIfStreamingEnabled"] = <intptr_t>__nvmlGpmQueryIfStreamingEnabled
3890-
3891-
global __nvmlGpmSetStreamingEnabled
3892-
data["__nvmlGpmSetStreamingEnabled"] = <intptr_t>__nvmlGpmSetStreamingEnabled
3893-
38943820
global __nvmlDeviceGetCapabilities
38953821
data["__nvmlDeviceGetCapabilities"] = <intptr_t>__nvmlDeviceGetCapabilities
38963822

3897-
global __nvmlDeviceWorkloadPowerProfileClearRequestedProfiles
3898-
data["__nvmlDeviceWorkloadPowerProfileClearRequestedProfiles"] = <intptr_t>__nvmlDeviceWorkloadPowerProfileClearRequestedProfiles
3899-
39003823
global __nvmlDevicePowerSmoothingActivatePresetProfile
39013824
data["__nvmlDevicePowerSmoothingActivatePresetProfile"] = <intptr_t>__nvmlDevicePowerSmoothingActivatePresetProfile
39023825

@@ -5833,16 +5756,6 @@ cdef nvmlReturn_t _nvmlDeviceSetTemperatureThreshold(nvmlDevice_t device, nvmlTe
58335756
device, thresholdType, temp)
58345757

58355758

5836-
cdef nvmlReturn_t _nvmlDeviceSetPowerManagementLimit(nvmlDevice_t device, unsigned int limit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
5837-
global __nvmlDeviceSetPowerManagementLimit
5838-
_check_or_init_nvml()
5839-
if __nvmlDeviceSetPowerManagementLimit == NULL:
5840-
with gil:
5841-
raise FunctionNotFoundError("function nvmlDeviceSetPowerManagementLimit is not found")
5842-
return (<nvmlReturn_t (*)(nvmlDevice_t, unsigned int) noexcept nogil>__nvmlDeviceSetPowerManagementLimit)(
5843-
device, limit)
5844-
5845-
58465759
cdef nvmlReturn_t _nvmlDeviceSetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
58475760
global __nvmlDeviceSetGpuOperationMode
58485761
_check_or_init_nvml()
@@ -7223,56 +7136,6 @@ cdef nvmlReturn_t _nvmlDeviceGetDeviceHandleFromMigDeviceHandle(nvmlDevice_t mig
72237136
migDevice, device)
72247137

72257138

7226-
cdef nvmlReturn_t _nvmlGpmSampleGet(nvmlDevice_t device, nvmlGpmSample_t gpmSample) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
7227-
global __nvmlGpmSampleGet
7228-
_check_or_init_nvml()
7229-
if __nvmlGpmSampleGet == NULL:
7230-
with gil:
7231-
raise FunctionNotFoundError("function nvmlGpmSampleGet is not found")
7232-
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlGpmSample_t) noexcept nogil>__nvmlGpmSampleGet)(
7233-
device, gpmSample)
7234-
7235-
7236-
cdef nvmlReturn_t _nvmlGpmMigSampleGet(nvmlDevice_t device, unsigned int gpuInstanceId, nvmlGpmSample_t gpmSample) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
7237-
global __nvmlGpmMigSampleGet
7238-
_check_or_init_nvml()
7239-
if __nvmlGpmMigSampleGet == NULL:
7240-
with gil:
7241-
raise FunctionNotFoundError("function nvmlGpmMigSampleGet is not found")
7242-
return (<nvmlReturn_t (*)(nvmlDevice_t, unsigned int, nvmlGpmSample_t) noexcept nogil>__nvmlGpmMigSampleGet)(
7243-
device, gpuInstanceId, gpmSample)
7244-
7245-
7246-
cdef nvmlReturn_t _nvmlGpmQueryDeviceSupport(nvmlDevice_t device, nvmlGpmSupport_t* gpmSupport) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
7247-
global __nvmlGpmQueryDeviceSupport
7248-
_check_or_init_nvml()
7249-
if __nvmlGpmQueryDeviceSupport == NULL:
7250-
with gil:
7251-
raise FunctionNotFoundError("function nvmlGpmQueryDeviceSupport is not found")
7252-
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlGpmSupport_t*) noexcept nogil>__nvmlGpmQueryDeviceSupport)(
7253-
device, gpmSupport)
7254-
7255-
7256-
cdef nvmlReturn_t _nvmlGpmQueryIfStreamingEnabled(nvmlDevice_t device, unsigned int* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
7257-
global __nvmlGpmQueryIfStreamingEnabled
7258-
_check_or_init_nvml()
7259-
if __nvmlGpmQueryIfStreamingEnabled == NULL:
7260-
with gil:
7261-
raise FunctionNotFoundError("function nvmlGpmQueryIfStreamingEnabled is not found")
7262-
return (<nvmlReturn_t (*)(nvmlDevice_t, unsigned int*) noexcept nogil>__nvmlGpmQueryIfStreamingEnabled)(
7263-
device, state)
7264-
7265-
7266-
cdef nvmlReturn_t _nvmlGpmSetStreamingEnabled(nvmlDevice_t device, unsigned int state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
7267-
global __nvmlGpmSetStreamingEnabled
7268-
_check_or_init_nvml()
7269-
if __nvmlGpmSetStreamingEnabled == NULL:
7270-
with gil:
7271-
raise FunctionNotFoundError("function nvmlGpmSetStreamingEnabled is not found")
7272-
return (<nvmlReturn_t (*)(nvmlDevice_t, unsigned int) noexcept nogil>__nvmlGpmSetStreamingEnabled)(
7273-
device, state)
7274-
7275-
72767139
cdef nvmlReturn_t _nvmlDeviceGetCapabilities(nvmlDevice_t device, nvmlDeviceCapabilities_t* caps) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
72777140
global __nvmlDeviceGetCapabilities
72787141
_check_or_init_nvml()
@@ -7283,16 +7146,6 @@ cdef nvmlReturn_t _nvmlDeviceGetCapabilities(nvmlDevice_t device, nvmlDeviceCapa
72837146
device, caps)
72847147

72857148

7286-
cdef nvmlReturn_t _nvmlDeviceWorkloadPowerProfileClearRequestedProfiles(nvmlDevice_t device, nvmlWorkloadPowerProfileRequestedProfiles_t* requestedProfiles) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
7287-
global __nvmlDeviceWorkloadPowerProfileClearRequestedProfiles
7288-
_check_or_init_nvml()
7289-
if __nvmlDeviceWorkloadPowerProfileClearRequestedProfiles == NULL:
7290-
with gil:
7291-
raise FunctionNotFoundError("function nvmlDeviceWorkloadPowerProfileClearRequestedProfiles is not found")
7292-
return (<nvmlReturn_t (*)(nvmlDevice_t, nvmlWorkloadPowerProfileRequestedProfiles_t*) noexcept nogil>__nvmlDeviceWorkloadPowerProfileClearRequestedProfiles)(
7293-
device, requestedProfiles)
7294-
7295-
72967149
cdef nvmlReturn_t _nvmlDevicePowerSmoothingActivatePresetProfile(nvmlDevice_t device, nvmlPowerSmoothingProfile_t* profile) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil:
72977150
global __nvmlDevicePowerSmoothingActivatePresetProfile
72987151
_check_or_init_nvml()

0 commit comments

Comments
 (0)