Skip to content

Commit

Permalink
Add 3 tests from paper "heterogeneous race free memory models" (#554)
Browse files Browse the repository at this point in the history
* add mp3transitive test

* add Figure5 test of hrf paper
  • Loading branch information
tonghaining authored Nov 8, 2023
1 parent c93492b commit 7f1e609
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions dartagnan/src/test/resources/PTXv7_5-expected.csv
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ litmus/PTX/Manual/CoWW-RR.litmus,1
litmus/PTX/Manual/CoWW_.litmus,1
litmus/PTX/Manual/LB+NoThinAir-location_.litmus,1
litmus/PTX/Manual/LB+NoThinAir-register.litmus,1
litmus/PTX/Manual/MP-3-transitive.litmus,1
litmus/PTX/Manual/MP-cta.litmus,1
litmus/PTX/Manual/MP-gpu.litmus,1
litmus/PTX/Manual/MP-relaxed.litmus,1
Expand Down
2 changes: 2 additions & 0 deletions dartagnan/src/test/resources/VULKAN-DR-expected.csv
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ litmus/VULKAN/Manual/ticketlock-diff-wg.litmus,0
litmus/VULKAN/Manual/ticketlock-acq2rlx-1.litmus,1
litmus/VULKAN/Manual/ticketlock-acq2rlx-2.litmus,0
litmus/VULKAN/Manual/ticketlock-rel2rlx.litmus,0
litmus/VULKAN/Manual/SB-2-wg.litmus,1
litmus/VULKAN/Manual/SB-2-dv.litmus,0
litmus/VULKAN/Manual/MP-mesa.litmus,1
litmus/VULKAN/Manual/MP-mesa-load-acq.litmus,1
litmus/VULKAN/Manual/MP-mesa-fence-loop.litmus,1
Expand Down
11 changes: 11 additions & 0 deletions litmus/PTX/Manual/MP-3-transitive.litmus
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PTX MP-3-transitive
"Adapted from Figure 6 of paper: Heterogeneous-race-free Memory Models"
{
x=0; y=0; z=0;
P1:r0=0; P2:r1=0; P2:r2=0;
}
P0@cta 0,gpu 0 | P1@cta 0,gpu 0 | P2@cta 1,gpu 0 ;
st.weak x, 1 | ld.acquire.cta r0, y | ld.acquire.gpu r1, z ;
st.release.cta y, 1 | st.release.gpu z, 1 | ld.weak r2, x ;
~exists
(P1:r0 == 1 /\ P2:r1 == 1 /\ P2:r2 != 1)
11 changes: 11 additions & 0 deletions litmus/VULKAN/Manual/SB-2-dv.litmus
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Vulkan SB-2-dv
"Adapted from Figure 5 of paper: Heterogeneous-race-free Memory Models"
{
x=0; y=0;
P0:r0=0; P1:r1=0;
}
P0@sg 0, wg 0, qf 0 | P1@sg 0, wg 1, qf 0 ;
st.atom.rel.wg.sc0.semsc0 x, 1 | st.atom.rel.dv.sc0.semsc0 y, 1 ;
ld.atom.acq.dv.sc0.semsc0 r0, y | ld.atom.acq.wg.sc0.semsc0 r1, x ;
exists
(P0:r0 == 0 /\ P1:r1 == 0)
11 changes: 11 additions & 0 deletions litmus/VULKAN/Manual/SB-2-wg.litmus
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Vulkan SB-2-wg
"Adapted from Figure 5 of paper: Heterogeneous-race-free Memory Models"
{
x=0; y=0;
P0:r0=0; P1:r1=0;
}
P0@sg 0, wg 0, qf 0 | P1@sg 0, wg 0, qf 0 ;
st.atom.rel.wg.sc0.semsc0 x, 1 | st.atom.rel.dv.sc0.semsc0 y, 1 ;
ld.atom.acq.dv.sc0.semsc0 r0, y | ld.atom.acq.wg.sc0.semsc0 r1, x ;
exists
(P0:r0 == 0 /\ P1:r1 == 0)

0 comments on commit 7f1e609

Please sign in to comment.