Skip to content

Commit

Permalink
Better xf-barrier litmus tests
Browse files Browse the repository at this point in the history
  • Loading branch information
natgavrilenko committed Aug 8, 2024
1 parent 7044410 commit 7ab9457
Show file tree
Hide file tree
Showing 14 changed files with 265 additions and 119 deletions.
15 changes: 9 additions & 6 deletions dartagnan/src/test/resources/VULKAN-expected.csv
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ litmus/VULKAN/Manual/MP-mesa-optimized.litmus,1
litmus/VULKAN/Manual/MP-avvis.litmus,0
litmus/VULKAN/Manual/MP-no-avvis.litmus,1
litmus/VULKAN/Manual/CoWW-RR.litmus,1
litmus/VULKAN/Manual/XF-Barrier.litmus,0
litmus/VULKAN/Manual/XF-Barrier-relacq.litmus,0
litmus/VULKAN/Manual/XF-Barrier-relacq2.litmus,1
litmus/VULKAN/Manual/XF-Barrier-rlx.litmus,1
litmus/VULKAN/Manual/XF-Barrier-weak.litmus,1
litmus/VULKAN/Manual/PC-bar-acq-rel-atom.litmus,1
litmus/VULKAN/Manual/PC-bar-acq-rel-nonpriv.litmus,1
litmus/VULKAN/Manual/PC-bar-acq-rel-priv.litmus,0
Expand All @@ -105,4 +100,12 @@ litmus/VULKAN/Manual/counter-plain-store-plain-load.litmus,1
litmus/VULKAN/Manual/bar-1.litmus,1
litmus/VULKAN/Manual/bar-2.litmus,1
litmus/VULKAN/Manual/bar-3.litmus,1
litmus/VULKAN/Manual/bar-4.litmus,1
litmus/VULKAN/Manual/bar-4.litmus,1
litmus/VULKAN/Manual/xf-barrier.litmus,1
litmus/VULKAN/Manual/xf-barrier-cbar-rlx-1.litmus,0
litmus/VULKAN/Manual/xf-barrier-cbar-rlx-2.litmus,0
litmus/VULKAN/Manual/xf-barrier-cbar-rlx-3.litmus,0
litmus/VULKAN/Manual/xf-barrier-load-rlx-1.litmus,0
litmus/VULKAN/Manual/xf-barrier-load-rlx-2.litmus,0
litmus/VULKAN/Manual/xf-barrier-store-rlx-1.litmus,0
litmus/VULKAN/Manual/xf-barrier-store-rlx-2.litmus,0
22 changes: 0 additions & 22 deletions litmus/VULKAN/Manual/XF-Barrier-relacq.litmus

This file was deleted.

23 changes: 0 additions & 23 deletions litmus/VULKAN/Manual/XF-Barrier-relacq2.litmus

This file was deleted.

22 changes: 0 additions & 22 deletions litmus/VULKAN/Manual/XF-Barrier-rlx.litmus

This file was deleted.

22 changes: 0 additions & 22 deletions litmus/VULKAN/Manual/XF-Barrier-weak.litmus

This file was deleted.

24 changes: 0 additions & 24 deletions litmus/VULKAN/Manual/XF-Barrier.litmus

This file was deleted.

