[Openmp-commits] [openmp] 96d70f4 - [libomptarget] [amdgpu] Added LDS usage to the kernel trace
Dhruva Chakrabarti via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 24 19:34:19 PDT 2021
Author: Dhruva Chakrabarti
Date: 2021-05-24T19:33:48-07:00
New Revision: 96d70f4d289b2a5a43bc7bd6285816c792e55c35
URL: https://github.com/llvm/llvm-project/commit/96d70f4d289b2a5a43bc7bd6285816c792e55c35
DIFF: https://github.com/llvm/llvm-project/commit/96d70f4d289b2a5a43bc7bd6285816c792e55c35.diff
LOG: [libomptarget] [amdgpu] Added LDS usage to the kernel trace
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D103059
Added:
Modified:
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
index 51fc0a188ced8..9e2e9bf4a4ca4 100644
--- a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -1788,10 +1788,12 @@ int32_t __tgt_rtl_run_target_team_region_locked(
return OFFLOAD_FAIL;
}
+ uint32_t group_segment_size;
uint32_t sgpr_count, vgpr_count, sgpr_spill_count, vgpr_spill_count;
{
auto it = KernelInfoTable[device_id][kernel_name];
+ group_segment_size = it.group_segment_size;
sgpr_count = it.sgpr_count;
vgpr_count = it.vgpr_count;
sgpr_spill_count = it.sgpr_spill_count;
@@ -1819,12 +1821,12 @@ int32_t __tgt_rtl_run_target_team_region_locked(
bool traceToStdout = print_kernel_trace & (RTL_TO_STDOUT | RTL_TIMING);
fprintf(traceToStdout ? stdout : stderr,
"DEVID:%2d SGN:%1d ConstWGSize:%-4d args:%2d teamsXthrds:(%4dX%4d) "
- "reqd:(%4dX%4d) sgpr_count:%u vgpr_count:%u sgpr_spill_count:%u "
- "vgpr_spill_count:%u tripcount:%lu n:%s\n",
+ "reqd:(%4dX%4d) lds_usage:%uB sgpr_count:%u vgpr_count:%u "
+ "sgpr_spill_count:%u vgpr_spill_count:%u tripcount:%lu n:%s\n",
device_id, KernelInfo->ExecutionMode, KernelInfo->ConstWGSize,
arg_num, num_groups, threadsPerGroup, num_teams, thread_limit,
- sgpr_count, vgpr_count, sgpr_spill_count, vgpr_spill_count,
- loop_tripcount, KernelInfo->Name);
+ group_segment_size, sgpr_count, vgpr_count, sgpr_spill_count,
+ vgpr_spill_count, loop_tripcount, KernelInfo->Name);
}
// Run on the device.
More information about the Openmp-commits
mailing list