diff --git a/sam/onyx/hw_nodes/compute_node.py b/sam/onyx/hw_nodes/compute_node.py index b45acd88..622716f8 100644 --- a/sam/onyx/hw_nodes/compute_node.py +++ b/sam/onyx/hw_nodes/compute_node.py @@ -129,10 +129,7 @@ def connect(self, other, edge, kwargs=None): other_pe = other.get_name() other_conn = other.get_num_inputs() pe = self.get_name() - # TODO: remove hack eventually - if 'Max 0' in other.op: - other_conn = 1 - elif 'Faddiexp' in other.op: + if 'Faddiexp' in other.op: comment = edge.get_attributes()["comment"].strip('"') if 'fp' in comment: other_conn = 0 diff --git a/sam/onyx/hw_nodes/reduce_node.py b/sam/onyx/hw_nodes/reduce_node.py index 4a43a9ec..0700373e 100644 --- a/sam/onyx/hw_nodes/reduce_node.py +++ b/sam/onyx/hw_nodes/reduce_node.py @@ -72,17 +72,10 @@ def connect(self, other, edge, kwargs=None): raise NotImplementedError(f'Cannot connect ReduceNode to {other_type}') elif other_type == ComputeNode: pe = other.get_name() - if 'Max 0' in other.op: - other_conn = 1 - else: - other_conn = other.get_num_inputs() + other_conn = other.mapped_input_ports[other.get_num_inputs()] new_conns = { f'reduce_to_pe_{other_conn}': [ - # send output to rd scanner ([(red, "reduce_data_out"), (pe, f"data{other_conn}")], 17), - # ([(red, "eos_out"), (wr_scan, "eos_in_0")], 1), - # ([(wr_scan, "ready_out_0"), (red, "ready_in")], 1), - # ([(red, "valid_out"), (wr_scan, "valid_in_0")], 1), ] } other.update_input_connections()