32 changes: 32 additions & 0 deletions litmus/VULKAN/Manual/xf-barrier-cbar-rlx-1.litmus
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Vulkan xf-barrier-cbar-rlx-1
"Adapted from Figure 2 in
Portable Inter-workgroup Barrier Synchronisation for GPUs
https://dl.acm.org/doi/pdf/10.1145/2983990.2984032"
{
x0=0; x1=0; x2=0; x3=0; x4=0; x5=0;
f1=0; f2=0;
}
P0@sg 0, wg 0, qf 0 | P1@sg 0, wg 0, qf 0 | P2@sg 0, wg 1, qf 0 | P3@sg 0, wg 1, qf 0 | P4@sg 0, wg 2, qf 0 | P5@sg 0, wg 2, qf 0 ;
st.av.dv.sc0 x0, 1 | st.av.dv.sc0 x1, 1 | st.av.dv.sc0 x2, 1 | st.av.dv.sc0 x3, 1 | st.av.dv.sc0 x4, 1 | st.av.dv.sc0 x5, 1 ;
LC00: | LC10: | cbar.acq_rel.wg.semsc0 10 | cbar.acq_rel.wg.semsc0 10 | cbar.acq_rel.wg.semsc0 20 | cbar.acq_rel.wg.semsc0 20 ;
ld.atom.acq.dv.sc0.semsc0 r9, f1 | ld.atom.acq.dv.sc0.semsc0 r9, f2 | st.atom.rel.dv.sc0.semsc0 f1, 1 | cbar.acq_rel.wg.semsc0 11 | st.atom.rel.dv.sc0.semsc0 f2, 1 | cbar.acq_rel.wg.semsc0 21 ;
bne r9, 0, LC01 | bne r9, 0, LC11 | LC20: | ld.vis.dv.sc0 r0, x0 | LC40: | ld.vis.dv.sc0 r0, x0 ;
goto LC00 | goto LC10 | ld.atom.acq.dv.sc0.semsc0 r9, f1 | ld.vis.dv.sc0 r1, x1 | ld.atom.acq.dv.sc0.semsc0 r9, f2 | ld.vis.dv.sc0 r1, x1 ;
LC01: | LC11: | bne r9, 1, LC21 | ld.vis.dv.sc0 r2, x2 | bne r9, 1, LC41 | ld.vis.dv.sc0 r2, x2 ;
cbar.wg.semsc0 00 | cbar.wg.semsc0 00 | goto LC20 | ld.vis.dv.sc0 r3, x3 | goto LC40 | ld.vis.dv.sc0 r3, x3 ;
st.atom.rel.dv.sc0.semsc0 f1, 0 | st.atom.rel.dv.sc0.semsc0 f2, 0 | LC21: | ld.vis.dv.sc0 r4, x4 | LC41: | ld.vis.dv.sc0 r4, x4 ;
ld.vis.dv.sc0 r0, x0 | ld.vis.dv.sc0 r0, x0 | cbar.acq_rel.wg.semsc0 11 | ld.vis.dv.sc0 r5, x5 | cbar.acq_rel.wg.semsc0 21 | ld.vis.dv.sc0 r5, x5 ;
ld.vis.dv.sc0 r1, x1 | ld.vis.dv.sc0 r1, x1 | ld.vis.dv.sc0 r0, x0 | | ld.vis.dv.sc0 r0, x0 | ;
ld.vis.dv.sc0 r2, x2 | ld.vis.dv.sc0 r2, x2 | ld.vis.dv.sc0 r1, x1 | | ld.vis.dv.sc0 r1, x1 | ;
ld.vis.dv.sc0 r3, x3 | ld.vis.dv.sc0 r3, x3 | ld.vis.dv.sc0 r2, x2 | | ld.vis.dv.sc0 r2, x2 | ;
ld.vis.dv.sc0 r4, x4 | ld.vis.dv.sc0 r4, x4 | ld.vis.dv.sc0 r3, x3 | | ld.vis.dv.sc0 r3, x3 | ;
ld.vis.dv.sc0 r5, x5 | ld.vis.dv.sc0 r5, x5 | ld.vis.dv.sc0 r4, x4 | | ld.vis.dv.sc0 r4, x4 | ;
| | ld.vis.dv.sc0 r5, x5 | | ld.vis.dv.sc0 r5, x5 | ;

