Merge amd-dev into amd-master 20240307
Signed-off-by: guanyu12 <guanyu12@amd.com>
Change-Id: I872f2dc9c50e2734576173fc3ef903ab55aa02b3
[ROCm/amdsmi commit: 8e487fa52d]
This commit is contained in:
Vendored
+5
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user