diff --git a/compiler/sam-outputs/onyx-dot/masked_broadcast.gv b/compiler/sam-outputs/onyx-dot/masked_broadcast.gv new file mode 100644 index 00000000..86b0bdba --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/masked_broadcast.gv @@ -0,0 +1,27 @@ +digraph SAM { + comment="X=ss01,B=ss01,c=s0" + 0 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 1 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 2 [comment="type=repeat,index=i,tensor=c,root=true" label="Repeat i: B" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="c" root="true"] + 3 [comment="type=fiberlookup,index=i,tensor=c,mode=0,format=compressed,src=true,root=false" label="FiberLookup i: c\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="c" mode="0" format="compressed" src="true" root="false"] + 4 [comment="type=fiberlookup,index=j,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: B\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="B" mode="1" format="compressed" src="true" root="false"] + 5 [comment="type=intersect,index=j" label="intersect j" color=purple shape=box style=filled type="intersect" index="j"] + 6 [comment="type=arrayvals,tensor=c" label="Array Vals: c" color=green2 shape=box style=filled type="arrayvals" tensor="c"] + 7 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 8 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*B1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*B1_dim" sink="true"] + 9 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*B1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="1*B0_dim*B1_dim" sink="true"] + 10 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 0 -> 10 [label="crd" style=dashed type="crd"] + 10 -> 1 [label="crd" style=dashed type="crd"] + 1 -> 2 [label="repsig" style=dotted type="repsig"] + 2 -> 3 [label="ref" style=bold type="ref"] + 0 -> 4 [label="ref" style=bold type="ref"] + 3 -> 5 [label="ref_in-c" style=bold type="ref" comment="in-c"] + 3 -> 5 [label="crd_in-c" style=dashed type="crd" comment="in-c"] + 4 -> 5 [label="ref_in-B", style=bold type="ref" comment="in-B"] + 4 -> 5 [label="crd_in-B", style=dashed type="crd" comment="in-B"] + 5 -> 6 [label="ref_out-c", style=bold type="ref" comment="out-c"] + 10 -> 7 [label="crd", style=dashed type="crd"] + 5 -> 8 [label="crd", style=dashed type="crd"] + 6 -> 9 [label="val", type="val"] +} diff --git a/compiler/sam-outputs/onyx-dot/mat_elemadd_relu.gv b/compiler/sam-outputs/onyx-dot/mat_elemadd_relu.gv new file mode 100644 index 00000000..6e5a47ae --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/mat_elemadd_relu.gv @@ -0,0 +1,42 @@ +digraph SAM { + comment="X=ss01,B=ss01,C=ss01" + 10 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 9 [comment="type=union,index=i" label="union i" color=purple shape=box style=filled type="union" index="i"] + 7 [comment="type=fiberlookup,index=j,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: B1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="B" mode="1" format="compressed" src="true" root="false"] + 6 [comment="type=union,index=j" label="union j" color=purple shape=box style=filled type="union" index="j"] + 4 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 3 [comment="type=add,sub=0" label="Add" color=brown shape=box style=filled type="add" sub="0"] + 5 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 8 [comment="type=fiberlookup,index=j,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="1" format="compressed" src="true" root="false"] + 11 [comment="type=fiberlookup,index=i,tensor=C,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="C" mode="0" format="compressed" src="true" root="true"] + 12 [comment="type=max" label="Max 0" color=brown shape=box style=filled type="max"] + 13 [comment="type=crddrop,outer=j,inner=val,mode=0" label="CrdDrop Compression j, val" color=orange style=filled type="crddrop" outer="j" inner="val" mode="0"] + 0 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*B1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="2*B0_dim*B1_dim" sink="true"] + 14 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 2 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 1 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*B1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*B1_dim" sink="true"] + 10 -> 9 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 9 -> 7 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 7 -> 6 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 6 -> 4 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 4 -> 3 [label="val" type="val"] + 6 -> 5 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 5 -> 3 [label="val" type="val"] + 7 -> 6 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 9 -> 8 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 8 -> 6 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 8 -> 6 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 10 -> 9 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 11 -> 9 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 11 -> 9 [label="ref_in-C" style=bold type="ref" comment="in-C"] + + 3 -> 12 [label="val" type="val" comment="val"] + 12 -> 13 [label="val" type="val" comment="inner-val"] + 6 -> 13 [label="crd_outer-j" style=dashed type="crd" comment="outer-j"] + 13 -> 0 [label="val" type="val", comment="val"] + 13 -> 14 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 9 -> 14 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 14 -> 2 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 14 -> 1 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + +} diff --git a/compiler/sam-outputs/onyx-dot/mat_mask_tri.gv b/compiler/sam-outputs/onyx-dot/mat_mask_tri.gv new file mode 100644 index 00000000..2af91546 --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/mat_mask_tri.gv @@ -0,0 +1,62 @@ +digraph SAM { + comment="x=none,B=ss01,C=ss01,D=ss10" + 22 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 21 [comment="type=intersect,index=i" label="intersect i" color=purple shape=box style=filled type="intersect" index="i"] + 20 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 19 [comment="type=repeat,index=i,tensor=D,root=true" label="Repeat i: D" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="D" root="true"] + 18 [comment="type=fiberlookup,index=j,tensor=D,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: D1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="D" mode="1" format="compressed" src="true" root="false"] + 16 [comment="type=intersect,index=j" label="intersect j" color=purple shape=box style=filled type="intersect" index="j"] + 15 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 14 [comment="type=repeat,index=j,tensor=C,root=false" label="Repeat j: C" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="C" root="false"] + 12 [comment="type=fiberlookup,index=k,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup k: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="C" mode="1" format="compressed" src="true" root="false"] + 11 [comment="type=intersect,index=k" label="intersect k" color=purple shape=box style=filled type="intersect" index="k"] + 10 [comment="type=repsiggen,index=k" label="RepeatSignalGenerator k" color=cyan3 shape=box style=filled type="repsiggen" index="k"] + 9 [comment="type=repeat,index=k,tensor=B,root=false" label="Repeat k: B" color=cyan2 shape=box style=filled type="repeat" index="k" tensor="B" root="false"] + 6 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 5 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 4 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 3 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 2 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 1 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 0 [comment="type=fiberwrite,mode=vals,tensor=x,size=1,sink=true" label="FiberWrite Vals: x" color=green3 shape=box style=filled type="fiberwrite" tensor="x" mode="vals" size="1" sink="true"] + 7 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 8 [comment="type=arrayvals,tensor=D" label="Array Vals: D" color=green2 shape=box style=filled type="arrayvals" tensor="D"] + 13 [comment="type=fiberlookup,index=k,tensor=D,mode=0,format=compressed,src=true,root=false" label="FiberLookup k: D0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="D" mode="0" format="compressed" src="true" root="false"] + 17 [comment="type=fiberlookup,index=j,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: B1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="B" mode="1" format="compressed" src="true" root="false"] + 23 [comment="type=fiberlookup,index=i,tensor=C,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="C" mode="0" format="compressed" src="true" root="true"] + 22 -> 21 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 21 -> 20 [label="crd" style=dashed type="crd"] + 20 -> 19 [label="repsig" style=dotted type="repsig"] + 19 -> 18 [label="ref" style=bold type="ref"] + 18 -> 16 [label="crd_in-D" style=dashed type="crd" comment="in-D"] + 16 -> 15 [label="crd" style=dashed type="crd"] + 15 -> 14 [label="repsig" style=dotted type="repsig"] + 14 -> 12 [label="ref" style=bold type="ref"] + 12 -> 11 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 11 -> 10 [label="crd" style=dashed type="crd"] + 10 -> 9 [label="repsig" style=dotted type="repsig"] + 9 -> 6 [label="ref" style=bold type="ref"] + 6 -> 5 [label="val" type="val"] + 5 -> 4 [label="val" type="val"] + 4 -> 3 [label="val" type="val"] + 3 -> 2 [label="val" type="val"] + 2 -> 1 [label="val" type="val"] + 1 -> 0 [label="val" type="val"] + 11 -> 7 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 7 -> 5 [label="val" type="val"] + 11 -> 8 [label="ref_out-D" style=bold type="ref" comment="out-D"] + 8 -> 4 [label="val" type="val"] + 12 -> 11 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 16 -> 9 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 16 -> 13 [label="ref_out-D" style=bold type="ref" comment="out-D"] + 13 -> 11 [label="crd_in-D" style=dashed type="crd" comment="in-D"] + 13 -> 11 [label="ref_in-D" style=bold type="ref" comment="in-D"] + 18 -> 16 [label="ref_in-D" style=bold type="ref" comment="in-D"] + 21 -> 17 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 17 -> 16 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 17 -> 16 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 21 -> 14 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 22 -> 21 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 23 -> 21 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 23 -> 21 [label="ref_in-C" style=bold type="ref" comment="in-C"] +} diff --git a/compiler/sam-outputs/onyx-dot/mat_residual.gv b/compiler/sam-outputs/onyx-dot/mat_residual.gv new file mode 100644 index 00000000..a509d2c0 --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/mat_residual.gv @@ -0,0 +1,47 @@ +digraph SAM { + comment="x=s0,b=s0,C=ss01,d=s0" + 17 [comment="type=fiberlookup,index=i,tensor=b,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: b0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="b" mode="0" format="compressed" src="true" root="true"] + 16 [comment="type=union,index=i" label="union i" color=purple shape=box style=filled type="union" index="i"] + 15 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 9 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 1 [comment="type=fiberwrite,index=i,tensor=x,mode=0,format=compressed,segsize=2,crdsize=b0_dim,sink=true" label="FiberWrite i: x0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="x" mode="0" format="compressed" segsize="2" crdsize="b0_dim" sink="true"] + 14 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 13 [comment="type=repeat,index=i,tensor=d,root=true" label="Repeat i: d" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="d" root="true"] + 12 [comment="type=fiberlookup,index=j,tensor=d,mode=0,format=compressed,src=true,root=false" label="FiberLookup j: d0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="d" mode="0" format="compressed" src="true" root="false"] + 10 [comment="type=intersect,index=j" label="intersect j" color=purple shape=box style=filled type="intersect" index="j"] + 7 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 6 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 5 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 3 [comment="type=add,sub=1" label="Add +subtract" color=brown shape=box style=filled type="add" sub="1"] + 0 [comment="type=fiberwrite,mode=vals,tensor=x,size=1*b0_dim,sink=true" label="FiberWrite Vals: x" color=green3 shape=box style=filled type="fiberwrite" tensor="x" mode="vals" size="1*b0_dim" sink="true"] + 8 [comment="type=arrayvals,tensor=d" label="Array Vals: d" color=green2 shape=box style=filled type="arrayvals" tensor="d"] + 4 [comment="type=arrayvals,tensor=b" label="Array Vals: b" color=green2 shape=box style=filled type="arrayvals" tensor="b"] + 11 [comment="type=fiberlookup,index=j,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="1" format="compressed" src="true" root="false"] + 18 [comment="type=fiberlookup,index=i,tensor=C,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="C" mode="0" format="compressed" src="true" root="true"] + 17 -> 16 [label="crd_in-b" style=dashed type="crd" comment="in-b"] + 16 -> 15 [label="crd_i" style=dashed type="crd" comment="i"] + 15 -> 9 [label="crd_i" style=dashed type="crd" comment="i"] + 9 -> 1 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 15 -> 14 [label="crd" style=dashed type="crd" comment=""] + 14 -> 13 [label="repsig" style=dotted type="repsig"] + 13 -> 12 [label="ref" style=bold type="ref"] + 12 -> 10 [label="crd_in-d" style=dashed type="crd" comment="in-d"] + 10 -> 9 [label="crd_in-j" style=dashed type="crd" comment="in-j"] + 10 -> 7 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 7 -> 6 [label="val" type="val"] + 6 -> 5 [label="val" type="val"] + 5 -> 3 [label="val" type="val"] + 3 -> 0 [label="val" type="val"] + 10 -> 8 [label="ref_out-d" style=bold type="ref" comment="out-d"] + 8 -> 6 [label="val" type="val"] + 12 -> 10 [label="ref_in-d" style=bold type="ref" comment="in-d"] + 16 -> 4 [label="ref_out-b" style=bold type="ref" comment="out-b"] + 4 -> 3 [label="val" type="val"] + 16 -> 11 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 11 -> 10 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 11 -> 10 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 17 -> 16 [label="ref_in-b" style=bold type="ref" comment="in-b"] + 18 -> 16 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 18 -> 16 [label="ref_in-C" style=bold type="ref" comment="in-C"] +} diff --git a/compiler/sam-outputs/onyx-dot/mat_vecmul_ij.gv b/compiler/sam-outputs/onyx-dot/mat_vecmul_ij.gv index 0f936b2c..b532e204 100644 --- a/compiler/sam-outputs/onyx-dot/mat_vecmul_ij.gv +++ b/compiler/sam-outputs/onyx-dot/mat_vecmul_ij.gv @@ -3,6 +3,7 @@ digraph SAM { 14 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] 13 [comment="type=broadcast" shape=point style=invis type="broadcast"] 7 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 15 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] 1 [comment="type=fiberwrite,index=i,tensor=x,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: x0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="x" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] 12 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] 11 [comment="type=repeat,index=i,tensor=c,root=true" label="Repeat i: c" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="c" root="true"] @@ -24,7 +25,7 @@ digraph SAM { 8 -> 7 [label="crd_in-j" style=dashed type="crd" comment="in-j"] 8 -> 5 [label="ref_out-B" style=bold type="ref" comment="out-B"] 5 -> 4 [label="val" type="val"] - 4 -> 3 [label="val" type="val"] + # 4 -> 3 [label="val" type="val"] 3 -> 0 [label="val" type="val"] 8 -> 6 [label="ref_out-c" style=bold type="ref" comment="out-c"] 6 -> 4 [label="val" type="val"] @@ -32,4 +33,8 @@ digraph SAM { 14 -> 9 [label="ref" style=bold type="ref" comment=""] 9 -> 8 [label="crd_in-B" style=dashed type="crd" comment="in-B"] 9 -> 8 [label="ref_in-B" style=bold type="ref" comment="in-B"] + + 4 -> 15 [label="val_inner-j" type="val" comment="inner-j"] + 15 -> 3 [label="val_inner-j" type="val" comment="inner-j"] + 13 -> 15 [label="crd_i" style=dashed type="crd" comment="i"] } diff --git a/compiler/sam-outputs/onyx-dot/mat_vecmul_iter.gv b/compiler/sam-outputs/onyx-dot/mat_vecmul_iter.gv new file mode 100644 index 00000000..532312f6 --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/mat_vecmul_iter.gv @@ -0,0 +1,140 @@ +digraph SAM { + comment="x=s0,B=ss01,C=ss01,D=ss01,E=ss01,f=s0" + 54 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 53 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 1 [comment="type=fiberwrite,index=i,tensor=x,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: x0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="x" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 52 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 51 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 47 [comment="type=repeat,index=i,tensor=C,root=true" label="Repeat i: C" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="C" root="true"] + 46 [comment="type=fiberlookup,index=j,tensor=C,mode=0,format=compressed,src=true,root=false" label="FiberLookup j: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="0" format="compressed" src="true" root="false"] + 44 [comment="type=intersect,index=j" label="intersect j" color=purple shape=box style=filled type="intersect" index="j"] + 43 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 42 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 39 [comment="type=repeat,index=j,tensor=D,root=false" label="Repeat j: D" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="D" root="false"] + 38 [comment="type=fiberlookup,index=k,tensor=D,mode=0,format=compressed,src=true,root=false" label="FiberLookup k: D0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="D" mode="0" format="compressed" src="true" root="false"] + 36 [comment="type=intersect,index=k" label="intersect k" color=purple shape=box style=filled type="intersect" index="k"] + 35 [comment="type=repsiggen,index=k" label="RepeatSignalGenerator k" color=cyan3 shape=box style=filled type="repsiggen" index="k"] + 34 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 31 [comment="type=repeat,index=k,tensor=B,root=false" label="Repeat k: B" color=cyan2 shape=box style=filled type="repeat" index="k" tensor="B" root="false"] + 23 [comment="type=repeat,index=l,tensor=B,root=false" label="Repeat l: B" color=cyan2 shape=box style=filled type="repeat" index="l" tensor="B" root="false"] + 15 [comment="type=repeat,index=m,tensor=B,root=false" label="Repeat m: B" color=cyan2 shape=box style=filled type="repeat" index="m" tensor="B" root="false"] + 10 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 9 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 8 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 7 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 6 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 5 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 4 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 3 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 2 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 0 [comment="type=fiberwrite,mode=vals,tensor=x,size=1*B0_dim,sink=true" label="FiberWrite Vals: x" color=green3 shape=box style=filled type="fiberwrite" tensor="x" mode="vals" size="1*B0_dim" sink="true"] + 32 [comment="type=repeat,index=k,tensor=E,root=false" label="Repeat k: E" color=cyan2 shape=box style=filled type="repeat" index="k" tensor="E" root="false"] + 30 [comment="type=fiberlookup,index=l,tensor=E,mode=0,format=compressed,src=true,root=false" label="FiberLookup l: E0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="l" tensor="E" mode="0" format="compressed" src="true" root="false"] + 28 [comment="type=intersect,index=l" label="intersect l" color=purple shape=box style=filled type="intersect" index="l"] + 27 [comment="type=repsiggen,index=l" label="RepeatSignalGenerator l" color=cyan3 shape=box style=filled type="repsiggen" index="l"] + 26 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 24 [comment="type=repeat,index=l,tensor=C,root=false" label="Repeat l: C" color=cyan2 shape=box style=filled type="repeat" index="l" tensor="C" root="false"] + 16 [comment="type=repeat,index=m,tensor=C,root=false" label="Repeat m: C" color=cyan2 shape=box style=filled type="repeat" index="m" tensor="C" root="false"] + 11 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 25 [comment="type=repeat,index=l,tensor=f,root=false" label="Repeat l: f" color=cyan2 shape=box style=filled type="repeat" index="l" tensor="f" root="false"] + 22 [comment="type=fiberlookup,index=m,tensor=f,mode=0,format=compressed,src=true,root=false" label="FiberLookup m: f0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="m" tensor="f" mode="0" format="compressed" src="true" root="false"] + 20 [comment="type=intersect,index=m" label="intersect m" color=purple shape=box style=filled type="intersect" index="m"] + 19 [comment="type=repsiggen,index=m" label="RepeatSignalGenerator m" color=cyan3 shape=box style=filled type="repsiggen" index="m"] + 18 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 17 [comment="type=repeat,index=m,tensor=D,root=false" label="Repeat m: D" color=cyan2 shape=box style=filled type="repeat" index="m" tensor="D" root="false"] + 12 [comment="type=arrayvals,tensor=D" label="Array Vals: D" color=green2 shape=box style=filled type="arrayvals" tensor="D"] + 13 [comment="type=arrayvals,tensor=E" label="Array Vals: E" color=green2 shape=box style=filled type="arrayvals" tensor="E"] + 14 [comment="type=arrayvals,tensor=f" label="Array Vals: f" color=green2 shape=box style=filled type="arrayvals" tensor="f"] + 21 [comment="type=fiberlookup,index=m,tensor=E,mode=1,format=compressed,src=true,root=false" label="FiberLookup m: E1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="m" tensor="E" mode="1" format="compressed" src="true" root="false"] + 33 [comment="type=repeat,index=k,tensor=f,root=false" label="Repeat k: f" color=cyan2 shape=box style=filled type="repeat" index="k" tensor="f" root="false"] + 29 [comment="type=fiberlookup,index=l,tensor=D,mode=1,format=compressed,src=true,root=false" label="FiberLookup l: D1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="l" tensor="D" mode="1" format="compressed" src="true" root="false"] + 40 [comment="type=repeat,index=j,tensor=E,root=false" label="Repeat j: E" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="E" root="false"] + 41 [comment="type=repeat,index=j,tensor=f,root=false" label="Repeat j: f" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="f" root="false"] + 37 [comment="type=fiberlookup,index=k,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup k: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="C" mode="1" format="compressed" src="true" root="false"] + 48 [comment="type=repeat,index=i,tensor=D,root=true" label="Repeat i: D" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="D" root="true"] + 49 [comment="type=repeat,index=i,tensor=E,root=true" label="Repeat i: E" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="E" root="true"] + 50 [comment="type=repeat,index=i,tensor=f,root=true" label="Repeat i: f" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="f" root="true"] + 45 [comment="type=fiberlookup,index=j,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: B1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="B" mode="1" format="compressed" src="true" root="false"] + 54 -> 53 [label="crd" style=dashed type="crd" comment=""] + 53 -> 1 [label="crd" style=dashed type="crd"] + 53 -> 52 [label="crd" style=dashed type="crd"] + 52 -> 51 [label="repsig" style=dotted type="repsig"] + 51 -> 47 [label="repsig" style=dotted type="repsig"] + 47 -> 46 [label="ref" style=bold type="ref"] + 46 -> 44 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 44 -> 43 [label="crd" style=dashed type="crd"] + 43 -> 42 [label="repsig" style=dotted type="repsig"] + 42 -> 39 [label="repsig" style=dotted type="repsig"] + 39 -> 38 [label="ref" style=bold type="ref"] + 38 -> 36 [label="crd_in-D" style=dashed type="crd" comment="in-D"] + 36 -> 35 [label="crd" style=dashed type="crd"] + 35 -> 34 [label="repsig" style=dotted type="repsig"] + 34 -> 31 [label="repsig" style=dotted type="repsig"] + 31 -> 23 [label="ref" style=bold type="ref"] + 23 -> 15 [label="ref" style=bold type="ref"] + 15 -> 10 [label="ref" style=bold type="ref"] + 10 -> 9 [label="val" type="val"] + 9 -> 8 [label="val" type="val"] + 8 -> 7 [label="val" type="val"] + 7 -> 6 [label="val" type="val"] + 6 -> 5 [label="val" type="val"] + 5 -> 4 [label="val" type="val"] + 4 -> 3 [label="val" type="val"] + 3 -> 2 [label="val" type="val"] + 2 -> 0 [label="val" type="val"] + 34 -> 32 [label="repsig" style=dotted type="repsig"] + 32 -> 30 [label="ref" style=bold type="ref"] + 30 -> 28 [label="crd_in-E" style=dashed type="crd" comment="in-E"] + 28 -> 27 [label="crd" style=dashed type="crd"] + 27 -> 26 [label="repsig" style=dotted type="repsig"] + 26 -> 23 [label="repsig" style=dotted type="repsig"] + 26 -> 24 [label="repsig" style=dotted type="repsig"] + 24 -> 16 [label="ref" style=bold type="ref"] + 16 -> 11 [label="ref" style=bold type="ref"] + 11 -> 9 [label="val" type="val"] + 26 -> 25 [label="repsig" style=dotted type="repsig"] + 25 -> 22 [label="ref" style=bold type="ref"] + 22 -> 20 [label="crd_in-f" style=dashed type="crd" comment="in-f"] + 20 -> 19 [label="crd" style=dashed type="crd"] + 19 -> 18 [label="repsig" style=dotted type="repsig"] + 18 -> 15 [label="repsig" style=dotted type="repsig"] + 18 -> 16 [label="repsig" style=dotted type="repsig"] + 18 -> 17 [label="repsig" style=dotted type="repsig"] + 17 -> 12 [label="ref" style=bold type="ref"] + 12 -> 8 [label="val" type="val"] + 20 -> 13 [label="ref_out-E" style=bold type="ref" comment="out-E"] + 13 -> 7 [label="val" type="val"] + 20 -> 14 [label="ref_out-f" style=bold type="ref" comment="out-f"] + 14 -> 6 [label="val" type="val"] + 22 -> 20 [label="ref_in-f" style=bold type="ref" comment="in-f"] + 28 -> 17 [label="ref_out-D" style=bold type="ref" comment="out-D"] + 28 -> 21 [label="ref_out-E" style=bold type="ref" comment="out-E"] + 21 -> 20 [label="crd_in-E" style=dashed type="crd" comment="in-E"] + 21 -> 20 [label="ref_in-E" style=bold type="ref" comment="in-E"] + 30 -> 28 [label="ref_in-E" style=bold type="ref" comment="in-E"] + 34 -> 33 [label="repsig" style=dotted type="repsig"] + 33 -> 25 [label="ref" style=bold type="ref"] + 36 -> 24 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 36 -> 29 [label="ref_out-D" style=bold type="ref" comment="out-D"] + 29 -> 28 [label="crd_in-D" style=dashed type="crd" comment="in-D"] + 29 -> 28 [label="ref_in-D" style=bold type="ref" comment="in-D"] + 38 -> 36 [label="ref_in-D" style=bold type="ref" comment="in-D"] + 42 -> 40 [label="repsig" style=dotted type="repsig"] + 40 -> 32 [label="ref" style=bold type="ref"] + 42 -> 41 [label="repsig" style=dotted type="repsig"] + 41 -> 33 [label="ref" style=bold type="ref"] + 44 -> 31 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 44 -> 37 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 37 -> 36 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 37 -> 36 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 46 -> 44 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 51 -> 48 [label="repsig" style=dotted type="repsig"] + 48 -> 39 [label="ref" style=bold type="ref"] + 51 -> 49 [label="repsig" style=dotted type="repsig"] + 49 -> 40 [label="ref" style=bold type="ref"] + 51 -> 50 [label="repsig" style=dotted type="repsig"] + 50 -> 41 [label="ref" style=bold type="ref"] + 54 -> 45 [label="ref" style=bold type="ref" comment=""] + 45 -> 44 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 45 -> 44 [label="ref_in-B" style=bold type="ref" comment="in-B"] +} diff --git a/compiler/sam-outputs/onyx-dot/matmul_ijk_crddrop.gv b/compiler/sam-outputs/onyx-dot/matmul_ijk_crddrop.gv new file mode 100644 index 00000000..af28d80d --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/matmul_ijk_crddrop.gv @@ -0,0 +1,55 @@ +digraph SAM { + comment="X=ss01,B=ss01,C=ss10" + 17 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 16 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 2 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 15 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 14 [comment="type=repeat,index=i,tensor=C,root=true" label="Repeat i: C" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="C" root="true"] + 13 [comment="type=fiberlookup,index=j,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="1" format="compressed" src="true" root="false"] + 12 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 1 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*C1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*C1_dim" sink="true"] + 11 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 10 [comment="type=repeat,index=j,tensor=B,root=false" label="Repeat j: B" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="B" root="false"] + 8 [comment="type=fiberlookup,index=k,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup k: B1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="B" mode="1" format="compressed" src="true" root="false"] + 7 [comment="type=intersect,index=k" label="intersect k" color=purple shape=box style=filled type="intersect" index="k"] + 5 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 4 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 3 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 0 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*C1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="1*B0_dim*C1_dim" sink="true"] + 6 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 9 [comment="type=fiberlookup,index=k,tensor=C,mode=0,format=compressed,src=true,root=false" label="FiberLookup k: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="C" mode="0" format="compressed" src="true" root="false"] + 18 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 19 [comment="type=crddrop,outer=j,inner=k" label="CrdDrop j,k" color=orange shape=box style=filled type="crddrop" outer="j" inner="k"] + + 17 -> 16 [label="crd" style=dashed type="crd" comment=""] + # 16 -> 2 [label="crd" style=dashed type="crd"] + 16 -> 15 [label="crd" style=dashed type="crd"] + 15 -> 14 [label="repsig" style=dotted type="repsig"] + 14 -> 13 [label="ref" style=bold type="ref"] + 13 -> 12 [label="crd" style=dashed type="crd" comment=""] + # 12 -> 1 [label="crd" style=dashed type="crd"] + 12 -> 11 [label="crd" style=dashed type="crd"] + 11 -> 10 [label="repsig" style=dotted type="repsig"] + 10 -> 8 [label="ref" style=bold type="ref"] + 8 -> 7 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 7 -> 5 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 5 -> 4 [label="val" type="val"] + # 4 -> 3 [label="val" type="val"] + 3 -> 0 [label="val" type="val"] + 7 -> 6 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 6 -> 4 [label="val" type="val"] + 8 -> 7 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 13 -> 9 [label="ref" style=bold type="ref" comment=""] + 9 -> 7 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 9 -> 7 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 17 -> 10 [label="ref" style=bold type="ref" comment=""] + + 4 -> 19 [label="val_inner-k" type="val" comment="inner-k"] + 12 -> 19 [label="crd_outer-j" style=dashed type="crd" comment="outer-j"] + 18 -> 1 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 19 -> 3 [label="val_inner-k" type="val" comment="inner-k"] + + 19 -> 18 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 16 -> 18 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 18 -> 2 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] +} diff --git a/compiler/sam-outputs/onyx-dot/matmul_ijk_crddrop_relu.gv b/compiler/sam-outputs/onyx-dot/matmul_ijk_crddrop_relu.gv new file mode 100644 index 00000000..5625ca41 --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/matmul_ijk_crddrop_relu.gv @@ -0,0 +1,60 @@ +digraph SAM { + comment="X=ss01,B=ss01,C=ss10" + 17 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 16 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 2 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 15 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 14 [comment="type=repeat,index=i,tensor=C,root=true" label="Repeat i: C" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="C" root="true"] + 13 [comment="type=fiberlookup,index=j,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="1" format="compressed" src="true" root="false"] + 12 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 1 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*C1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*C1_dim" sink="true"] + 11 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 10 [comment="type=repeat,index=j,tensor=B,root=false" label="Repeat j: B" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="B" root="false"] + 8 [comment="type=fiberlookup,index=k,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup k: B1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="B" mode="1" format="compressed" src="true" root="false"] + 7 [comment="type=intersect,index=k" label="intersect k" color=purple shape=box style=filled type="intersect" index="k"] + 5 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 4 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 3 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 0 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*C1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="1*B0_dim*C1_dim" sink="true"] + 6 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 9 [comment="type=fiberlookup,index=k,tensor=C,mode=0,format=compressed,src=true,root=false" label="FiberLookup k: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="C" mode="0" format="compressed" src="true" root="false"] + 18 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 19 [comment="type=crddrop,outer=j,inner=k" label="CrdDrop j,k" color=orange shape=box style=filled type="crddrop" outer="j" inner="k"] + 20 [comment="type=max" label="Max 0" color=brown shape=box style=filled type="max"] + 21 [comment="type=crddrop,outer=j,inner=val,mode=0" label="CrdDrop Compression j, val" color=orange style=filled type="crddrop" outer="j" inner="val" mode="0"] + 22 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 17 -> 16 [label="crd" style=dashed type="crd" comment=""] + 16 -> 15 [label="crd" style=dashed type="crd"] + 15 -> 14 [label="repsig" style=dotted type="repsig"] + 14 -> 13 [label="ref" style=bold type="ref"] + 13 -> 12 [label="crd" style=dashed type="crd" comment=""] + 12 -> 11 [label="crd" style=dashed type="crd"] + 11 -> 10 [label="repsig" style=dotted type="repsig"] + 10 -> 8 [label="ref" style=bold type="ref"] + 8 -> 7 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 7 -> 5 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 5 -> 4 [label="val" type="val"] + 7 -> 6 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 6 -> 4 [label="val" type="val"] + 8 -> 7 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 13 -> 9 [label="ref" style=bold type="ref" comment=""] + 9 -> 7 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 9 -> 7 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 17 -> 10 [label="ref" style=bold type="ref" comment=""] + + 4 -> 19 [label="val_inner-k" type="val" comment="inner-k"] + 12 -> 19 [label="crd_outer-j" style=dashed type="crd" comment="outer-j"] + 19 -> 3 [label="val_inner-k" type="val" comment="inner-k"] + 3 -> 20 [label="val" type="val" comment="val"] + 20 -> 21 [label="val" type="val" comment="inner-val"] + 18 -> 21 [label="crd_inner-j" style=dashed type="crd" comment="outer-j"] + 21 -> 22 [label="crd_inner-j" style=dashed type="crd" comment="outer-j"] + 18 -> 22 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + + 19 -> 18 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 16 -> 18 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 21 -> 0 [label="val" type="val" comment="inner-val"] + + 22 -> 2 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 22 -> 1 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] +} diff --git a/compiler/sam-outputs/onyx-dot/matmul_ikj.gv b/compiler/sam-outputs/onyx-dot/matmul_ikj.gv new file mode 100644 index 00000000..3fe654b0 --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/matmul_ikj.gv @@ -0,0 +1,52 @@ +digraph SAM { + comment="X=ss01,B=ss01,C=ss01" + 20 [comment="type=vectorreducer,index=j" label="VectorReducer j" color=brown shape=box style=filled type="vectorreducer" accum_index="j"] + 0 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*C1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="1*B0_dim*C1_dim" sink="true"] + 1 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*C1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*C1_dim" sink="true"] + 19 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 18 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 2 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 17 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 16 [comment="type=repeat,index=i,tensor=C,root=true" label="Repeat i: C" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="C" root="true"] + 15 [comment="type=fiberlookup,index=k,tensor=C,mode=0,format=compressed,src=true,root=false" label="FiberLookup k: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="C" mode="0" format="compressed" src="true" root="false"] + 13 [comment="type=intersect,index=k" label="intersect k" color=purple shape=box style=filled type="intersect" index="k"] + 9 [comment="type=repeat,index=j,tensor=B,root=false" label="Repeat j: B" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="B" root="false"] + 7 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 6 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 12 [comment="type=fiberlookup,index=j,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="1" format="compressed" src="true" root="false"] + 11 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 10 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 8 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 14 [comment="type=fiberlookup,index=k,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup k: B1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="B" mode="1" format="compressed" src="true" root="false"] + 23 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + #24 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 19 -> 18 [label="ref" style=bold type="ref" comment="", vr_special="true"] + 18 -> 17 [label="ref" style=bold type="ref" comment="", vr_special="true"] + #19 -> 17 [label="crd" style=dashed type="crd" comment=""] + 17 -> 16 [label="repsig" style=dotted type="repsig"] + 16 -> 15 [label="ref" style=bold type="ref"] + 15 -> 13 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 13 -> 9 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 9 -> 7 [label="ref" style=bold type="ref"] + 7 -> 6 [label="val" type="val"] + 13 -> 12 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 12 -> 11 [label="crd" style=dashed type="crd" comment=""] + 11 -> 20 [label="crd_j" style=dashed type="crd" comment="j" special="true"] + 11 -> 10 [label="crd" style=dashed type="crd" comment=""] + 10 -> 9 [label="repsig" style=dotted type="repsig"] + 12 -> 8 [label="ref" style=bold type="ref" comment=""] + 8 -> 6 [label="val" type="val"] + 15 -> 13 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 18 -> 14 [label="ref" style=bold type="ref" comment=""] + 14 -> 13 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 14 -> 13 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 6 -> 20 [label="mul_val_out" type="val"] + 20 -> 23 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 19 -> 23 [label="crd_outer-i" style=dashed type="crd" comment="outer-i" special="true"] + #18 -> 23 [label="crd_outer-i" style=dashed type="crd" comment="outer-i" special="true"] + #18 -> 2 [label="crd_out-i" style=dashed type="crd" comment="out-i"] + 23 -> 2 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 23 -> 1 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + #20 -> 1[label="final_crd-j" style=dashed type="crd" comment="final_crd-j"] + 20 -> 0 [label="final_val" type="val" comment="final-val"] +} \ No newline at end of file diff --git a/compiler/sam-outputs/onyx-dot/spmm_ijk_crddrop.gv b/compiler/sam-outputs/onyx-dot/spmm_ijk_crddrop.gv new file mode 100644 index 00000000..4eaef89b --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/spmm_ijk_crddrop.gv @@ -0,0 +1,55 @@ +digraph SAM { + comment="X=ss01,B=dd01,C=ss10" + 17 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=dense,src=true,root=true" label="FiberLookup i: B0\ndense" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="dense" src="true" root="true"] + 16 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 2 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 15 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 14 [comment="type=repeat,index=i,tensor=C,root=true" label="Repeat i: C" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="C" root="true"] + 13 [comment="type=fiberlookup,index=j,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="1" format="compressed" src="true" root="false"] + 12 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 1 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*C1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*C1_dim" sink="true"] + 11 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 10 [comment="type=repeat,index=j,tensor=B,root=false" label="Repeat j: B" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="B" root="false"] + 8 [comment="type=fiberlookup,index=k,tensor=B,mode=1,format=dense,src=true,root=false" label="FiberLookup k: B1\ndense" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="B" mode="1" format="dense" src="true" root="false"] + 7 [comment="type=intersect,index=k" label="intersect k" color=purple shape=box style=filled type="intersect" index="k"] + 5 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 4 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 3 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 0 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*C1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="1*B0_dim*C1_dim" sink="true"] + 6 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 9 [comment="type=fiberlookup,index=k,tensor=C,mode=0,format=compressed,src=true,root=false" label="FiberLookup k: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="C" mode="0" format="compressed" src="true" root="false"] + 18 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 19 [comment="type=crddrop,outer=j,inner=k" label="CrdDrop j,k" color=orange shape=box style=filled type="crddrop" outer="j" inner="k"] + + 17 -> 16 [label="crd" style=dashed type="crd" comment=""] + # 16 -> 2 [label="crd" style=dashed type="crd"] + 16 -> 15 [label="crd" style=dashed type="crd"] + 15 -> 14 [label="repsig" style=dotted type="repsig"] + 14 -> 13 [label="ref" style=bold type="ref"] + 13 -> 12 [label="crd" style=dashed type="crd" comment=""] + # 12 -> 1 [label="crd" style=dashed type="crd"] + 12 -> 11 [label="crd" style=dashed type="crd"] + 11 -> 10 [label="repsig" style=dotted type="repsig"] + 10 -> 8 [label="ref" style=bold type="ref"] + 8 -> 7 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 7 -> 5 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 5 -> 4 [label="val" type="val"] + # 4 -> 3 [label="val" type="val"] + 3 -> 0 [label="val" type="val"] + 7 -> 6 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 6 -> 4 [label="val" type="val"] + 8 -> 7 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 13 -> 9 [label="ref" style=bold type="ref" comment=""] + 9 -> 7 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 9 -> 7 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 17 -> 10 [label="ref" style=bold type="ref" comment=""] + + 4 -> 19 [label="val_inner-k" type="val" comment="inner-k"] + 12 -> 19 [label="crd_outer-j" style=dashed type="crd" comment="outer-j"] + 18 -> 1 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 19 -> 3 [label="val_inner-k" type="val" comment="inner-k"] + + 19 -> 18 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 16 -> 18 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 18 -> 2 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] +} diff --git a/compiler/sam-outputs/onyx-dot/spmm_ijk_crddrop_relu.gv b/compiler/sam-outputs/onyx-dot/spmm_ijk_crddrop_relu.gv new file mode 100644 index 00000000..65e5e1ad --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/spmm_ijk_crddrop_relu.gv @@ -0,0 +1,60 @@ +digraph SAM { + comment="X=ss01,B=dd01,C=ss10" + 17 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=dense,src=true,root=true" label="FiberLookup i: B0\ndense" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="dense" src="true" root="true"] + 16 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 2 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 15 [comment="type=repsiggen,index=i" label="RepeatSignalGenerator i" color=cyan3 shape=box style=filled type="repsiggen" index="i"] + 14 [comment="type=repeat,index=i,tensor=C,root=true" label="Repeat i: C" color=cyan2 shape=box style=filled type="repeat" index="i" tensor="C" root="true"] + 13 [comment="type=fiberlookup,index=j,tensor=C,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: C1\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="C" mode="1" format="compressed" src="true" root="false"] + 12 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 1 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*C1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*C1_dim" sink="true"] + 11 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 10 [comment="type=repeat,index=j,tensor=B,root=false" label="Repeat j: B" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="B" root="false"] + 8 [comment="type=fiberlookup,index=k,tensor=B,mode=1,format=dense,src=true,root=false" label="FiberLookup k: B1\ndense" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="B" mode="1" format="dense" src="true" root="false"] + 7 [comment="type=intersect,index=k" label="intersect k" color=purple shape=box style=filled type="intersect" index="k"] + 5 [comment="type=arrayvals,tensor=B" label="Array Vals: B" color=green2 shape=box style=filled type="arrayvals" tensor="B"] + 4 [comment="type=mul" label="Mul" color=brown shape=box style=filled type="mul"] + 3 [comment="type=reduce" label="Reduce" color=brown shape=box style=filled type="reduce"] + 0 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*C1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="1*B0_dim*C1_dim" sink="true"] + 6 [comment="type=arrayvals,tensor=C" label="Array Vals: C" color=green2 shape=box style=filled type="arrayvals" tensor="C"] + 9 [comment="type=fiberlookup,index=k,tensor=C,mode=0,format=compressed,src=true,root=false" label="FiberLookup k: C0\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="k" tensor="C" mode="0" format="compressed" src="true" root="false"] + 18 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 19 [comment="type=crddrop,outer=j,inner=k" label="CrdDrop j,k" color=orange shape=box style=filled type="crddrop" outer="j" inner="k"] + 20 [comment="type=max" label="Max 0" color=brown shape=box style=filled type="max"] + 21 [comment="type=crddrop,outer=j,inner=val,mode=0" label="CrdDrop Compression j, val" color=orange style=filled type="crddrop" outer="j" inner="val" mode="0"] + 22 [comment="type=crddrop,outer=i,inner=j" label="CrdDrop i,j" color=orange shape=box style=filled type="crddrop" outer="i" inner="j"] + 17 -> 16 [label="crd" style=dashed type="crd" comment=""] + 16 -> 15 [label="crd" style=dashed type="crd"] + 15 -> 14 [label="repsig" style=dotted type="repsig"] + 14 -> 13 [label="ref" style=bold type="ref"] + 13 -> 12 [label="crd" style=dashed type="crd" comment=""] + 12 -> 11 [label="crd" style=dashed type="crd"] + 11 -> 10 [label="repsig" style=dotted type="repsig"] + 10 -> 8 [label="ref" style=bold type="ref"] + 8 -> 7 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 7 -> 5 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 5 -> 4 [label="val" type="val"] + 7 -> 6 [label="ref_out-C" style=bold type="ref" comment="out-C"] + 6 -> 4 [label="val" type="val"] + 8 -> 7 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 13 -> 9 [label="ref" style=bold type="ref" comment=""] + 9 -> 7 [label="crd_in-C" style=dashed type="crd" comment="in-C"] + 9 -> 7 [label="ref_in-C" style=bold type="ref" comment="in-C"] + 17 -> 10 [label="ref" style=bold type="ref" comment=""] + + 4 -> 19 [label="val_inner-k" type="val" comment="inner-k"] + 12 -> 19 [label="crd_outer-j" style=dashed type="crd" comment="outer-j"] + 19 -> 3 [label="val_inner-k" type="val" comment="inner-k"] + 3 -> 20 [label="val" type="val" comment="val"] + 20 -> 21 [label="val" type="val" comment="inner-val"] + 18 -> 21 [label="crd_inner-j" style=dashed type="crd" comment="outer-j"] + 21 -> 22 [label="crd_inner-j" style=dashed type="crd" comment="outer-j"] + 18 -> 22 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + + 19 -> 18 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] + 16 -> 18 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 21 -> 0 [label="val" type="val" comment="inner-val"] + + 22 -> 2 [label="crd_outer-i" style=dashed type="crd" comment="outer-i"] + 22 -> 1 [label="crd_inner-j" style=dashed type="crd" comment="inner-j"] +} diff --git a/compiler/sam-outputs/onyx-dot/trans_masked_broadcast.gv b/compiler/sam-outputs/onyx-dot/trans_masked_broadcast.gv new file mode 100644 index 00000000..06d63c95 --- /dev/null +++ b/compiler/sam-outputs/onyx-dot/trans_masked_broadcast.gv @@ -0,0 +1,27 @@ +digraph SAM { + comment="X=ss01,B=ss01,c=s0" + 0 [comment="type=fiberlookup,index=i,tensor=B,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: B\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="B" mode="0" format="compressed" src="true" root="true"] + 1 [comment="type=fiberlookup,index=i,tensor=c,mode=0,format=compressed,src=true,root=true" label="FiberLookup i: c\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="i" tensor="c" mode="0" format="compressed" src="true" root="true"] + 2 [comment="type=intersect,index=i" label="intersect i" color=purple shape=box style=filled type="intersect" index="i"] + 3 [comment="type=fiberlookup,index=j,tensor=B,mode=1,format=compressed,src=true,root=false" label="FiberLookup j: B\ncompressed" color=green4 shape=box style=filled type="fiberlookup" index="j" tensor="B" mode="1" format="compressed" src="true" root="false"] + 4 [comment="type=repsiggen,index=j" label="RepeatSignalGenerator j" color=cyan3 shape=box style=filled type="repsiggen" index="j"] + 5 [comment="type=repeat,index=j,tensor=c,root=false" label="Repeat j: B" color=cyan2 shape=box style=filled type="repeat" index="j" tensor="c" root="false"] + 6 [comment="type=arrayvals,tensor=c" label="Array Vals: c" color=green2 shape=box style=filled type="arrayvals" tensor="c"] + 7 [comment="type=fiberwrite,index=i,tensor=X,mode=0,format=compressed,segsize=2,crdsize=B0_dim,sink=true" label="FiberWrite i: X0\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="i" tensor="X" mode="0" format="compressed" segsize="2" crdsize="B0_dim" sink="true"] + 8 [comment="type=fiberwrite,index=j,tensor=X,mode=1,format=compressed,segsize=B0_dim+1,crdsize=B0_dim*B1_dim,sink=true" label="FiberWrite j: X1\ncompressed" color=green3 shape=box style=filled type="fiberwrite" index="j" tensor="X" mode="1" format="compressed" segsize="B0_dim+1" crdsize="B0_dim*B1_dim" sink="true"] + 9 [comment="type=fiberwrite,mode=vals,tensor=X,size=1*B0_dim*B1_dim,sink=true" label="FiberWrite Vals: X" color=green3 shape=box style=filled type="fiberwrite" tensor="X" mode="vals" size="1*B0_dim*B1_dim" sink="true"] + 10 [comment="type=broadcast" shape=point style=invis type="broadcast"] + 0 -> 2 [label="ref_in-B" style=bold type="ref" comment="in-B"] + 0 -> 2 [label="crd_in-B" style=dashed type="crd" comment="in-B"] + 1 -> 2 [label="ref_in-c" style=bold type="ref" comment="in-c"] + 1 -> 2 [label="crd_in-c" style=dashed type="crd" comment="in-c"] + 2 -> 3 [label="ref_out-B" style=bold type="ref" comment="out-B"] + 2 -> 7 [label="crd" style=dashed type="crd"] + 3 -> 10 [label="crd" style=dashed type="crd"] + 10 -> 4 [label="crd" style=dashed type="crd"] + 10 -> 8 [label="crd" style=dashed type="crd"] + 4 -> 5 [label="repsig" style=dotted type="repsig"] + 2 -> 5 [label="ref_out-c" style=bold type="ref" comment="out-c"] + 5 -> 6 [label="ref" style=bold type="ref"] + 6 -> 9 [label="val" type="val"] +} diff --git a/sam/onyx/hw_nodes/compute_node.py b/sam/onyx/hw_nodes/compute_node.py index 6f5d3bd6..b250e308 100644 --- a/sam/onyx/hw_nodes/compute_node.py +++ b/sam/onyx/hw_nodes/compute_node.py @@ -9,6 +9,7 @@ def __init__(self, name=None) -> None: self.num_inputs_connected = 0 self.num_outputs_connected = 0 + def connect(self, other, edge, kwargs=None): from sam.onyx.hw_nodes.glb_node import GLBNode @@ -106,7 +107,19 @@ def connect(self, other, edge, kwargs=None): raise NotImplementedError(f'Cannot connect ComputeNode to {other_type}') elif other_type == MergeNode: # TODO - raise NotImplementedError(f'Cannot connect ComputeNode to {other_type}') + # raise NotImplementedError(f'Cannot connect ComputeNode to {other_type}') + crddrop = other.get_name() + pe = self.get_name() + conn = 0 + if 'outer' in edge.get_comment(): + conn = 1 + + new_conns = { + f'pe_to_crddrop_res_to_{conn}': [ + ([(pe, "res"), (crddrop, f"cmrg_coord_in_{conn}")], 17), + ] + } + return new_conns elif other_type == RepeatNode: # TODO raise NotImplementedError(f'Cannot connect ComputeNode to {other_type}') diff --git a/sam/onyx/hw_nodes/merge_node.py b/sam/onyx/hw_nodes/merge_node.py index 0602f190..afeb4fd2 100644 --- a/sam/onyx/hw_nodes/merge_node.py +++ b/sam/onyx/hw_nodes/merge_node.py @@ -66,7 +66,13 @@ def connect(self, other, edge, kwargs=None): elif other_type == IntersectNode: raise NotImplementedError(f'Cannot connect MergeNode to {other_type}') elif other_type == ReduceNode: - raise NotImplementedError(f'Cannot connect MergeNode to {other_type}') + # raise NotImplementedError(f'Cannot connect MergeNode to {other_type}') + other_red = other.get_name() + new_conns = { + f'merge_to_reduce_inner': [ + ([(merge, f"cmrg_coord_out_{0}"), (other_red, f"data_in")], 17), + ] + } elif other_type == LookupNode: raise NotImplementedError(f'Cannot connect MergeNode to {other_type}') elif other_type == MergeNode: