[llvm-branch-commits] [libclc] libclc: Add work group scan functions (PR #188829)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Mar 27 01:19:48 PDT 2026


================
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __CLC_CLC_TARGET_DEFINES_H__
+#define __CLC_CLC_TARGET_DEFINES_H__
+
+#if defined(__AMDGPU__) || defined(__NVPTX__)
+#define __CLC_MAX_WORK_GROUP_SIZE 1024
+#define __CLC_MIN_NATIVE_SUB_GROUP_SIZE 32
+#else
+#define __CLC_MAX_WORK_GROUP_SIZE 4096
+#define __CLC_MIN_NATIVE_SUB_GROUP_SIZE 1
+#endif
+
+#define __CLC_MAX_NUM_WORK_GROUPS                                              \
----------------
arsenm wrote:

It's really the number of workgroups, it just happens the number of subgroups is the hardware minimum work group size 

https://github.com/llvm/llvm-project/pull/188829


More information about the llvm-branch-commits mailing list