Unified API
amdsmi_get_link_metrics() and amdsmi_get_pcie_info() Change-Id: Iea060e449813b842236243b772e8809497ce98fe
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Maisam Arif
ebeveyn
9375b6f820
işleme
0b67c2ccc4
@@ -761,7 +761,7 @@ except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
### amdsmi_get_pcie_link_status
|
||||
### amdsmi_get_pcie_info
|
||||
|
||||
Description: Returns the pcie link status for the given GPU.
|
||||
It is not supported on virtual machine guest
|
||||
@@ -778,7 +778,7 @@ Field | Description
|
||||
`pcie_speed`| current pcie speed
|
||||
`pcie_interface_version`| current pcie generation
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_get_pcie_link_status` function:
|
||||
Exceptions that can be thrown by `amdsmi_get_pcie_info` function:
|
||||
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
@@ -793,7 +793,7 @@ try:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
pcie_link_status = amdsmi_get_pcie_link_status(device)
|
||||
pcie_link_status = amdsmi_get_pcie_info(device)
|
||||
print(pcie_link_status["pcie_lanes"])
|
||||
print(pcie_link_status["pcie_speed"])
|
||||
print(pcie_link_status["pcie_interface_version"])
|
||||
@@ -801,43 +801,6 @@ except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
### amdsmi_get_pcie_link_caps
|
||||
|
||||
Description: Returns the max pcie link capabilities for the given GPU
|
||||
|
||||
Input parameters:
|
||||
|
||||
* `processor_handle` device which to query
|
||||
|
||||
Output: Dictionary with fields
|
||||
|
||||
Field | Description
|
||||
---|---
|
||||
`pcie_lanes` | Number of PCIe lanes
|
||||
`pcie_speed` | PCIe speed in MT/s
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_get_pcie_link_caps` function:
|
||||
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
|
||||
Example:
|
||||
|
||||
```python
|
||||
try:
|
||||
devices = amdsmi_get_processor_handles()
|
||||
if len(devices) == 0:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
pcie_caps = amdsmi_get_pcie_link_caps(device)
|
||||
print(pcie_caps['pcie_lanes'])
|
||||
print(pcie_caps['pcie_speed'])
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
### amdsmi_get_gpu_bad_page_info
|
||||
|
||||
Description: Returns bad page info for the given GPU.
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle