https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/185177
None >From 2b94f74c4d9c488c52e4edceb1d3ec50cfcc95c2 Mon Sep 17 00:00:00 2001 From: Matt Arsenault <[email protected]> Date: Sat, 7 Mar 2026 12:23:00 +0100 Subject: [PATCH] libclc: Add amdgpu wait_group_events --- libclc/opencl/lib/amdgcn/SOURCES | 1 + .../lib/amdgcn/async/wait_group_events.cl | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 libclc/opencl/lib/amdgcn/async/wait_group_events.cl diff --git a/libclc/opencl/lib/amdgcn/SOURCES b/libclc/opencl/lib/amdgcn/SOURCES index e52f54789bfab..c9d29fb2d1905 100644 --- a/libclc/opencl/lib/amdgcn/SOURCES +++ b/libclc/opencl/lib/amdgcn/SOURCES @@ -1,3 +1,4 @@ +async/wait_group_events.cl mem_fence/fence.cl subgroup/subgroup.cl synchronization/sub_group_barrier.cl diff --git a/libclc/opencl/lib/amdgcn/async/wait_group_events.cl b/libclc/opencl/lib/amdgcn/async/wait_group_events.cl new file mode 100644 index 0000000000000..fac33f73af1c4 --- /dev/null +++ b/libclc/opencl/lib/amdgcn/async/wait_group_events.cl @@ -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 +// +//===----------------------------------------------------------------------===// + +#include <clc/opencl/opencl-base.h> + +_CLC_DEF _CLC_OVERLOAD void wait_group_events(int n, __private event_t *evs) { + (void)n; + (void)evs; + work_group_barrier(CLK_LOCAL_MEM_FENCE | CLK_GLOBAL_MEM_FENCE, + memory_scope_work_group); +} + +_CLC_DEF _CLC_OVERLOAD void wait_group_events(int n, __generic event_t *evs) { + (void)n; + (void)evs; + work_group_barrier(CLK_LOCAL_MEM_FENCE | CLK_GLOBAL_MEM_FENCE, + memory_scope_work_group); +} _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