forall(
P0:r0 == 1 /\ P0:r1 == 1 /\ P0:r2 == 1 /\ P0:r3 == 1 /\ P0:r4 == 1 /\ P0:r5 == 1 /\
P1:r0 == 1 /\ P1:r1 == 1 /\ P1:r2 == 1 /\ P1:r3 == 1 /\ P1:r4 == 1 /\ P1:r5 == 1 /\
P2:r0 == 1 /\ P2:r1 == 1 /\ P2:r2 == 1 /\ P2:r3 == 1 /\ P2:r4 == 1 /\ P2:r5 == 1 /\
P3:r0 == 1 /\ P3:r1 == 1 /\ P3:r2 == 1 /\ P3:r3 == 1 /\ P3:r4 == 1 /\ P3:r5 == 1 /\
P4:r0 == 1 /\ P4:r1 == 1 /\ P4:r2 == 1 /\ P4:r3 == 1 /\ P4:r4 == 1 /\ P4:r5 == 1 /\
P5:r0 == 1 /\ P5:r1 == 1 /\ P5:r2 == 1 /\ P5:r3 == 1 /\ P5:r4 == 1 /\ P5:r5 == 1)
32 changes: 32 additions & 0 deletions litmus/VULKAN/Manual/xf-barrier-cbar-rlx-2.litmus
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Vulkan xf-barrier-cbar-rlx-2
"Adapted from Figure 2 in
Portable Inter-workgroup Barrier Synchronisation for GPUs
https://dl.acm.org/doi/pdf/10.1145/2983990.2984032"
{
x0=0; x1=0; x2=0; x3=0; x4=0; x5=0;
f1=0; f2=0;
}
P0@sg 0, wg 0, qf 0 | P1@sg 0, wg 0, qf 0 | P2@sg 0, wg 1, qf 0 | P3@sg 0, wg 1, qf 0 | P4@sg 0, wg 2, qf 0 | P5@sg 0, wg 2, qf 0 ;
st.av.dv.sc0 x0, 1 | st.av.dv.sc0 x1, 1 | st.av.dv.sc0 x2, 1 | st.av.dv.sc0 x3, 1 | st.av.dv.sc0 x4, 1 | st.av.dv.sc0 x5, 1 ;
LC00: | LC10: | cbar.wg.semsc0 10 | cbar.wg.semsc0 10 | cbar.wg.semsc0 20 | cbar.wg.semsc0 20 ;
ld.atom.acq.dv.sc0.semsc0 r9, f1 | ld.atom.acq.dv.sc0.semsc0 r9, f2 | st.atom.rel.dv.sc0.semsc0 f1, 1 | cbar.acq_rel.wg.semsc0 11 | st.atom.rel.dv.sc0.semsc0 f2, 1 | cbar.acq_rel.wg.semsc0 21 ;
bne r9, 0, LC01 | bne r9, 0, LC11 | LC20: | ld.vis.dv.sc0 r0, x0 | LC40: | ld.vis.dv.sc0 r0, x0 ;
goto LC00 | goto LC10 | ld.atom.acq.dv.sc0.semsc0 r9, f1 | ld.vis.dv.sc0 r1, x1 | ld.atom.acq.dv.sc0.semsc0 r9, f2 | ld.vis.dv.sc0 r1, x1 ;
LC01: | LC11: | bne r9, 1, LC21 | ld.vis.dv.sc0 r2, x2 | bne r9, 1, LC41 | ld.vis.dv.sc0 r2, x2 ;
cbar.acq_rel.wg.semsc0 00 | cbar.acq_rel.wg.semsc0 00 | goto LC20 | ld.vis.dv.sc0 r3, x3 | goto LC40 | ld.vis.dv.sc0 r3, x3 ;
st.atom.rel.dv.sc0.semsc0 f1, 0 | st.atom.rel.dv.sc0.semsc0 f2, 0 | LC21: | ld.vis.dv.sc0 r4, x4 | LC41: | ld.vis.dv.sc0 r4, x4 ;
ld.vis.dv.sc0 r0, x0 | ld.vis.dv.sc0 r0, x0 | cbar.acq_rel.wg.semsc0 11 | ld.vis.dv.sc0 r5, x5 | cbar.acq_rel.wg.semsc0 21 | ld.vis.dv.sc0 r5, x5 ;
ld.vis.dv.sc0 r1, x1 | ld.vis.dv.sc0 r1, x1 | ld.vis.dv.sc0 r0, x0 | | ld.vis.dv.sc0 r0, x0 | ;
ld.vis.dv.sc0 r2, x2 | ld.vis.dv.sc0 r2, x2 | ld.vis.dv.sc0 r1, x1 | | ld.vis.dv.sc0 r1, x1 | ;
ld.vis.dv.sc0 r3, x3 | ld.vis.dv.sc0 r3, x3 | ld.vis.dv.sc0 r2, x2 | | ld.vis.dv.sc0 r2, x2 | ;
ld.vis.dv.sc0 r4, x4 | ld.vis.dv.sc0 r4, x4 | ld.vis.dv.sc0 r3, x3 | | ld.vis.dv.sc0 r3, x3 | ;
ld.vis.dv.sc0 r5, x5 | ld.vis.dv.sc0 r5, x5 | ld.vis.dv.sc0 r4, x4 | | ld.vis.dv.sc0 r4, x4 | ;
| | ld.vis.dv.sc0 r5, x5 | | ld.vis.dv.sc0 r5, x5 | ;

