Skip to content

Commit af8d520

Browse files
Copilotgramalingam
andcommitted
Use is_positive_constant directly instead of checked_x variable
Co-authored-by: gramalingam <10075881+gramalingam@users.noreply.github.com>
1 parent 838c1cb commit af8d520

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

onnxscript/rewriter/pattern_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -877,10 +877,7 @@ def is_positive_constant(context, value: ir.Value):
877877
# Create a pattern with value checker using callable directly
878878
def add_pattern(op, x, y):
879879
# Use callable as input to create ValuePattern with checker
880-
checked_x = (
881-
is_positive_constant # This should be converted to ValuePattern with check
882-
)
883-
return op.Add(checked_x, y)
880+
return op.Add(is_positive_constant, y)
884881

885882
# Create the pattern
886883
rule_pattern = pattern.Pattern(add_pattern)

0 commit comments

Comments
 (0)