Skip to content

Commit dcef1ec

Browse files
authored
Split WaveActiveBallot tests into two tests to address new WARP bug (#712)
This PR splits off the WaveActiveBallot tests into two, with the `Out[3] = WaveActiveBallot(threadID.x % 2 == 1);` being its own test with the WARP-specific XFAIL associated with #711
1 parent e536eaf commit dcef1ec

6 files changed

+162
-18
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#--- source.hlsl
2+
RWStructuredBuffer<uint4> Out : register(u1);
3+
4+
[WaveSize(128)]
5+
[numthreads(128, 1, 1)]
6+
void main(uint3 threadID : SV_DispatchThreadID) {
7+
// We expect all resulting uint's bitmask to be
8+
// 0xAAAAAAAA
9+
Out[0] = WaveActiveBallot(threadID.x % 2 == 1);
10+
}
11+
12+
//--- pipeline.yaml
13+
14+
---
15+
Shaders:
16+
- Stage: Compute
17+
Entry: main
18+
DispatchSize: [1, 1, 1]
19+
Buffers:
20+
- Name: Out
21+
Format: UInt32
22+
Stride: 4
23+
FillSize: 16
24+
- Name: ExpectedOut
25+
Format: UInt32
26+
Stride: 4
27+
Data: [2863311530, 2863311530, 2863311530, 2863311530]
28+
Results:
29+
- Result: Test
30+
Rule: BufferExact
31+
Actual: Out
32+
Expected: ExpectedOut
33+
DescriptorSets:
34+
- Resources:
35+
- Name: Out
36+
Kind: RWStructuredBuffer
37+
DirectXBinding:
38+
Register: 1
39+
Space: 0
40+
VulkanBinding:
41+
Binding: 1
42+
...
43+
#--- end
44+
45+
# REQUIRES: WaveSize_128
46+
47+
# Bug: https://github.com/llvm/offload-test-suite/issues/711
48+
# XFAIL: WARP && Clang
49+
50+
# RUN: split-file %s %t
51+
# RUN: %dxc_target -T cs_6_6 -Fo %t.o %t/source.hlsl
52+
# RUN: %offloader %t/pipeline.yaml %t.o
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#--- source.hlsl
2+
RWStructuredBuffer<uint4> Out : register(u1);
3+
4+
[WaveSize(32)]
5+
[numthreads(32, 1, 1)]
6+
void main(uint3 threadID : SV_DispatchThreadID) {
7+
// We expect the first resulting uint's bitmask to be
8+
// 0xAAAAAAAA
9+
Out[0] = WaveActiveBallot(threadID.x % 2 == 1);
10+
}
11+
12+
//--- pipeline.yaml
13+
14+
---
15+
Shaders:
16+
- Stage: Compute
17+
Entry: main
18+
DispatchSize: [1, 1, 1]
19+
Buffers:
20+
- Name: Out
21+
Format: UInt32
22+
Stride: 4
23+
FillSize: 16
24+
- Name: ExpectedOut
25+
Format: UInt32
26+
Stride: 4
27+
Data: [2863311530, 0, 0, 0]
28+
Results:
29+
- Result: Test
30+
Rule: BufferExact
31+
Actual: Out
32+
Expected: ExpectedOut
33+
DescriptorSets:
34+
- Resources:
35+
- Name: Out
36+
Kind: RWStructuredBuffer
37+
DirectXBinding:
38+
Register: 1
39+
Space: 0
40+
VulkanBinding:
41+
Binding: 1
42+
...
43+
#--- end
44+
45+
# REQUIRES: WaveSize_32
46+
47+
# Bug: https://github.com/llvm/offload-test-suite/issues/711
48+
# XFAIL: WARP && Clang
49+
50+
# RUN: split-file %s %t
51+
# RUN: %dxc_target -T cs_6_6 -Fo %t.o %t/source.hlsl
52+
# RUN: %offloader %t/pipeline.yaml %t.o
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#--- source.hlsl
2+
RWStructuredBuffer<uint4> Out : register(u1);
3+
4+
[WaveSize(64)]
5+
[numthreads(64, 1, 1)]
6+
void main(uint3 threadID : SV_DispatchThreadID) {
7+
// We expect the first and second resulting uint's bitmask to be
8+
// 0xAAAAAAAA
9+
Out[0] = WaveActiveBallot(threadID.x % 2 == 1);
10+
}
11+
12+
//--- pipeline.yaml
13+
14+
---
15+
Shaders:
16+
- Stage: Compute
17+
Entry: main
18+
DispatchSize: [1, 1, 1]
19+
Buffers:
20+
- Name: Out
21+
Format: UInt32
22+
Stride: 4
23+
FillSize: 16
24+
- Name: ExpectedOut
25+
Format: UInt32
26+
Stride: 4
27+
Data: [2863311530, 2863311530, 0, 0]
28+
Results:
29+
- Result: Test
30+
Rule: BufferExact
31+
Actual: Out
32+
Expected: ExpectedOut
33+
DescriptorSets:
34+
- Resources:
35+
- Name: Out
36+
Kind: RWStructuredBuffer
37+
DirectXBinding:
38+
Register: 1
39+
Space: 0
40+
VulkanBinding:
41+
Binding: 1
42+
...
43+
#--- end
44+
45+
# REQUIRES: WaveSize_64
46+
47+
# Bug: https://github.com/llvm/offload-test-suite/issues/711
48+
# XFAIL: WARP && Clang
49+
50+
# RUN: split-file %s %t
51+
# RUN: %dxc_target -T cs_6_6 -Fo %t.o %t/source.hlsl
52+
# RUN: %offloader %t/pipeline.yaml %t.o

test/WaveOps/WaveActiveBallot.Wave128.test

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ void main(uint3 threadID : SV_DispatchThreadID) {
1616

1717
// We expect the resulting uint4 to be 4 0x00000000's
1818
Out[2] = WaveActiveBallot(false);
19-
20-
// We expect all resulting uint's bitmask to be
21-
// 0xAAAAAAAA
22-
Out[3] = WaveActiveBallot(threadID.x % 2 == 1);
2319
}
2420

2521
//--- pipeline.yaml
@@ -33,11 +29,11 @@ Buffers:
3329
- Name: Out
3430
Format: UInt32
3531
Stride: 4
36-
FillSize: 64
32+
FillSize: 48
3733
- Name: ExpectedOut
3834
Format: UInt32
3935
Stride: 4
40-
Data: [3221225471, 3221225471, 3221225471, 3221225471, 65535, 4294901760, 4294967040, 16777215, 0, 0, 0, 0, 2863311530, 2863311530, 2863311530, 2863311530]
36+
Data: [3221225471, 3221225471, 3221225471, 3221225471, 65535, 4294901760, 4294967040, 16777215, 0, 0, 0, 0]
4137
Results:
4238
- Result: Test
4339
Rule: BufferExact

test/WaveOps/WaveActiveBallot.Wave32.test

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ void main(uint3 threadID : SV_DispatchThreadID) {
1414

1515
// We expect the resulting uint4 to be 4 0x00000000's
1616
Out[2] = WaveActiveBallot(false);
17-
18-
// We expect the first resulting uint's bitmask to be
19-
// 0xAAAAAAAA
20-
Out[3] = WaveActiveBallot(threadID.x % 2 == 1);
2117
}
2218

2319
//--- pipeline.yaml
@@ -31,11 +27,11 @@ Buffers:
3127
- Name: Out
3228
Format: UInt32
3329
Stride: 4
34-
FillSize: 64
30+
FillSize: 48
3531
- Name: ExpectedOut
3632
Format: UInt32
3733
Stride: 4
38-
Data: [3221225471, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 2863311530, 0, 0, 0]
34+
Data: [3221225471, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0]
3935
Results:
4036
- Result: Test
4137
Rule: BufferExact

test/WaveOps/WaveActiveBallot.Wave64.test

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ void main(uint3 threadID : SV_DispatchThreadID) {
1414

1515
// We expect the resulting uint4 to be 4 0x00000000's
1616
Out[2] = WaveActiveBallot(false);
17-
18-
// We expect the first and second resulting uint's bitmask to be
19-
// 0xAAAAAAAA
20-
Out[3] = WaveActiveBallot(threadID.x % 2 == 1);
2117
}
2218

2319
//--- pipeline.yaml
@@ -31,11 +27,11 @@ Buffers:
3127
- Name: Out
3228
Format: UInt32
3329
Stride: 4
34-
FillSize: 64
30+
FillSize: 48
3531
- Name: ExpectedOut
3632
Format: UInt32
3733
Stride: 4
38-
Data: [3221225471, 3221225471, 0, 0, 65535, 4294901760, 0, 0, 0, 0, 0, 0, 2863311530, 2863311530, 0, 0]
34+
Data: [3221225471, 3221225471, 0, 0, 65535, 4294901760, 0, 0, 0, 0, 0, 0]
3935
Results:
4036
- Result: Test
4137
Rule: BufferExact

0 commit comments

Comments
 (0)