We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84c5bc5 commit 0cd7e14Copy full SHA for 0cd7e14
src/onnx_ir/passes/common/onnx_float_16.py
@@ -287,14 +287,12 @@ def convert_float_to_float16(
287
if attr.name == "to" and attr.i == 1:
288
attr.i = 10
289
break
290
- for attr in n.attribute:
291
- next_level.append(attr)
+ next_level.extend(list(n.attribute))
292
# if q is model.graph.node.attribute, push q.g and q.graphs (GraphProto)
293
# and process node.attribute.t and node.attribute.tensors (TensorProto)
294
if isinstance(q, onnx_proto.AttributeProto):
295
next_level.append(q.g)
296
- for n in q.graphs:
297
- next_level.append(n)
+ next_level.extend(list(q.graphs))
298
q.t.CopyFrom(
299
convert_tensor_float_to_float16(q.t, min_positive_val, max_finite_val)
300
)
0 commit comments