forall(
P0:r0 == 1 /\ P0:r1 == 1 /\ P0:r2 == 1 /\ P0:r3 == 1 /\ P0:r4 == 1 /\ P0:r5 == 1 /\
P1:r0 == 1 /\ P1:r1 == 1 /\ P1:r2 == 1 /\ P1:r3 == 1 /\ P1:r4 == 1 /\ P1:r5 == 1 /\
P2:r0 == 1 /\ P2:r1 == 1 /\ P2:r2 == 1 /\ P2:r3 == 1 /\ P2:r4 == 1 /\ P2:r5 == 1 /\
P3:r0 == 1 /\ P3:r1 == 1 /\ P3:r2 == 1 /\ P3:r3 == 1 /\ P3:r4 == 1 /\ P3:r5 == 1 /\
P4:r0 == 1 /\ P4:r1 == 1 /\ P4:r2 == 1 /\ P4:r3 == 1 /\ P4:r4 == 1 /\ P4:r5 == 1 /\
P5:r0 == 1 /\ P5:r1 == 1 /\ P5:r2 == 1 /\ P5:r3 == 1 /\ P5:r4 == 1 /\ P5:r5 == 1)
32 changes: 32 additions & 0 deletions litmus/VULKAN/Manual/xf-barrier-cbar-rlx-3.litmus
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Vulkan xf-barrier-cbar-rlx-3
"Adapted from Figure 2 in
Portable Inter-workgroup Barrier Synchronisation for GPUs
https://dl.acm.org/doi/pdf/10.1145/2983990.2984032"
{
x0=0; x1=0; x2=0; x3=0; x4=0; x5=0;
f1=0; f2=0;
}
P0@sg 0, wg 0, qf 0 | P1@sg 0, wg 0, qf 0 | P2@sg 0, wg 1, qf 0 | P3@sg 0, wg 1, qf 0 | P4@sg 0, wg 2, qf 0 | P5@sg 0, wg 2, qf 0 ;
st.av.dv.sc0 x0, 1 | st.av.dv.sc0 x1, 1 | st.av.dv.sc0 x2, 1 | st.av.dv.sc0 x3, 1 | st.av.dv.sc0 x4, 1 | st.av.dv.sc0 x5, 1 ;
LC00: | LC10: | cbar.acq_rel.wg.semsc0 10 | cbar.acq_rel.wg.semsc0 10 | cbar.acq_rel.wg.semsc0 20 | cbar.acq_rel.wg.semsc0 20 ;
ld.atom.acq.dv.sc0.semsc0 r9, f1 | ld.atom.acq.dv.sc0.semsc0 r9, f2 | st.atom.rel.dv.sc0.semsc0 f1, 1 | cbar.wg.semsc0 11 | st.atom.rel.dv.sc0.semsc0 f2, 1 | cbar.wg.semsc0 21 ;
bne r9, 0, LC01 | bne r9, 0, LC11 | LC20: | ld.vis.dv.sc0 r0, x0 | LC40: | ld.vis.dv.sc0 r0, x0 ;
goto LC00 | goto LC10 | ld.atom.acq.dv.sc0.semsc0 r9, f1 | ld.vis.dv.sc0 r1, x1 | ld.atom.acq.dv.sc0.semsc0 r9, f2 | ld.vis.dv.sc0 r1, x1 ;
LC01: | LC11: | bne r9, 1, LC21 | ld.vis.dv.sc0 r2, x2 | bne r9, 1, LC41 | ld.vis.dv.sc0 r2, x2 ;
cbar.acq_rel.wg.semsc0 00 | cbar.acq_rel.wg.semsc0 00 | goto LC20 | ld.vis.dv.sc0 r3, x3 | goto LC40 | ld.vis.dv.sc0 r3, x3 ;
st.atom.rel.dv.sc0.semsc0 f1, 0 | st.atom.rel.dv.sc0.semsc0 f2, 0 | LC21: | ld.vis.dv.sc0 r4, x4 | LC41: | ld.vis.dv.sc0 r4, x4 ;
ld.vis.dv.sc0 r0, x0 | ld.vis.dv.sc0 r0, x0 | cbar.wg.semsc0 11 | ld.vis.dv.sc0 r5, x5 | cbar.wg.semsc0 21 | ld.vis.dv.sc0 r5, x5 ;
ld.vis.dv.sc0 r1, x1 | ld.vis.dv.sc0 r1, x1 | ld.vis.dv.sc0 r0, x0 | | ld.vis.dv.sc0 r0, x0 | ;
ld.vis.dv.sc0 r2, x2 | ld.vis.dv.sc0 r2, x2 | ld.vis.dv.sc0 r1, x1 | | ld.vis.dv.sc0 r1, x1 | ;
ld.vis.dv.sc0 r3, x3 | ld.vis.dv.sc0 r3, x3 | ld.vis.dv.sc0 r2, x2 | | ld.vis.dv.sc0 r2, x2 | ;
ld.vis.dv.sc0 r4, x4 | ld.vis.dv.sc0 r4, x4 | ld.vis.dv.sc0 r3, x3 | | ld.vis.dv.sc0 r3, x3 | ;
ld.vis.dv.sc0 r5, x5 | ld.vis.dv.sc0 r5, x5 | ld.vis.dv.sc0 r4, x4 | | ld.vis.dv.sc0 r4, x4 | ;
| | ld.vis.dv.sc0 r5, x5 | | ld.vis.dv.sc0 r5, x5 | ;

forall(
P0:r0 == 1 /\ P0:r1 == 1 /\ P0:r2 == 1 /\ P0:r3 == 1 /\ P0:r4 == 1 /\ P0:r5 == 1 /\
P1:r0 == 1 /\ P1:r1 == 1 /\ P1:r2 == 1 /\ P1:r3 == 1 /\ P1:r4 == 1 /\ P1:r5 == 1 /\
P2:r0 == 1 /\ P2:r1 == 1 /\ P2:r2 == 1 /\ P2:r3 == 1 /\ P2:r4 == 1 /\ P2:r5 == 1 /\
P3:r0 == 1 /\ P3:r1 == 1 /\ P3:r2 == 1 /\ P3:r3 == 1 /\ P3:r4 == 1 /\ P3:r5 == 1 /\
P4:r0 == 1 /\ P4:r1 == 1 /\ P4:r2 == 1 /\ P4:r3 == 1 /\ P4:r4 == 1 /\ P4:r5 == 1 /\
P5:r0 == 1 /\ P5:r1 == 1 /\ P5:r2 == 1 /\ P5:r3 == 1 /\ P5:r4 == 1 /\ P5:r5 == 1)
Loading

0 comments on commit 7ab9457

Please sign in to comment.