llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[HLSL][SPIRV] WaveSize attribute doesn't work for SPIRV

Open damyanp opened this issue 8 months ago • 2 comments

https://godbolt.org/z/PqPxh6z9T

When using the WaveSize attribute with clang-dxc and -spirv an unhelpful error message is shown:

> type t.hlsl
[WaveSize(32)]
[numthreads(1, 1, 1)]
void main() {
}
> ./clang-dxc -spirv -T cs_6_8 t.hlsl
t.hlsl:1:2: error: attribute 'WaveSize' requires shader model 6.6 or greater
    1 | [WaveSize(32)]
      |  ^
1 error generated.

Note that DXC says: ":1:2: warning: Wave size is not supported by Vulkan SPIR-V. Consider using VK_EXT_subgroup_size_control."

damyanp avatar Mar 18 '26 04:03 damyanp

My PR fixed this issue, but I used the wrong keyword in the PR comment. Please close.

danbrown-amd avatar Sep 30 '26 20:09 danbrown-amd

Closed as resolved by #196004.

danbrown-amd avatar Nov 06 '26 20:11 danbrown-amd