diff --git a/amdsmi_cli/CMakeLists.txt b/amdsmi_cli/CMakeLists.txt index 5abe1e4599..02ebc213f7 100644 --- a/amdsmi_cli/CMakeLists.txt +++ b/amdsmi_cli/CMakeLists.txt @@ -48,11 +48,13 @@ add_custom_target( install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PY_PACKAGE_DIR} - DESTINATION ${PY_CLI_INSTALL_DIR}) + DESTINATION ${PY_CLI_INSTALL_DIR} + COMPONENT dev) install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PY_PACKAGE_DIR}/amdsmi_cli.py - DESTINATION ${PY_CLI_INSTALL_DIR}/${PY_PACKAGE_DIR}) + DESTINATION ${PY_CLI_INSTALL_DIR}/${PY_PACKAGE_DIR} + COMPONENT dev) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) @@ -73,4 +75,5 @@ add_custom_target( install( FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/amd-smi ${CMAKE_CURRENT_BINARY_DIR}/bin/gpuv-smi - DESTINATION ${CMAKE_INSTALL_BINDIR}) + DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT dev) diff --git a/amdsmi_cli/amdsmi_commands.py b/amdsmi_cli/amdsmi_commands.py index 2e4281e76e..257d956745 100644 --- a/amdsmi_cli/amdsmi_commands.py +++ b/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/amdsmi_cli/amdsmi_parser.py b/amdsmi_cli/amdsmi_parser.py index 0e234ea338..26ea86070e 100644 --- a/amdsmi_cli/amdsmi_parser.py +++ b/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/py-interface/CMakeLists.txt b/py-interface/CMakeLists.txt index 666293f39f..2c2ebd5e89 100644 --- a/py-interface/CMakeLists.txt +++ b/py-interface/CMakeLists.txt @@ -103,8 +103,10 @@ add_custom_target( install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PY_BUILD_DIR}/pyproject.toml - DESTINATION ${PY_WRAPPER_INSTALL_DIR}) + DESTINATION ${PY_WRAPPER_INSTALL_DIR} + COMPONENT dev) install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PY_PACKAGE_DIR} - DESTINATION ${PY_WRAPPER_INSTALL_DIR}) + DESTINATION ${PY_WRAPPER_INSTALL_DIR} + COMPONENT dev) diff --git a/py-interface/_version.py b/py-interface/_version.py index b3c06d4883..a0235ce508 100644 --- a/py-interface/_version.py +++ b/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/src/CMakeLists.txt b/src/CMakeLists.txt index 908502098c..48cc43ecc6 100644 --- a/src/CMakeLists.txt +++ b/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