[Openmp-commits] [PATCH] D105239: [libomptarget][nfc] Group environment variables, drop accesses to DeviceInfo global
Dhruva Chakrabarti via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jun 30 23:16:38 PDT 2021
dhruvachak added inline comments.
================
Comment at: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:1874
};
-
-launchVals getLaunchVals(int ConstWGSize, int ExecutionMode, int EnvTeamLimit,
- int EnvNumTeams, int num_teams, int thread_limit,
+launchVals getLaunchVals(EnvironmentVariables Env, int ConstWGSize,
+ int ExecutionMode, int num_teams, int thread_limit,
----------------
Since we are cleaning up, let's use the same style for all parameters, e.g. CamelCase.
================
Comment at: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:2098
if (print_kernel_trace >= LAUNCH) {
+ int num_groups = GridSize / WorkgroupSize;
// enum modes are SPMD, GENERIC, NONE 0,1,2
----------------
Since we already computed num_groups within getLaunchVals, should we return that as well? Otherwise, we have duplicate computation of num_groups and they may go out of sync. Basically, the structure launchVals can have 3 fields including NumGroups.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105239/new/
https://reviews.llvm.org/D105239
More information about the Openmp-commits
mailing list