google / google/clspv

kernel lacks LocalSize execution mode if another kernel has reqd_work_group_size

Open
#29 1 comment 0 reactions 1 assignee Claimed by @dneto0 View on GitHub
Dominant language
LLVM
Stars
729
Forks
110
Avg merge
17h 51m
Merged PRs (30d)
23

Description

Here the "align" kernel has a reqd_work_group_size. So it gets a LocalSize execution mode. It also suppresses generation of spec IDs for the components of a work-group-size vector.
However, the "boo" kernel is generated without an associated LocalSize execution model. This is an error. The most sane thing to do here is to emit a LocalSize of 1 1 1, and document it.

```
kernel void __attribute__((reqd_work_group_size(12,2,3))) align(global int* A, int x, float4 c) {
*A = x + (int)c.x;
}

kernel void boo(global int* A, int x, float4 c) {
*A = x + (int)c.x;
}
```

There's an unfortunate problem in the Vulkan env spec in that a specialization value for workgroup size is freefloating and you can't tell what compute shaders it should affect. So the proposed defaulting is about as good as we can do.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.