Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track nodes added in pattern builder #1770

Merged
merged 13 commits into from
Aug 2, 2024
1 change: 0 additions & 1 deletion onnxscript/rewriter/cast_constant_of_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from onnxscript import ir
from onnxscript.rewriter import pattern

op = pattern.onnxop
logger = logging.getLogger(__name__)


Expand Down
2 changes: 0 additions & 2 deletions onnxscript/rewriter/gemm_to_matmul_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from onnxscript.rewriter import pattern
from onnxscript.rewriter.broadcast_to_matmul import check_if_not_need_reshape

op = pattern.onnxop


# Pattern to match against
def reshape_gemm_reshape_pattern(op, input_a, input_b, input_c, shape_a, shape_c):
Expand Down
2 changes: 0 additions & 2 deletions onnxscript/rewriter/llama_rule_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import onnxscript.rewriter.no_op as no_op
import onnxscript.rewriter.pattern as orp

op = orp.onnxop


class CastIdentity(orp.RewriteRuleAsClass):
"""Replaces ``Cast(., to=to)`` by ``Identity`` if possible."""
Expand Down
2 changes: 0 additions & 2 deletions onnxscript/rewriter/no_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Licensed under the MIT License.
from onnxscript.rewriter import pattern

op = pattern.onnxop

# TODO: Support 1-D constant tensors
# https://github.com/microsoft/onnx-rewriter/issues/186

Expand Down
2 changes: 0 additions & 2 deletions onnxscript/rewriter/onnxruntime/fused_matmul_rule_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

import onnxscript.rewriter.pattern as orp

op = orp.onnxop


class FusedMatMulDiv1(orp.RewriteRuleAsClass):
"""Replaces ``MatMul + Div`` by FusedMatMul."""
Expand Down
1 change: 0 additions & 1 deletion onnxscript/rewriter/onnxruntime/softmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from onnxscript import ir
from onnxscript.rewriter import pattern

op = pattern.onnxop
logger = logging.getLogger(__name__)


Expand Down
Loading
Loading