Skip to content

Commit d606bb1

Browse files
Kewen12ronlieb
andauthored
[OpenMP] Print loaded envar when debug flag is enabled (#520)
Print out the loaded envars when `LIBOMPTARGET_DEBUG=1` example output: ``` TARGET AMDGPU RTL --> Envar config for MI210 is used. TARGET AMDGPU RTL --> Loaded envar: OMPX_UseMultipleSdmaEngines=1, OMPX_AdjustNumTeamsForXteamRedSmallBlockSize=0 ``` --------- Co-authored-by: Ron Lieberman <ron.lieberman@amd.com>
1 parent c29e127 commit d606bb1

File tree

1 file changed

+10
-0
lines changed
  • offload/plugins-nextgen/amdgpu/src

1 file changed

+10
-0
lines changed

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3150,6 +3150,16 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
31503150
OMPX_XTeamReductionOccupancyBasedOpt =
31513151
EnvarConfig.OMPX_XTeamReductionOccupancyBasedOpt;
31523152
}
3153+
// Print potential GPU envars.
3154+
DP("Loaded per GPU envars:\n"
3155+
" OMPX_UseMultipleSdmaEngines=%d\n"
3156+
" OMPX_AdjustNumTeamsForXteamRedSmallBlockSize=%d\n"
3157+
" OMPX_XteamBlockSize=%d\n"
3158+
" OMPX_XTeamReductionOccupancyBasedOpt=%d\n",
3159+
EnvarConfig.OMPX_UseMultipleSdmaEngines,
3160+
EnvarConfig.OMPX_AdjustNumTeamsForXteamRedSmallBlockSize,
3161+
EnvarConfig.OMPX_XteamBlockSize,
3162+
EnvarConfig.OMPX_XTeamReductionOccupancyBasedOpt);
31533163
}
31543164

31553165
~AMDGPUDeviceTy() {}

0 commit comments

Comments
 (0)