From 03cb5dd2370f76819c80a4601fe5d83c300aec43 Mon Sep 17 00:00:00 2001 From: Bo Wun Cheng Date: Sat, 19 Oct 2024 23:13:55 -0700 Subject: [PATCH] update vectorreducer remapping code to allow fp configuration --- sam/onyx/parse_dot.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sam/onyx/parse_dot.py b/sam/onyx/parse_dot.py index 7e40fa5f..1252e76f 100644 --- a/sam/onyx/parse_dot.py +++ b/sam/onyx/parse_dot.py @@ -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()}",