From ab907b4fd88febda889d69855975157874f40f6e Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Fri, 1 Mar 2024 09:08:48 -0600 Subject: [PATCH 1/5] SWDEV-448626 - Removed gpu prefix in non-csv formats Signed-off-by: Maisam Arif Change-Id: I77fc58828a978080482e6ab01ff89f1f5a554dc5 [ROCm/amdsmi commit: 463817f34477d9e2a1f73227d6e25ceea0b0c49d] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 9a531d722f..1168b5f963 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() From 40bffc8ceded437e29570938a66067a0e07367f9 Mon Sep 17 00:00:00 2001 From: Deepak Mewar Date: Mon, 4 Mar 2024 03:29:03 -0500 Subject: [PATCH 2/5] Updated as per latest esmi library changes in github Change-Id: I949e1f2dcffc223274505764c84f2c6b9a533c98 [ROCm/amdsmi commit: cfb9b5e7503a08933da3fc445b287843db746185] --- projects/amdsmi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From a807b8dc37aad6372cc702c15a354b473332cfe8 Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Mon, 4 Mar 2024 11:02:50 -0600 Subject: [PATCH 3/5] Revert is not None check for static & metric arugment checks Signed-off-by: Maisam Arif Change-Id: I351c88d53c9a626ad4305a7c61dc18b976b853f2 [ROCm/amdsmi commit: c8c03dfab08ecdf6cf2aec2606ca46f7325c396e] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 1168b5f963..5f28c4a172 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -801,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 @@ -812,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 @@ -2256,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 @@ -2269,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 @@ -2278,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 @@ -3315,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"] From f0e5bffab3f0eb75ebdca64827789c916c39f4dd Mon Sep 17 00:00:00 2001 From: "Bill(Shuzhou) Liu" Date: Mon, 4 Mar 2024 09:27:28 -0600 Subject: [PATCH 4/5] Add support for deferred RAS errors in API The API will support the deferred errors Change-Id: I221a146f09fefde1fc31e5f746d0870e07c93561 [ROCm/amdsmi commit: c489cb8f3f1ea4c370e9b5d32f56bafbfadc5b48] --- projects/amdsmi/include/amd_smi/amdsmi.h | 11 ++++++----- .../amdsmi/rocm_smi/include/rocm_smi/rocm_smi.h | 6 ++++-- projects/amdsmi/rocm_smi/src/rocm_smi.cc | 14 ++++++++++++++ projects/amdsmi/src/amd_smi/amd_smi.cc | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) 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; } } } From 3e56a34a92050070d8d2024b108479b06bd284f3 Mon Sep 17 00:00:00 2001 From: David Galiffi Date: Tue, 5 Mar 2024 14:59:55 -0500 Subject: [PATCH 5/5] Add Doc team to CODEOWNERS file Signed-off-by: David Galiffi Change-Id: Iad8eea0645b63bddb835ed22080facc7d25c1bc0 [ROCm/amdsmi commit: 1b0e01d50466393a17c3ef2c3728ffa9451f069f] --- projects/amdsmi/.github/CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) 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 +