Renamed API amdsmi_dev_set_pci_bandwidth to
amdsmi_set_gpu_pci_bandwidth
grep -rli 'amdsmi_dev_set_pci_bandwidth' * | xargs -i@ sed -i
's/amdsmi_dev_set_pci_bandwidth/amdsmi_set_gpu_pci_bandwidth/g' @
Change-Id: Id4312cfe5fddb63c42c4c6ca0a9a1d94b83f7164
[ROCm/amdsmi commit: 24c0005e15]
Este cometimento está contido em:
cometido por
Naveen Krishna Chatradhi
ascendente
a3c4c55c33
cometimento
a8d932a9bb
@@ -1196,7 +1196,7 @@ except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
## amdsmi_dev_set_pci_bandwidth
|
||||
## amdsmi_set_gpu_pci_bandwidth
|
||||
Description: Control the set of allowed PCIe bandwidths that can be used
|
||||
|
||||
Input parameters:
|
||||
@@ -1206,7 +1206,7 @@ to be enabled (1) and disabled (0)
|
||||
|
||||
Output: None
|
||||
|
||||
Exceptions that can be thrown by ` amdsmi_dev_set_pci_bandwidth` function:
|
||||
Exceptions that can be thrown by ` amdsmi_set_gpu_pci_bandwidth` function:
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
@@ -1219,7 +1219,7 @@ try:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
amdsmi_dev_set_pci_bandwidth(device, 0)
|
||||
amdsmi_set_gpu_pci_bandwidth(device, 0)
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
@@ -79,7 +79,7 @@ from .amdsmi_interface import amdsmi_next_func_iter
|
||||
from .amdsmi_interface import amdsmi_get_func_iter_value
|
||||
|
||||
# # Unsupported Functions In Virtual Environment
|
||||
from .amdsmi_interface import amdsmi_dev_set_pci_bandwidth
|
||||
from .amdsmi_interface import amdsmi_set_gpu_pci_bandwidth
|
||||
from .amdsmi_interface import amdsmi_dev_set_power_cap
|
||||
from .amdsmi_interface import amdsmi_dev_set_power_profile
|
||||
from .amdsmi_interface import amdsmi_dev_set_clk_range
|
||||
|
||||
@@ -1716,7 +1716,7 @@ def amdsmi_get_func_iter_value(
|
||||
}
|
||||
|
||||
|
||||
def amdsmi_dev_set_pci_bandwidth(
|
||||
def amdsmi_set_gpu_pci_bandwidth(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle, bitmask: int
|
||||
) -> None:
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
@@ -1728,7 +1728,7 @@ def amdsmi_dev_set_pci_bandwidth(
|
||||
raise AmdSmiParameterException(bitmask, int)
|
||||
|
||||
_check_res(
|
||||
amdsmi_wrapper. amdsmi_dev_set_pci_bandwidth(
|
||||
amdsmi_wrapper. amdsmi_set_gpu_pci_bandwidth(
|
||||
processor_handle, ctypes.c_uint64(bitmask)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1454,9 +1454,9 @@ amdsmi_get_gpu_pci_throughput.argtypes = [amdsmi_processor_handle, ctypes.POINTE
|
||||
amdsmi_get_gpu_pci_replay_counter = _libraries['libamd_smi.so'].amdsmi_get_gpu_pci_replay_counter
|
||||
amdsmi_get_gpu_pci_replay_counter.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_pci_replay_counter.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)]
|
||||
amdsmi_dev_set_pci_bandwidth = _libraries['libamd_smi.so'].amdsmi_dev_set_pci_bandwidth
|
||||
amdsmi_dev_set_pci_bandwidth.restype = amdsmi_status_t
|
||||
amdsmi_dev_set_pci_bandwidth.argtypes = [amdsmi_processor_handle, uint64_t]
|
||||
amdsmi_set_gpu_pci_bandwidth = _libraries['libamd_smi.so'].amdsmi_set_gpu_pci_bandwidth
|
||||
amdsmi_set_gpu_pci_bandwidth.restype = amdsmi_status_t
|
||||
amdsmi_set_gpu_pci_bandwidth.argtypes = [amdsmi_processor_handle, uint64_t]
|
||||
amdsmi_dev_get_power_ave = _libraries['libamd_smi.so'].amdsmi_dev_get_power_ave
|
||||
amdsmi_dev_get_power_ave.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_power_ave.argtypes = [amdsmi_processor_handle, uint32_t, ctypes.POINTER(ctypes.c_uint64)]
|
||||
@@ -1879,7 +1879,7 @@ __all__ = \
|
||||
'amdsmi_dev_set_od_clk_info', 'amdsmi_dev_set_od_volt_info',
|
||||
'amdsmi_dev_set_overdrive_level',
|
||||
'amdsmi_dev_set_overdrive_level_v1',
|
||||
'amdsmi_dev_set_pci_bandwidth', 'amdsmi_dev_set_perf_level',
|
||||
'amdsmi_set_gpu_pci_bandwidth', 'amdsmi_dev_set_perf_level',
|
||||
'amdsmi_dev_set_perf_level_v1', 'amdsmi_dev_set_power_cap',
|
||||
'amdsmi_dev_set_power_profile', 'amdsmi_dev_xgmi_error_status',
|
||||
'amdsmi_processor_handle', 'amdsmi_engine_usage_t',
|
||||
|
||||
@@ -358,7 +358,7 @@ class Formatter:
|
||||
| """ + self.style.text("69 Set dev od volt info. Api: amdsmi_dev_set_od_volt_info <bdf><vpoint><clk_value><volt_value>") + """|
|
||||
| """ + self.style.text("70 Set dev overdrive level. Api: amdsmi_dev_set_overdrive_level <bdf><overdrive_value>") + """ |
|
||||
| """ + self.style.text("71 Set v1 dev overdrive level. Api: amdsmi_dev_set_overdrive_level_v1 <bdf><overdrive_value>") + """ |
|
||||
| """ + self.style.text("72 Set dev pci bandwidth. Api: amdsmi_dev_set_pci_bandwidth <bdf><bitmask>") + """ |
|
||||
| """ + self.style.text("72 Set dev pci bandwidth. Api: amdsmi_set_gpu_pci_bandwidth <bdf><bitmask>") + """ |
|
||||
| """ + self.style.text("73 Set dev perf level. Api: amdsmi_dev_set_perf_level <bdf>") + """ |
|
||||
| """ + self.style.text("74 Set dev perf level v1. Api: amdsmi_dev_set_perf_level_v1 <bdf>") + """ |
|
||||
| """ + self.style.text("75 Set dev power cap. Api: amdsmi_dev_set_power_cap <bdf><sensor_ind><cap>") + """ |
|
||||
@@ -486,7 +486,7 @@ def amdsmi_tool_dev_overdrive_level_set_v1(dev, dic):
|
||||
|
||||
def amdsmi_tool_dev_pci_bandwidth_set(dev, dic):
|
||||
bitmask = dic["bitmask"]
|
||||
return smi_api. amdsmi_dev_set_pci_bandwidth(dev, bitmask)
|
||||
return smi_api. amdsmi_set_gpu_pci_bandwidth(dev, bitmask)
|
||||
|
||||
|
||||
def amdsmi_tool_dev_gpu_clk_freq_get(dev):
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador