Skip to content

Commit d1a3b75

Browse files
committed
chore
1 parent d016612 commit d1a3b75

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

hls4ml/backends/fpga/passes/clone.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ def transform(self, model, node):
8686
out_var = node.get_output_variable(output)
8787
attrs = {'size': np.prod(out_var.shape)}
8888

89-
i0 = 1
89+
init_stream_idx = 1
9090
if in_output:
9191
# If the value is used as output, add one extra stream
9292
idx = node.model.outputs.index(node.name)
9393
node.model.outputs[idx] = node.name + '_cpy1'
94-
i0 = 2
95-
for i, layer in enumerate(output_map[output], i0):
94+
init_stream_idx = 2
95+
for i, layer in enumerate(output_map[output], init_stream_idx):
9696
idx = layer.inputs.index(output)
9797
layer.inputs[idx] = output + f'_cpy{i}'
9898

hls4ml/model/graph.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,15 +520,18 @@ def insert_node(self, node, before=None, input_idx=0):
520520
def remove_node(self, node, rewire=True):
521521
"""Remove a node from a graph.
522522
523-
By default, this function can connect the outputs of previous node to the input of next one. If the removed node has multiple inputs/outputs tensors, an exception is raised.
523+
By default, this function can connect the outputs of previous
524+
node to the input of next one. If the removed node has multiple
525+
inputs/outputs tensors, an exception is raised.
524526
525527
Args:
526-
node (Layer): The node to remove
527-
rewire (bool, optional): Deprecated, no effect
528+
node (Layer): The node to remove rewire (bool, optional):
529+
Deprecated, no effect
528530
529531
Raises:
530-
Exception: If an attempt is made to rewire a node with multiple inputs/outputs.
531-
""" # noqa: E501
532+
Exception: If an attempt is made to rewire a node with
533+
multiple inputs/outputs.
534+
"""
532535

533536
inputs = [inp for inp in node.inputs if inp]
534537
outputs = [outp for outp in node.outputs if outp]

0 commit comments

Comments
 (0)