SWDEV-410048 - Remove --caps from tool
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I3b71c8210401cbbe28905371febe084a4fdaf4ba
[ROCm/amdsmi commit: 9077411fcb]
Этот коммит содержится в:
@@ -146,7 +146,6 @@ Static Arguments:
|
||||
-V, --vbios All video bios information (if available)
|
||||
-l, --limit All limit metric values (i.e. power and thermal limits)
|
||||
-d, --driver Displays driver version
|
||||
-c, --caps All caps information
|
||||
-r, --ras Displays RAS features information
|
||||
-B, --board All board information
|
||||
-u, --numa All numa node information
|
||||
|
||||
@@ -138,7 +138,7 @@ class AMDSMICommands():
|
||||
|
||||
|
||||
def static(self, args, multiple_devices=False, gpu=None, asic=None,
|
||||
bus=None, vbios=None, limit=None, driver=None, caps=None,
|
||||
bus=None, vbios=None, limit=None, driver=None,
|
||||
ras=None, board=None, numa=None):
|
||||
"""Get Static information for target gpu
|
||||
|
||||
@@ -151,7 +151,6 @@ class AMDSMICommands():
|
||||
vbios (bool, optional): Value override for args.vbios. Defaults to None.
|
||||
limit (bool, optional): Value override for args.limit. Defaults to None.
|
||||
driver (bool, optional): Value override for args.driver. Defaults to None.
|
||||
caps (bool, optional): Value override for args.caps. Defaults to None.
|
||||
ras (bool, optional): Value override for args.ras. Defaults to None.
|
||||
board (bool, optional): Value override for args.board. Defaults to None.
|
||||
numa (bool, optional): Value override for args.numa. Defaults to None.
|
||||
@@ -173,8 +172,6 @@ class AMDSMICommands():
|
||||
args.vbios = vbios
|
||||
if driver:
|
||||
args.driver = driver
|
||||
if caps:
|
||||
args.caps = caps
|
||||
if numa:
|
||||
args.numa = numa
|
||||
if self.helpers.is_linux() and self.helpers.is_baremetal():
|
||||
@@ -197,11 +194,11 @@ class AMDSMICommands():
|
||||
|
||||
# If all arguments are False, it means that no argument was passed and the entire static should be printed
|
||||
if self.helpers.is_linux() and self.helpers.is_baremetal():
|
||||
if not any([args.asic, args.bus, args.vbios, args.limit, args.driver, args.caps, args.ras, args.board]):
|
||||
args.asic = args.bus = args.vbios = args.limit = args.driver = args.caps = args.ras = args.board = args.numa = self.all_arguments = True
|
||||
if not any([args.asic, args.bus, args.vbios, args.limit, args.driver, args.ras, args.board]):
|
||||
args.asic = args.bus = args.vbios = args.limit = args.driver = args.ras = args.board = args.numa = self.all_arguments = True
|
||||
if self.helpers.is_linux() and self.helpers.is_virtual_os():
|
||||
if not any([args.asic, args.bus, args.vbios, args.driver, args.caps]):
|
||||
args.asic = args.bus = args.vbios = args.driver = args.caps = self.all_arguments = True
|
||||
if not any([args.asic, args.bus, args.vbios, args.driver]):
|
||||
args.asic = args.bus = args.vbios = args.driver = self.all_arguments = True
|
||||
|
||||
static_dict = {}
|
||||
|
||||
@@ -340,8 +337,6 @@ class AMDSMICommands():
|
||||
static_dict['ras'] = e.get_error_info()
|
||||
if not self.all_arguments:
|
||||
raise e
|
||||
if args.caps:
|
||||
pass
|
||||
if (self.helpers.is_linux() and self.helpers.is_baremetal()):
|
||||
if args.numa:
|
||||
try:
|
||||
|
||||
@@ -387,18 +387,6 @@ class AMDSMIHelpers():
|
||||
return False, profile_presets.values()
|
||||
|
||||
|
||||
def has_ras_support(self, device_handle):
|
||||
try:
|
||||
caps_info = amdsmi_interface.amdsmi_get_caps_info(device_handle)
|
||||
|
||||
if caps_info['ras_supported']:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
except amdsmi_exception.AmdSmiLibraryException:
|
||||
return False
|
||||
|
||||
|
||||
def convert_bytes_to_readable(self, bytes_input):
|
||||
for unit in ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB"]:
|
||||
if abs(bytes_input) < 1024:
|
||||
|
||||
@@ -294,7 +294,6 @@ class AMDSMIParser(argparse.ArgumentParser):
|
||||
vbios_help = "All video bios information (if available)"
|
||||
limit_help = "All limit metric values (i.e. power and thermal limits)"
|
||||
driver_help = "Displays driver version"
|
||||
caps_help = "All caps information"
|
||||
|
||||
# Options arguments help text for Hypervisors and Baremetal
|
||||
ras_help = "Displays RAS features information"
|
||||
@@ -321,7 +320,6 @@ class AMDSMIParser(argparse.ArgumentParser):
|
||||
static_parser.add_argument('-b', '--bus', action='store_true', required=False, help=bus_help)
|
||||
static_parser.add_argument('-V', '--vbios', action='store_true', required=False, help=vbios_help)
|
||||
static_parser.add_argument('-d', '--driver', action='store_true', required=False, help=driver_help)
|
||||
static_parser.add_argument('-c', '--caps', action='store_true', required=False, help=caps_help)
|
||||
|
||||
# Options to display on Hypervisors and Baremetal
|
||||
if self.helpers.is_hypervisor() or self.helpers.is_baremetal():
|
||||
|
||||
Ссылка в новой задаче
Block a user