Skip to content

Commit c62f45f

Browse files
committed
WIP create initializers
Signed-off-by: Justin Chu <[email protected]>
1 parent b7f51ad commit c62f45f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

onnxscript/optimizer/_constant_folding.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ def _record_contributing_values(original_node: ir.Node, replacement: Replacement
935935
assert input.name is not None
936936
folded_from.add(input.name)
937937

938+
939+
938940
for new_output in replacement.new_outputs:
939941
if new_output is None:
940942
continue
@@ -1238,7 +1240,7 @@ def convert(av):
12381240
self.output_size_limit,
12391241
)
12401242
return None
1241-
1243+
assert new_initializer.const_value is not None
12421244
replacement_values.append(new_initializer)
12431245

12441246
for value in replacement_values:

0 commit comments

Comments
 (0)