Skip to content

Commit

Permalink
Fix ordering of matrix multiplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Feb 9, 2021
1 parent 0680eb6 commit 65f3883
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Compiler/allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,14 @@ def keep_merged_order(instr, n, t):
add_edge(i, n)
else:
mem_access(n, instr, last_mem_write_of, last_mem_read_of)
elif isinstance(instr, matmulsm):
if options.preserve_mem_order:
for i in last_mem_write:
add_edge(i, n)
else:
for i in last_mem_write_of.values():
for j in i:
add_edge(j, n)
# keep I/O instructions in order
elif isinstance(instr, IOInstruction):
if last_print_str is not None:
Expand Down

0 comments on commit 65f3883

Please sign in to comment.