[SWDEV-488846] Removed '--ecc' option from 'amd-smi monitor' when platform is VM

Change-Id: I8f5d7771cbfac3fe5f52dbccbd9f28020adb5f6f
This commit is contained in:
gabrpham
2024-10-09 13:58:08 -05:00
gecommit door Maisam Arif
bovenliggende eb9116e8c2
commit 27b5a35d65
3 gewijzigde bestanden met toevoegingen van 24 en 2 verwijderingen
+4 -1
Bestand weergeven
@@ -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`**.
+16
Bestand weergeven
@@ -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,
+4 -1
Bestand weergeven
@@ -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)