Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion onnxscript/function_libs/torch_lib/ops/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ def aten_add(self: TTensor, other: TTensor, alpha: float = 1.0) -> TTensor:
return op.Add(self, other)


@torch_op(("_operator::add"), trace_only=True)
def operator_add(self: TTensor, other: TTensor) -> TTensor:
return op.Add(self, other)


@torch_op(("aten::add.Tensor", "aten::add.Scalar"), trace_only=True, complex=True)
def aten_add_complex(self: TReal, other: TReal, alpha: float = 1.0) -> TReal:
"""add.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor"""
Expand Down Expand Up @@ -5567,7 +5572,7 @@ def aten_msort(self: TensorType) -> TensorType:


@torch_op(
("aten::mul", "aten::mul.Tensor", "_operator::mul", "aten::multiply.Tensor"),
("aten::mul", "aten::mul.Tensor", "aten::multiply.Tensor"),
trace_only=True,
)
def aten_mul(self: TTensor, other: TTensor) -> TTensor:
Expand All @@ -5579,6 +5584,11 @@ def aten_mul(self: TTensor, other: TTensor) -> TTensor:
return op.Mul(self, other)


@torch_op("_operator::mul", trace_only=True)
def operator_mul(self: TTensor, other: TTensor) -> TTensor:
return op.Mul(self, other)


@torch_op(
("aten::mul", "aten::mul.Tensor", "aten::multiply.Tensor"),
trace_only=True,
Expand Down
Loading