[Openmp-commits] [openmp] [OpenMP] Fix incorrect code comment in getMaxTeamsThreads (PR #174970)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 8 04:52:32 PST 2026
https://github.com/aywala created https://github.com/llvm/llvm-project/pull/174970
We should remove the warp containing the main thread only if we are in Generic mode (not in SPMD mode).
>From 753ff4950e5fcb3275164404594c153cb5c57991 Mon Sep 17 00:00:00 2001
From: aywala <harveygogogo at outlook.com>
Date: Thu, 8 Jan 2026 20:32:44 +0800
Subject: [PATCH] fix comment
---
openmp/device/src/Mapping.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openmp/device/src/Mapping.cpp b/openmp/device/src/Mapping.cpp
index b145892d1ece0..53d2a30dcf592 100644
--- a/openmp/device/src/Mapping.cpp
+++ b/openmp/device/src/Mapping.cpp
@@ -97,7 +97,7 @@ uint32_t mapping::getWarpSize() { return __gpu_num_lanes(); }
uint32_t mapping::getMaxTeamThreads(bool IsSPMD) {
uint32_t BlockSize = mapping::getNumberOfThreadsInBlock();
- // If we are in SPMD mode, remove one warp.
+ // If we are not in SPMD mode, remove one warp.
return BlockSize - (!IsSPMD * mapping::getWarpSize());
}
uint32_t mapping::getMaxTeamThreads() {
More information about the Openmp-commits
mailing list