diff --git a/projects/amdsmi/.github/CODEOWNERS b/projects/amdsmi/.github/CODEOWNERS index ffdc4f48fe..cf1eca3d67 100644 --- a/projects/amdsmi/.github/CODEOWNERS +++ b/projects/amdsmi/.github/CODEOWNERS @@ -1 +1,6 @@ * @marifamd @bill-shuzhou-liu @dmitrii-galantsev @charis-poag-amd @oliveiradan + +docs/* @ROCm/rocm-documentation +*.md @ROCm/rocm-documentation +*.rst @ROCm/rocm-documentation + diff --git a/projects/amdsmi/CMakeLists.txt b/projects/amdsmi/CMakeLists.txt index ae080f8768..e290230e22 100755 --- a/projects/amdsmi/CMakeLists.txt +++ b/projects/amdsmi/CMakeLists.txt @@ -116,7 +116,7 @@ if(ENABLE_ESMI_LIB) if(NOT EXISTS ${PROJECT_SOURCE_DIR}/esmi_ib_library/src) # TODO: use ExternalProject_Add instead or a submodule # as of 2023.10.16 CI builds are broken with an updated submodule - execute_process(COMMAND git clone --depth=1 -b esmi_so_ver-3.0 https://github.com/amd/esmi_ib_library.git ${PROJECT_SOURCE_DIR}/esmi_ib_library) + execute_process(COMMAND git clone --depth=1 -b esmi_pkg_ver-3.0.3 https://github.com/amd/esmi_ib_library.git ${PROJECT_SOURCE_DIR}/esmi_ib_library) endif() if(NOT EXISTS ${PROJECT_SOURCE_DIR}/esmi_ib_library/include/asm/amd_hsmp.h) file(DOWNLOAD diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 9a531d722f..5f28c4a172 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -161,12 +161,13 @@ class AMDSMICommands(): except amdsmi_exception.AmdSmiLibraryException as e: uuid = e.get_error_info() - # Store values based on format - if self.logger.is_human_readable_format(): - self.logger.store_output(args.gpu, 'AMDSMI_SPACING_REMOVAL', {'gpu_bdf':bdf, 'gpu_uuid':uuid}) - else: + # CSV format is intentionally aligned with Host + if self.logger.is_csv_format(): self.logger.store_output(args.gpu, 'gpu_bdf', bdf) self.logger.store_output(args.gpu, 'gpu_uuid', uuid) + else: + self.logger.store_output(args.gpu, 'bdf', bdf) + self.logger.store_output(args.gpu, 'uuid', uuid) if multiple_devices: self.logger.store_multiple_device_output() @@ -800,7 +801,7 @@ class AMDSMICommands(): cpu_attributes = ["smu", "interface_ver"] for attr in cpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): cpu_args_enabled = True break @@ -811,7 +812,7 @@ class AMDSMICommands(): "dfc_ucode", "fb_info", "num_vf"] for attr in gpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): gpu_args_enabled = True break @@ -2255,7 +2256,7 @@ class AMDSMICommands(): "guard", "guest_data", "fb_usage", "xgmi"] for attr in gpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): gpu_args_enabled = True break @@ -2268,7 +2269,7 @@ class AMDSMICommands(): "cpu_dimm_pow_consumption", "cpu_dimm_thermal_sensor"] for attr in cpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): cpu_args_enabled = True break @@ -2277,7 +2278,7 @@ class AMDSMICommands(): core_attributes = ["core_boost_limit", "core_curr_active_freq_core_limit", "core_energy"] for attr in core_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): core_args_enabled = True break @@ -3314,13 +3315,18 @@ class AMDSMICommands(): cpu_args_enabled = False cpu_attributes = ["cpu_pwr_limit", "cpu_xgmi_link_width", "cpu_lclk_dpm_level", "cpu_pwr_eff_mode", "cpu_gmi3_link_width", "cpu_pcie_link_rate", "cpu_df_pstate_range", - "cpu_enable_apb", "cpu_disable_apb", "soc_boost_limit"] + "cpu_disable_apb", "soc_boost_limit"] for attr in cpu_attributes: if hasattr(args, attr): if getattr(args, attr) is not None: cpu_args_enabled = True break + # Check if CPU set argument with store_true has been passed + if hasattr(args, "cpu_enable_apb"): + if getattr(args, attr): + cpu_args_enabled = True + # Check if a Core argument has been set core_args_enabled = False core_attributes = ["core_boost_limit"] diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 57c83eada6..7e283bfb75 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -1429,9 +1429,10 @@ typedef struct { * @brief This structure holds error counts. */ typedef struct { - uint64_t correctable_count; //!< Accumulated correctable errors - uint64_t uncorrectable_count; //!< Accumulated uncorrectable errors - uint64_t reserved[2]; + uint64_t correctable_count; //!< Accumulated correctable errors + uint64_t uncorrectable_count; //!< Accumulated uncorrectable errors + uint64_t deferred_count; //!< Accumulated deferred errors + uint64_t reserved[5]; } amdsmi_error_count_t; /** @@ -4662,8 +4663,8 @@ amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_pro */ /** - * @brief Returns the total number of ECC errors (correctable and - * uncorrectable) in the given GPU. It is not supported on + * @brief Returns the total number of ECC errors (correctable, + * uncorrectable and deferred) in the given GPU. It is not supported on * virtual machine guest * * @platform{gpu_bm_linux} @platform{host} diff --git a/projects/amdsmi/rocm_smi/include/rocm_smi/rocm_smi.h b/projects/amdsmi/rocm_smi/include/rocm_smi/rocm_smi.h index 8d29293085..d42ac466c0 100755 --- a/projects/amdsmi/rocm_smi/include/rocm_smi/rocm_smi.h +++ b/projects/amdsmi/rocm_smi/include/rocm_smi/rocm_smi.h @@ -1194,8 +1194,10 @@ typedef enum { * @brief This structure holds error counts. */ typedef struct { - uint64_t correctable_err; //!< Accumulated correctable errors - uint64_t uncorrectable_err; //!< Accumulated uncorrectable errors + uint64_t correctable_err; //!< Accumulated correctable errors + uint64_t uncorrectable_err; //!< Accumulated uncorrectable errors + uint64_t deferred_err; //!< Accumulated deferred errors + uint64_t reserved[5]; } rsmi_error_count_t; /** diff --git a/projects/amdsmi/rocm_smi/src/rocm_smi.cc b/projects/amdsmi/rocm_smi/src/rocm_smi.cc index fdf64a9374..35082a9850 100755 --- a/projects/amdsmi/rocm_smi/src/rocm_smi.cc +++ b/projects/amdsmi/rocm_smi/src/rocm_smi.cc @@ -766,6 +766,20 @@ rsmi_dev_ecc_count_get(uint32_t dv_ind, rsmi_gpu_block_t block, assert(junk == "ce:"); fs2 >> ec->correctable_err; + ec->deferred_err = 0; + if (val_vec.size() > 2) { + std::istringstream fs3(val_vec[2]); + fs3 >> junk; + if (junk == "de:") { + fs3 >> ec->deferred_err; + } else { + ss << __PRETTY_FUNCTION__ + << "Trying to get the de count, but got " << junk + << " ignore the defer count"; + LOG_ERROR(ss); + } + } + ss << __PRETTY_FUNCTION__ << " | ======= end =======" << ", reporting " << amd::smi::getRSMIStatusString(ret);; LOG_TRACE(ss); diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index 7032b1a59a..dc5f9509b1 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -1733,6 +1733,7 @@ amdsmi_get_gpu_total_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_ // Increase the total ecc counts ec->correctable_count += block_ec.correctable_count; ec->uncorrectable_count += block_ec.uncorrectable_count; + ec->deferred_count += block_ec.deferred_count; } } }