Merge amd-dev into amd-master 20231026

Signed-off-by: guanyu12 <guanyu12@amd.com>
Change-Id: Ib2aee67ad342022e202258fcc881082fee49e60f
Этот коммит содержится в:
guanyu12
2023-10-26 14:44:39 +08:00
родитель dcb59e049e 2b603be71b
Коммит b30304aca0
2 изменённых файлов: 23 добавлений и 0 удалений
+11
Просмотреть файл
@@ -134,6 +134,17 @@ For additional details, see the [ROCm Contributing Guide](https://rocm.docs.amd.
* python 3.7+ 64-bit
* amdgpu driver must be loaded for amdsmi_init() to pass
### Optional autocompletion
`amd-smi` cli application supports autocompletion. It is enabled by using the
following commands:
```bash
python3 -m pip install argcomplete
activate-global-python-argcomplete
# restart shell to enable
```
### CLI Installation
Before amd-smi install, ensure previous versions of amdsmi library are uninstalled using pip:
+12
Просмотреть файл
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
# PYTHON_ARGCOMPLETE_OK
#
# Copyright (C) 2023 Advanced Micro Devices. All rights reserved.
#
@@ -23,6 +25,11 @@
import logging
import sys
try:
import argcomplete
except ImportError:
logging.debug("argcomplete module not found. Autocomplete will not work.")
from amdsmi_commands import AMDSMICommands
from amdsmi_parser import AMDSMIParser
from amdsmi_logger import AMDSMILogger
@@ -63,6 +70,11 @@ if __name__ == "__main__":
amd_smi_commands.reset,
amd_smi_commands.rocm_smi)
try:
try:
argcomplete.autocomplete(amd_smi_parser)
except NameError:
logging.debug("argcomplete module not found. Autocomplete will not work.")
args = amd_smi_parser.parse_args(args=None if sys.argv[1:] else ['--help'])
# Handle command modifiers before subcommand execution