We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9922bae commit b99fe88Copy full SHA for b99fe88
onnxscript/optimizer/_constant_folding_test.py
@@ -599,7 +599,7 @@ def test_node_is_folded_if_specified_as_should_fold(self):
599
600
# But ConstantOfShape is folded when specified in should_fold
601
optimized = self._fold(
602
- model, should_fold=lambda node: node.op_type == "ConstantOfShape"
+ model, should_fold=lambda node: node.op_type == "ConstantOfShape" or None
603
)
604
ops = [node.op_type for node in optimized.graph]
605
self.assertEqual(ops, ["Constant"])
0 commit comments