-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
547a973
commit 20fb4b9
Showing
14 changed files
with
575 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
var: y[i,i] | ||
term: - (i-d) | ||
- ((i-d)+1) | ||
- x[i,d] | ||
- y[i,i] | ||
- x[i,d] | ||
- y[i,i] | ||
- x[i,d] | ||
src: \x. \y | ||
- (i-d)%3 | ||
- (i-d) | ||
- ((i-d)+1) | ||
- x_1[i,d] | ||
- y_1[i,i] | ||
- x_1[i,d] | ||
- y_1[i,i] | ||
- x_1[i,d] | ||
- 4.0 | ||
new tree: \x. \y | ||
- (i-d)%3 | ||
- (i-d) | ||
- ((i-d)+1) | ||
- x_1[i,d] | ||
- (i-d) | ||
- ((i-d)+1) | ||
- x_1[i,d] | ||
- y_1[i,i] | ||
- x_1[i,d] | ||
- y_1[i,i] | ||
- x_1[i,d] | ||
- x_1[i,d] | ||
- (i-d) | ||
- ((i-d)+1) | ||
- x_1[i,d] | ||
- y_1[i,i] | ||
- x_1[i,d] | ||
- y_1[i,i] | ||
- x_1[i,d] | ||
- x_1[i,d] | ||
- 4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
def foo(x : R[3], y : R[3], z : R): | ||
----------------------- {} | ||
z_1 = \phi(True ? x[0] * y[2] : z) | ||
----------------------- {} | ||
z_2 = \phi(True ? 4.2 : z_1) | ||
----------------------- {} | ||
z_3 = \phi(True ? 2.0 : z_2) | ||
----------------------- {} | ||
------------------------ z_1 : | ||
- ⊤ | ||
z_2 : | ||
- 4.2 | ||
z_3 : | ||
- 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
def foo(z : R[3]): | ||
z_1 =\d0 \phi(0 == d0 ? 1.0 : z[d0]) | ||
for i in seq(0, 3): | ||
z_2 =\i \d0 \phi(i == 0 ? z_1[d0] : z_3[i - 1, d0]) # LoopStart | ||
z_3 =\i \d0 \phi(i == d0 ? 3.0 : z_2[i, d0]) | ||
------------------------ z_3 : \i. \d0 | ||
- (i-d0) | ||
- z_1[d0] | ||
- 3.0 | ||
- ((i-1)-d0) | ||
- z_1[d0] | ||
- 3.0 | ||
- 3.0 | ||
z_2 : \i. \d0 | ||
- i | ||
- ⊥ | ||
- z_1[d0] | ||
- ((i-1)-d0) | ||
- z_1[d0] | ||
- 3.0 | ||
- 3.0 | ||
z_4 =\d0 \phi(3 > 0 ? z_3[3 - 1, d0] : z_1[d0]) # LoopExit | ||
z_5 =\d0 \phi(2 == d0 ? 2.0 : z_4[d0]) | ||
------------------------ z_1 : \d0 | ||
- d0 | ||
- z[d0] | ||
- 1.0 | ||
- z[d0] | ||
z_3 : \i. \d0 | ||
- (i-d0) | ||
- z_1[d0] | ||
- 3.0 | ||
- ((i-1)-d0) | ||
- z_1[d0] | ||
- 3.0 | ||
- 3.0 | ||
z_2 : \i. \d0 | ||
- i | ||
- ⊥ | ||
- z_1[d0] | ||
- ((i-1)-d0) | ||
- z_1[d0] | ||
- 3.0 | ||
- 3.0 | ||
z_4 : \d0 | ||
- ((3-1)-d0) | ||
- z[d0] | ||
- 3.0 | ||
- (((3-1)-1)-d0) | ||
- z[d0] | ||
- 3.0 | ||
- 3.0 | ||
z_5 : \d0 | ||
- (2-d0) | ||
- z[d0] | ||
- 2.0 | ||
- (((3-1)-1)-d0) | ||
- z[d0] | ||
- 3.0 | ||
- 3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
def foo(z : R, x : R[3]): | ||
----------------------- {} | ||
z_1 = \phi(True ? 4.2 : z) | ||
----------------------- {} | ||
z_2 = \phi(True ? 2.0 : z_1) | ||
----------------------- {} | ||
------------------------ z_1 : | ||
- 4.2 | ||
z_2 : | ||
- 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,34 @@ | ||
def foo(z : R, x : R[3]): | ||
----------------------- {} | ||
z_1 = \phi(True ? 4.2 : z) | ||
----------------------- {} | ||
x_1 =\d0 \phi(d0 == 0 and True ? 2.0 : x[d0]) | ||
----------------------- {} | ||
x_2 =\d0 \phi(d0 == 1 and True ? 3.0 : x_1[d0]) | ||
----------------------- {} | ||
x_3 =\d0 \phi(d0 == 2 and True ? 5.0 : x_2[d0]) | ||
----------------------- {} | ||
x_4 =\d0 \phi(d0 == 0 and True ? 12.0 : x_3[d0]) | ||
----------------------- {} | ||
x_1 =\d0 \phi(0 == d0 ? 2.0 : x[d0]) | ||
x_2 =\d0 \phi(1 == d0 ? 3.0 : x_1[d0]) | ||
x_3 =\d0 \phi(2 == d0 ? 5.0 : x_2[d0]) | ||
x_4 =\d0 \phi(0 == d0 ? 12.0 : x_3[d0]) | ||
------------------------ z_1 : | ||
- 4.2 | ||
x_1 : \d0 | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
x_2 : \d0 | ||
- (1-d0) | ||
- x[d0] | ||
- 3.0 | ||
- 2.0 | ||
x_3 : \d0 | ||
- (2-d0) | ||
- x[d0] | ||
- 5.0 | ||
- (1-d0) | ||
- x[d0] | ||
- 3.0 | ||
- 2.0 | ||
x_4 : \d0 | ||
- d0 | ||
- x[d0] | ||
- 12.0 | ||
- (2-d0) | ||
- x[d0] | ||
- 5.0 | ||
- 3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,79 @@ | ||
def foo(z : R, n : size, x : R[3]): | ||
----------------------- {} | ||
z_1 = \phi(True ? 4.2 : z) | ||
----------------------- {} | ||
x_1 =\d0 \phi(d0 == 0 and True ? 2.0 : x[d0]) | ||
----------------------- {} | ||
x_1 =\d0 \phi(0 == d0 ? 2.0 : x[d0]) | ||
if n < 3: | ||
--------------------- {} | ||
x_2 =\d0 \phi(d0 == n and True ? 3.0 : x_1[d0]) | ||
--------------------- {} | ||
x_2 =\d0 \phi(n == d0 ? 3.0 : x_1[d0]) | ||
------------------------ z_1 : \n | ||
- 4.2 | ||
x_1 : \n. \d0 | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
x_2 : \n. \d0 | ||
- (n-d0) | ||
- x[d0] | ||
- 3.0 | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
else: | ||
--------------------- {} | ||
----------------------- {} | ||
------------------------ z_1 : \n | ||
- 4.2 | ||
x_1 : \n. \d0 | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
z_2 = \phi(n < 3 ? z_1 : z_1) # IfJoin | ||
----------------------- {} | ||
x_3 =\d0 \phi(n < 3 ? x_2[d0] : x_1[d0]) # IfJoin | ||
----------------------- {} | ||
x_4 =\d0 \phi(d0 == 2 and True ? 5.0 : x_3[d0]) | ||
----------------------- {} | ||
x_5 =\d0 \phi(d0 == 0 and True ? 12.0 : x_4[d0]) | ||
----------------------- {} | ||
x_4 =\d0 \phi(2 == d0 ? 5.0 : x_3[d0]) | ||
x_5 =\d0 \phi(0 == d0 ? 12.0 : x_4[d0]) | ||
------------------------ z_1 : \n | ||
- 4.2 | ||
x_1 : \n. \d0 | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
x_2 : \n. \d0 | ||
- (n-d0) | ||
- x[d0] | ||
- 3.0 | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
z_2 : \n | ||
- 4.2 | ||
x_3 : \n. \d0 | ||
- (n-3) | ||
- 3.0 | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
- d0 | ||
- x[d0] | ||
- 2.0 | ||
- x[d0] | ||
x_4 : \n. \d0 | ||
- (2-d0) | ||
- (d0-3) | ||
- x[d0] | ||
- x[d0] | ||
- x[d0] | ||
- 5.0 | ||
- 3.0 | ||
x_5 : \n. \d0 | ||
- d0 | ||
- x[d0] | ||
- 12.0 | ||
- (2-d0) | ||
- (d0-3) | ||
- x[d0] | ||
- x[d0] | ||
- x[d0] | ||
- 5.0 | ||
- 3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
def foo(z : R, x : R[3]): | ||
----------------------- {} | ||
z_1 = \phi(True ? 4.2 : z) | ||
----------------------- {} | ||
z_2 = \phi(True ? 2.0 : z_1) | ||
----------------------- {}[DataflowIR.Assign(lhs=z_26, iters=[], dims=[], cond=DataflowIR.Const(val=True, type=DataflowIR.Bool(), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c89ce85e0>), body=DataflowIR.Const(val=4.2, type=DataflowIR.Num(), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c874ccc10>), orelse=DataflowIR.Read(name=z_23, idx=[], type=DataflowIR.Num(), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c89ce85e0>), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c874cc8e0>)][DataflowIR.Assign(lhs=z_27, iters=[], dims=[], cond=DataflowIR.Const(val=True, type=DataflowIR.Bool(), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c89ce85e0>), body=DataflowIR.Const(val=2.0, type=DataflowIR.Num(), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c874cc850>), orelse=DataflowIR.Read(name=z_26, idx=[], type=DataflowIR.Num(), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c89ce85e0>), srcinfo=<exo.prelude.SrcInfo object at 0x7f4c874cccd0>)] | ||
------------------------ z_1 : | ||
- 4.2 | ||
z_2 : | ||
- 2.0 | ||
|
||
z = \phi(True ? 4.2 : z_1) | ||
z = \phi(True ? 2.0 : z_1) |
Oops, something went wrong.