Skip to content

Commit

Permalink
update the intersect-to-compute connection logic to use ports metamap…
Browse files Browse the repository at this point in the history
…per generates, clean up printing statement in read scanner node
  • Loading branch information
bobcheng15 committed Jan 22, 2024
1 parent 56744d9 commit 6ded96d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
6 changes: 1 addition & 5 deletions sam/onyx/hw_nodes/intersect_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,14 @@ def connect(self, other, edge, kwargs=None):
# Could be doing a sparse accum
compute = other
compute_name = other.get_name()
print("INTERSECT TO COMPUTE EDGE!")
print(edge)
print(edge.get_attributes())
edge_comment = edge.get_attributes()['comment'].strip('"')
tensor = edge_comment.split('-')[1]
print(self.tensor_to_conn)
out_conn = self.tensor_to_conn[tensor]
compute_conn = compute.get_num_inputs()
new_conns = {
'intersect_to_repeat': [
# send output to rd scanner
([(isect, f"pos_out_{out_conn}"), (compute_name, f"data{compute_conn}")], 17),
([(isect, f"pos_out_{out_conn}"), (compute_name, f"data{compute.mapped_input_ports[compute_conn]}")], 17),
]
}
compute.update_input_connections()
Expand Down
7 changes: 0 additions & 7 deletions sam/onyx/hw_nodes/read_scanner_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,6 @@ def connect(self, other, edge, kwargs=None):
return new_conns
elif other_type == ComputeNode:
compute = other.get_name()
# compute_conn = 0
print("CHECKING READ TENSOR - COMPUTE")
print(edge)
print(self.get_tensor())
# if self.get_tensor() == 'C' or self.get_tensor() == 'c':
# compute_conn = 1

# Can use dynamic information to assign inputs to compute nodes
# since add/mul are commutative
compute_conn = other.get_num_inputs()
Expand Down

0 comments on commit 6ded96d

Please sign in to comment.