diff --git a/CHANGELOG.md b/CHANGELOG.md index ad3bd0a1de..1379b3ccd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -571,9 +571,12 @@ GPU: 0 - **Removed usage of _validate_positive in Parser and replaced with _positive_int and _not_negative_int as appropriate**. - This will allow 0 to be a valid input for several options in setting CPUs where appropriate (for example, as a mode or NBIOID) -- **Removed `--ras` option from `amd-smi static` command in Guest environments** +- **Removed `--ras` option from `amd-smi static` command in Guest environments**. - VMs don't have permission from Hosts to obtain RAS information, so this option was made invalid on Guest environments. +- **Removed `--ecc` option from `amd-smi monitor` command in Guest environments**. + - Guest VMs do not support getting current ECC counts from the Host cards. + ### Optimizations - **Adjusted ordering of gpu_metrics calls to ensure that pcie_bw values remain stable in `amd-smi metric` & `amd-smi monitor`**. diff --git a/amdsmi_cli/amdsmi_commands.py b/amdsmi_cli/amdsmi_commands.py index 7e25d2f075..348503548e 100644 --- a/amdsmi_cli/amdsmi_commands.py +++ b/amdsmi_cli/amdsmi_commands.py @@ -4518,6 +4518,22 @@ class AMDSMICommands(): if args.gpu == None: args.gpu = self.device_handles + # handle platform for ecc + if self.helpers.is_virtual_os(): + args.ecc = False + if not any([args.power_usage, args.temperature, args.gfx, args.mem, + args.encoder, args.decoder, args.vram_usage, args.pcie, args.violation]): + args.power_usage = args.temperature = args.gfx = args.mem = \ + args.encoder = args.decoder = \ + args.vram_usage = args.pcie = args.violation = True + else: + if not any([args.power_usage, args.temperature, args.gfx, args.mem, + args.encoder, args.decoder, args.ecc, + args.vram_usage, args.pcie, args.violation]): + args.power_usage = args.temperature = args.gfx = args.mem = \ + args.encoder = args.decoder = args.ecc = \ + args.vram_usage = args.pcie = args.violation = True + # If all arguments are False, the print all values # Don't include process in this logic as it's an optional edge case if not any([args.power_usage, args.temperature, args.gfx, args.mem, diff --git a/amdsmi_cli/amdsmi_parser.py b/amdsmi_cli/amdsmi_parser.py index 4f8ace7a70..830cf7239f 100644 --- a/amdsmi_cli/amdsmi_parser.py +++ b/amdsmi_cli/amdsmi_parser.py @@ -1207,7 +1207,10 @@ class AMDSMIParser(argparse.ArgumentParser): monitor_parser.add_argument('-m', '--mem', action='store_true', required=False, help=mem_util_help) monitor_parser.add_argument('-n', '--encoder', action='store_true', required=False, help=encoder_util_help) monitor_parser.add_argument('-d', '--decoder', action='store_true', required=False, help=decoder_util_help) - monitor_parser.add_argument('-e', '--ecc', action='store_true', required=False, help=ecc_help) + + if not self.helpers.is_virtual_os(): + monitor_parser.add_argument('-e', '--ecc', action='store_true', required=False, help=ecc_help) + monitor_parser.add_argument('-v', '--vram-usage', action='store_true', required=False, help=mem_usage_help) monitor_parser.add_argument('-r', '--pcie', action='store_true', required=False, help=pcie_bandwidth_help) monitor_parser.add_argument('-q', '--process', action='store_true', required=False, help=process_help)