Skip to content

Commit 607a17e

Browse files
iksnagrebCopilot
andauthored
Make split constant folding options mutually exclusive
Co-authored-by: Copilot <[email protected]>
1 parent 096d51e commit 607a17e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onnxscript/optimizer/_constant_folding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def split(node: ir.Node, op, _):
569569
_split = np.cumsum(_split.numpy()[:-1])
570570

571571
# Option B: Number of (even) splits
572-
if (num_outputs := node.attributes.get("num_outputs")) is not None:
572+
elif (num_outputs := node.attributes.get("num_outputs")) is not None:
573573
# Numpy accepts single integer of (even) splits as well
574574
_split = num_outputs.as_int()
575575

0 commit comments

Comments
 (0)