diff --git a/projects/amdsmi/amdsmi_cli/README.md b/projects/amdsmi/amdsmi_cli/README.md index 4b805fded2..e290c226a6 100644 --- a/projects/amdsmi/amdsmi_cli/README.md +++ b/projects/amdsmi/amdsmi_cli/README.md @@ -62,11 +62,9 @@ optional arguments: AMD-SMI Commands: Descriptions: version Display version information - discovery (list) - Display discovery information + list List GPU information static Gets static information about the specified GPU - firmware (ucode) - Gets firmware information about the specified GPU + firmware Gets ucode/firmware information about the specified GPU bad-pages Gets bad page information about the specified GPU metric Gets metric/performance information about the specified GPU process Lists general process information running on the specified GPU @@ -84,8 +82,8 @@ Each command will have detailed information via `amd-smi [command] --help` For convenience, here is the help output for each command ``` bash -amd-smi discovery --help -usage: amd-smi discovery [-h] [--json | --csv] [--file FILE] +amd-smi list --help +usage: amd-smi list [-h] [--json | --csv] [--file FILE] [--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-g GPU [GPU ...]] diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_cli.py b/projects/amdsmi/amdsmi_cli/amdsmi_cli.py index 208262b630..e07db5457e 100755 --- a/projects/amdsmi/amdsmi_cli/amdsmi_cli.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_cli.py @@ -52,7 +52,7 @@ if __name__ == "__main__": amd_smi_commands = AMDSMICommands(compatibility=compatibility) amd_smi_parser = AMDSMIParser(amd_smi_commands.version, - amd_smi_commands.discovery, + amd_smi_commands.list, amd_smi_commands.static, amd_smi_commands.firmware, amd_smi_commands.bad_pages, diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index aff2dc6724..8071b24cd7 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -74,8 +74,8 @@ class AMDSMICommands(): self.logger.print_output() - def discovery(self, args, multiple_devices=False, gpu=None): - """Get Discovery information for target gpu + def list(self, args, multiple_devices=False, gpu=None): + """List information for target gpu Args: args (Namespace): Namespace containing the parsed CLI args @@ -97,7 +97,7 @@ class AMDSMICommands(): args.gpu = self.device_handles # Handle multiple GPUs - handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.discovery) + handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.list) if handled_multiple_gpus: return # This function is recursive diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py index d0fd284681..32aa4a17b6 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py @@ -41,7 +41,7 @@ class AMDSMIParser(argparse.ArgumentParser): Args: argparse (ArgumentParser): argparse.ArgumentParser """ - def __init__(self, version, discovery, static, firmware, bad_pages, metric, + def __init__(self, version, list, static, firmware, bad_pages, metric, process, profile, event, topology, set_value, reset, rocmsmi): # Helper variables @@ -74,7 +74,7 @@ class AMDSMIParser(argparse.ArgumentParser): # Add all subparsers self._add_version_parser(subparsers, version) - self._add_discovery_parser(subparsers, discovery) + self._add_list_parser(subparsers, list) self._add_static_parser(subparsers, static) self._add_firmware_parser(subparsers, firmware) self._add_bad_pages_parser(subparsers, bad_pages) @@ -269,25 +269,25 @@ class AMDSMIParser(argparse.ArgumentParser): self._add_command_modifiers(version_parser) - def _add_discovery_parser(self, subparsers, func): + def _add_list_parser(self, subparsers, func): # Subparser help text - discovery_help = "Display discovery information" - discovery_subcommand_help = "Lists all the devices on the system and the links between devices.\ + list_help = "List GPU information" + list_subcommand_help = "Lists all the devices on the system and the links between devices.\ \nLists all the sockets and for each socket, GPUs and/or CPUs associated to\ \nthat socket alongside some basic information for each device.\ \nIn virtualization environments, it can also list VFs associated to each\ \nGPU with some basic information for each VF." - # Create discovery subparser - discovery_parser = subparsers.add_parser('discovery', help=discovery_help, description=discovery_subcommand_help, aliases=['list']) - discovery_parser.formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=80, width=90) - discovery_parser.set_defaults(func=func) + # Create list subparser + list_parser = subparsers.add_parser('list', help=list_help, description=list_subcommand_help) + list_parser.formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=80, width=90) + list_parser.set_defaults(func=func) # Add Command Modifiers - self._add_command_modifiers(discovery_parser) + self._add_command_modifiers(list_parser) # Add Device args - self._add_device_arguments(discovery_parser, required=False) + self._add_device_arguments(list_parser, required=False) def _add_static_parser(self, subparsers, func): @@ -356,7 +356,7 @@ class AMDSMIParser(argparse.ArgumentParser): err_records_help = "All error records information" # Create firmware subparser - firmware_parser = subparsers.add_parser('firmware', help=firmware_help, description=firmware_subcommand_help, aliases=['ucode']) + firmware_parser = subparsers.add_parser('firmware', help=firmware_help, description=firmware_subcommand_help) firmware_parser._optionals.title = firmware_optionals_title firmware_parser.formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=80, width=90) firmware_parser.set_defaults(func=func)