Skip to content

Commit

Permalink
Clean up SAM repo
Browse files Browse the repository at this point in the history
  • Loading branch information
weiya711 committed Oct 28, 2024
1 parent 2151dc7 commit bb37e00
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions sam/onyx/asplos.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
parser = argparse.ArgumentParser(description='ASPLOS argparser')
parser.add_argument('--sam_graph',
type=str,
default="/home/max/Documents/SPARSE/sam/compiler/sam-outputs/dot/")
default="./sam/compiler/sam-outputs/dot/")
parser.add_argument('--output_png',
type=str,
default="output.png")
parser.add_argument('--output_graph',
type=str,
default="/home/max/Documents/SPARSE/sam/mek.gv")
default="output.gv")
args = parser.parse_args()

sam_graph = args.sam_graph
Expand Down
2 changes: 1 addition & 1 deletion sam/onyx/fiber_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __str__(self):
if __name__ == "__main__":
random.seed(10)
numpy.random.seed(10)
mg = MatrixGenerator(name='B', shape=[10, 10], dump_dir='/home/max/Documents/SPARSE/sam/OUTPUTS_DUMP', sparsity=0.8)
mg = MatrixGenerator(name='B', shape=[10, 10], dump_dir='./OUTPUTS_DUMP', sparsity=0.8)
array = mg.get_matrix()
print(array)
ft = FiberTree(tensor=array)
Expand Down
9 changes: 5 additions & 4 deletions sam/onyx/parse_dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def __init__(self, filename=None, local_mems=True, use_fork=False,
self.stage2_count = {}

self.annotate_IO_nodes()
self.graph.write_png('mek.png')
# exit()
# print(self.graph)

Expand Down Expand Up @@ -1451,14 +1450,16 @@ def parse_graph(graph):
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='SAM DOT Parser')
parser.add_argument('--sam_graph',
type=str)
parser.add_argument('--collat_dir',
type=str,
default="/home/max/Documents/SPARSE/sam/compiler/sam-outputs/dot/mat_identity.gv")
default="temp/")
parser.add_argument('--output_png',
type=str,
default="output.png")
parser.add_argument('--output_graph',
type=str,
default="/home/max/Documents/SPARSE/sam/mek.gv")
default="output.gv")
parser.add_argument('--unroll',
type=int,
default=1)
Expand All @@ -1469,7 +1470,7 @@ def parse_graph(graph):
output_graph = args.output_graph
unroll = args.unroll
sdg = SAMDotGraph(filename=sam_graph, use_fork=True,
unroll=unroll)
unroll=unroll, collat_dir=args.collat_dir)
graph = sdg.get_graph()
print(graph)
# parse_graph(graph)
Expand Down

0 comments on commit bb37e00

Please sign in to comment.