Skip to content

Commit

Permalink
update vectorreducer remapping code to allow fp configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bobcheng15 committed Oct 20, 2024
1 parent 149daca commit 03cb5dd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sam/onyx/parse_dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,14 @@ def rewrite_VectorReducer(self):
comment=f"type=union,index={output_crd}",
index=output_crd)

add = pydot.Node(f"vr_add_{self.get_next_seq()}", label=f"{og_label}_Add", hwnode=f"{HWNodeType.Compute}",
type="add", sub="0", comment="type=add,sub=0")
if "fp" in attrs and attrs["fp"].strip('"') == "true":
print("configuring vector reducer to use floating point add")
breakpoint()
add = pydot.Node(f"var_add_{self.get_next_seq()}", label=f"{og_label}_Add", hwnode=f"{HWNodeType.Compute}",
type="fp_add", comment="type=fp_add")
else:
add = pydot.Node(f"vr_add_{self.get_next_seq()}", label=f"{og_label}_Add", hwnode=f"{HWNodeType.Compute}",
type="add", sub="0", comment="type=add,sub=0")
self.alu_nodes.append(add)

crd_buffet = pydot.Node(f"vr_crd_buffet_{self.get_next_seq()}",
Expand Down

0 comments on commit 03cb5dd

Please sign in to comment.