[Openmp-commits] [openmp] [OpenMP][DeviceRTL] implemented nteams-var ICV, omp_get_max_teams(), and omp_set_num_teams() (PR #71259)

Khoi Nguyen via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 7 11:44:41 PST 2023

@@ -628,7 +628,7 @@ uint64_t GenericKernelTy::getNumBlocks(GenericDeviceTy &GenericDevice,
 GenericDeviceTy::GenericDeviceTy(int32_t DeviceId, int32_t NumDevices,
                                  const llvm::omp::GV &OMPGridValues)
     : MemoryManager(nullptr), OMP_TeamLimit("OMP_TEAM_LIMIT"),
-      OMP_NumTeams("OMP_NUM_TEAMS"),
+      OMP_NumTeams("OMP_NUM_TEAMS_DEV_" + std::to_string(DeviceId)),
khoing0810 wrote:

should i do this in DeviceEnvironment instead? Does user have to know their device number + internal offset or just device number to set ICVs and let the compiler calculate the offset? If former, I will add "GenericPluginTy &Plugin" argument here and make changes in plugins-nextgen/amdgpu/src/rtl.cpp to reflect it. If latter, I can just add the value in DeviceEnvironment:setupDeviceEnvironment()


More information about the Openmp-commits mailing list