From f4ac97535a9c4945f910746c7f22948da3d13d1e Mon Sep 17 00:00:00 2001 From: Giovanni baraldi Date: Thu, 12 Dec 2024 09:34:09 -0600 Subject: [PATCH] SWDEV-495743: Use simd_count instead of cu_per_array for derived metrics Change-Id: Iddd14817fdcd017e7f91492ecf95b88814b58171 --- src/core/hardware/hsa_info.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/hardware/hsa_info.cpp b/src/core/hardware/hsa_info.cpp index 1812fba8c4..51675a91fd 100644 --- a/src/core/hardware/hsa_info.cpp +++ b/src/core/hardware/hsa_info.cpp @@ -61,7 +61,7 @@ DeviceInfo::DeviceInfo(uint32_t topology_id, uint32_t gpu_id) { gpu_id_ = gpu_id; fs::path properties_path = node_path / "properties"; std::ifstream props_ifs(properties_path); - uint32_t cu_per_simd_array = 0, array_count = 0; + uint32_t simd_count = 0, array_count = 0; uint32_t max_waves_per_simd = 0, gfx_target_version = 0; std::string prop_name, minor_version_str, stepping_str; uint64_t prop_value; @@ -80,10 +80,10 @@ DeviceInfo::DeviceInfo(uint32_t topology_id, uint32_t gpu_id) { if (prop_name == "wave_front_size") { max_wave_size_ = static_cast(prop_value); if (max_wave_size_ <= 0) rocprofiler::fatal("Invalid max_wave_size_ in the topology file"); - } else if (prop_name == "cu_per_simd_array") { - cu_per_simd_array = static_cast(prop_value); - if (cu_per_simd_array <= 0) - rocprofiler::fatal("Invalid cu_per_simd_array in the topology file"); + } else if (prop_name == "simd_count") { + simd_count = static_cast(prop_value); + if (simd_count <= 0) + rocprofiler::fatal("Invalid simd_count in the topology file"); } else if (prop_name == "array_count") { array_count = static_cast(prop_value); if (array_count <= 0) rocprofiler::fatal("Invalid array_count in the topology file"); @@ -113,7 +113,7 @@ DeviceInfo::DeviceInfo(uint32_t topology_id, uint32_t gpu_id) { se_num_ = array_count / shader_arrays_per_se_; waves_per_cu_ = max_waves_per_simd * simds_per_cu_; - cu_num_ = cu_per_simd_array * array_count; + cu_num_ = simd_count / simds_per_cu_; major_version = (gfx_target_version / 100) / 100; std::string major_version_str = std::to_string(major_version); minor_version = (gfx_target_version / 100) % 100;