From 35928e60081cb9ef8cb705f5be17e70ff3e5b030 Mon Sep 17 00:00:00 2001 From: Benjamin Welton Date: Wed, 6 Dec 2023 15:39:43 -0800 Subject: [PATCH] Align calculation of cu_per_engine with compute_unit/shader_engs (#278) * Align calculation of cu_per_engine with compute_unit/shader_engs * source formatting (clang-format v11) (#279) Co-authored-by: bwelton * Update agent.cpp --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bwelton --- source/lib/rocprofiler-sdk/agent.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/lib/rocprofiler-sdk/agent.cpp b/source/lib/rocprofiler-sdk/agent.cpp index e5f9551fc9..c0da352b20 100644 --- a/source/lib/rocprofiler-sdk/agent.cpp +++ b/source/lib/rocprofiler-sdk/agent.cpp @@ -504,11 +504,10 @@ read_topology() agent_info.array_count / agent_info.simd_arrays_per_engine; // depends on above - if(agent_info.num_shader_banks * agent_info.simd_arrays_per_engine > 0) + if(agent_info.num_shader_banks > 0) { - agent_info.cu_per_engine = - (agent_info.simd_count / agent_info.simd_per_cu) / - (agent_info.num_shader_banks * agent_info.simd_arrays_per_engine); + agent_info.cu_per_engine = (agent_info.simd_count / agent_info.simd_per_cu) / + (agent_info.num_shader_banks); } }