Skip to content

Commit e6410a7

Browse files
authored
[UR] Work around hierarchical build failure (#18063)
The recent pulldown resulted in an error building this device code example. This fixes it, although I cannot say why. I assume the `group_id` on the local scope is being copied into the private stack in a wierd way?
1 parent ec2bfbb commit e6410a7

File tree

1 file changed

+3
-0
lines changed
  • unified-runtime/test/conformance/device_code

1 file changed

+3
-0
lines changed

unified-runtime/test/conformance/device_code/mean.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ int main() {
2727
num_groups, group_size, [=](sycl::group<1> group) {
2828
auto group_id = group.get_group_id();
2929
group.parallel_for_work_item([&](sycl::h_item<1> item) {
30+
// A recent (April 2025) pulldown of spirv-tools/llvm caused issues capturing `group_id` in the closure,
31+
// so we create a new version in lambda itself in private memory.
32+
auto group_id = group.get_group_id();
3033
auto local_id = item.get_local_id(0);
3134
auto in_index = (group_id * wg_size) + local_id;
3235
local_mem[local_id] = in_acc[in_index];

0 commit comments

Comments
 (0)