From 5743058efb8e5f57761ea88a88384a4748f776bc Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Thu, 30 Mar 2023 10:07:46 -0500 Subject: [PATCH] CI Build directory fix Signed-off-by: Maisam Arif Change-Id: I7600c3c4c2fd45ca240ee8ec04de55dc29c26365 [ROCm/amdsmi commit: 452bffb6b4533a06252029769ce7566e472244d1] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 40 +++++++++---------- projects/amdsmi/amdsmi_cli/amdsmi_parser.py | 1 + projects/amdsmi/py-interface/_version.py | 2 +- projects/amdsmi/src/CMakeLists.txt | 2 +- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 2e4281e76e..257d956745 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -113,9 +113,9 @@ class AMDSMICommands(): # Handle multiple GPUs handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.discovery) if handled_multiple_gpus: - return - else: - args.gpu = device_handle + return # This function is recursive + + args.gpu = device_handle try: bdf = amdsmi_interface.amdsmi_get_device_bdf(args.gpu) @@ -197,9 +197,9 @@ class AMDSMICommands(): # Handle multiple GPUs handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.static) if handled_multiple_gpus: - return - else: - args.gpu = device_handle + return # This function is recursive + + args.gpu = device_handle # If all arguments are False, it means that no argument was passed and the entire static should be printed if not any([args.asic, args.bus, args.vbios, args.limit, args.driver, args.caps, args.ras, args.board]): @@ -375,9 +375,9 @@ class AMDSMICommands(): # Handle multiple GPUs handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.firmware) if handled_multiple_gpus: - return - else: - args.gpu = device_handle + return # This function is recursive + + args.gpu = device_handle values_dict = {} @@ -453,9 +453,9 @@ class AMDSMICommands(): # Handle multiple GPUs handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.bad_pages) if handled_multiple_gpus: - return - else: - args.gpu = device_handle + return # This function is recursive + + args.gpu = device_handle # If all arguments are False, the print all bad_page information if not any([args.retired, args.pending, args.un_res]): @@ -846,7 +846,7 @@ class AMDSMICommands(): od_volt = amdsmi_interface.amdsmi_dev_get_od_volt_info(args.gpu) voltage_curve_error = False except amdsmi_exception.AmdSmiLibraryException as e: - od_volt = None; + od_volt = None values_dict["voltage_curve"] = e.get_error_info() voltage_curve_error = True @@ -1140,7 +1140,7 @@ class AMDSMICommands(): print('EVENT LISTENING:\n') print('Press q and hit ENTER when you want to stop (listening will stop inside 10 seconds)') - threads = list() + threads = [] for i in range(len(self.device_handles)): x = threading.Thread(target=self._event_thread, args=(self, i)) threads.append(x) @@ -1304,9 +1304,9 @@ class AMDSMICommands(): # Handle multiple GPUs handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.set_value) if handled_multiple_gpus: - return - else: - args.gpu = device_handle + return # This function is recursive + + args.gpu = device_handle if args.clock: clock_type, freq_bitmask = args.clock @@ -1591,9 +1591,9 @@ class AMDSMICommands(): # Handle multiple GPUs handled_multiple_gpus, device_handle = self.helpers.handle_gpus(args, self.logger, self.reset) if handled_multiple_gpus: - return - else: - args.gpu = device_handle + return # This function is recursive + + args.gpu = device_handle if args.gpureset: if self.helpers.is_amd_device(args.gpu): diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py index 0e234ea338..26ea86070e 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py @@ -539,6 +539,7 @@ class AMDSMIParser(argparse.ArgumentParser): def _add_topology_parser(self, subparsers, func): + return if not(self.amdsmi_helpers.is_baremetal() and self.amdsmi_helpers.is_linux()): # This subparser is only applicable to Baremetal Linux return diff --git a/projects/amdsmi/py-interface/_version.py b/projects/amdsmi/py-interface/_version.py index b3c06d4883..a0235ce508 100644 --- a/projects/amdsmi/py-interface/_version.py +++ b/projects/amdsmi/py-interface/_version.py @@ -1 +1 @@ -__version__ = "0.0.1" \ No newline at end of file +__version__ = "0.0.2" \ No newline at end of file diff --git a/projects/amdsmi/src/CMakeLists.txt b/projects/amdsmi/src/CMakeLists.txt index 908502098c..48cc43ecc6 100644 --- a/projects/amdsmi/src/CMakeLists.txt +++ b/projects/amdsmi/src/CMakeLists.txt @@ -120,7 +120,7 @@ install( install( FILES ${PROJECT_SOURCE_DIR}/include/amd_smi/amdsmi.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/amd_smii + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/amd_smi COMPONENT dev) install( FILES ${PROJECT_SOURCE_DIR}/include/amd_smi/${AMD_SMI_TARGET}Config.h