Merge amd-staging into amd-master 20230303
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com> Change-Id: I489eeb6b3d6cbb713e1da8be02371fcff3831a96
Tento commit je obsažen v:
@@ -551,8 +551,8 @@ Output: Dictionary with fields
|
||||
|
||||
Field | Description
|
||||
---|---
|
||||
`vram_used`| VRAM currently in use
|
||||
`vram_total` | VRAM total
|
||||
`vram_used`| VRAM currently in use
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_get_vram_usage` function:
|
||||
* `AmdSmiLibraryException`
|
||||
|
||||
@@ -839,24 +839,22 @@ def amdsmi_get_ras_block_features_enabled(
|
||||
|
||||
ras_state = amdsmi_wrapper.amdsmi_ras_err_state_t()
|
||||
ras_states = []
|
||||
for key, gpu_block in amdsmi_wrapper.amdsmi_gpu_block_t__enumvalues.items():
|
||||
if gpu_block == "AMDSMI_GPU_BLOCK_RESERVED":
|
||||
for gpu_block in AmdSmiGpuBlock:
|
||||
if gpu_block.name == "RESERVED":
|
||||
continue
|
||||
if gpu_block == "AMDSMI_GPU_BLOCK_LAST":
|
||||
gpu_block = "AMDSMI_GPU_BLOCK_FUSE"
|
||||
if gpu_block.name == "LAST":
|
||||
gpu_block.name = "FUSE"
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_get_ras_block_features_enabled(
|
||||
device_handle,
|
||||
amdsmi_wrapper.amdsmi_gpu_block_t(key),
|
||||
amdsmi_wrapper.amdsmi_gpu_block_t(gpu_block.value),
|
||||
ctypes.byref(ras_state),
|
||||
)
|
||||
)
|
||||
ras_states.append(
|
||||
{
|
||||
"block": gpu_block,
|
||||
"status": amdsmi_wrapper.amdsmi_ras_err_state_t__enumvalues[
|
||||
ras_state.value
|
||||
],
|
||||
"block": gpu_block.name,
|
||||
"status": AmdSmiRasErrState(ras_state.value).name,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1029,7 +1027,7 @@ def amdsmi_get_vram_usage(
|
||||
device_handle, ctypes.byref(vram_info))
|
||||
)
|
||||
|
||||
return {"vram_used": vram_info.vram_used, "vram_total": vram_info.vram_total}
|
||||
return {"vram_total": vram_info.vram_total, "vram_used": vram_info.vram_used}
|
||||
|
||||
|
||||
def amdsmi_get_pcie_link_status(
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele