SWDEV-461038 - Enabled Passthrough as BM for CLI Commands
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I1ae6a065f10ce580b45b79c0a8588853f5f304f7
[ROCm/amdsmi commit: 80eeff3dd4]
Этот коммит содержится в:
коммит произвёл
Maisam Arif
родитель
d2719fa4f6
Коммит
58177acb0b
@@ -4,10 +4,13 @@ Full documentation for amd_smi_lib is available at [https://rocm.docs.amd.com/pr
|
||||
|
||||
***All information listed below is for reference and subject to change.***
|
||||
|
||||
## amd_smi_lib for ROCm 6.1.2
|
||||
## amd_smi_lib for ROCm 6.2.0
|
||||
|
||||
### Additions
|
||||
|
||||
- **Addedd Handling to detect VMs with passthrough configurations in CLI Tool**.
|
||||
CLI Tool had only allowed a restricted set of options for Virtual Machines with passthrough GPUs. Now we offer an expanded set of functions availble to passthrough configured GPUs.
|
||||
|
||||
- **Added macros that were in `amdsmi.h` to the amdsmi Python library `amdsmi_interface.py`**.
|
||||
Added macros to reference max size limitations for certain amdsmi functions such as max dpm policies and max fanspeed.
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ class AMDSMIHelpers():
|
||||
self._is_hypervisor = False
|
||||
self._is_virtual_os = False
|
||||
self._is_baremetal = False
|
||||
self._is_passthrough = False
|
||||
|
||||
self._is_linux = False
|
||||
self._is_windows = False
|
||||
@@ -63,6 +64,14 @@ class AMDSMIHelpers():
|
||||
else:
|
||||
self._is_virtual_os = True
|
||||
|
||||
# Check for passthrough system filtering by device id
|
||||
output = run(["lspci", "-nn"], stdout=PIPE, stderr=STDOUT, encoding="UTF-8").stdout
|
||||
passthrough_device_ids = ["7460", "73c8", "74a0", "74a1", "74a2"]
|
||||
if any(device_id in output for device_id in passthrough_device_ids):
|
||||
self._is_baremetal = True
|
||||
self._is_virtual_os = False
|
||||
self._is_passthrough = True
|
||||
|
||||
|
||||
def os_info(self, string_format=True):
|
||||
"""Return operating_system and type information ex. (Linux, Baremetal)
|
||||
@@ -89,6 +98,10 @@ class AMDSMIHelpers():
|
||||
else:
|
||||
operating_system_type = "Unknown"
|
||||
|
||||
# Passthrough Override
|
||||
if self._is_passthrough:
|
||||
operating_system_type = "Guest (Passthrough)"
|
||||
|
||||
if string_format:
|
||||
return f"{operating_system} {operating_system_type}"
|
||||
else:
|
||||
|
||||
Ссылка в новой задаче
Block a user