diff --git a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp --- a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp +++ b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp @@ -70,6 +70,10 @@ } } +// Heuristic parameters used for kernel launch +// Number of teams per CU to allow scheduling flexibility +static const unsigned DefaultTeamsPerCU = 4; + int print_kernel_trace; #ifdef OMPTARGET_DEBUG @@ -1083,7 +1087,7 @@ DeviceInfo.EnvNumTeams); } else { char *TeamsPerCUEnvStr = getenv("OMP_TARGET_TEAMS_PER_PROC"); - int TeamsPerCU = 1; // default number of teams per CU is 1 + int TeamsPerCU = DefaultTeamsPerCU; if (TeamsPerCUEnvStr) { TeamsPerCU = std::stoi(TeamsPerCUEnvStr); }