Skip to content

Commit

Permalink
[torchlib] Support mod and eq on SymInt (#1879)
Browse files Browse the repository at this point in the history
Add some missing operators from
pytorch/pytorch#136524 /cc @justinchuby
  • Loading branch information
bhack authored Sep 24, 2024
1 parent 99ae64e commit 500ed62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onnxscript/function_libs/torch_lib/ops/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3269,7 +3269,7 @@ def aten_empty_strided(
return op.Expand(zero, size)


@torch_op(("aten::eq", "aten::eq.Tensor", "aten::eq.Scalar"))
@torch_op(("aten::eq", "aten::eq.Tensor", "aten::eq.Scalar", "_operator::eq"))
def aten_eq(self: TTensor, other: TTensor) -> BOOL:
"""eq.Tensor(Tensor self, Tensor other) -> Tensor"""

Expand Down Expand Up @@ -7085,7 +7085,7 @@ def aten_remainder(self: TFloatOrBFloat16, other: TFloatOrBFloat16) -> TFloatOrB
return op.Sub(self, op.Mul(rounded_quotient, other))


@torch_op(("aten::remainder.Tensor", "aten::remainder.Scalar"))
@torch_op(("aten::remainder.Tensor", "aten::remainder.Scalar", "_operator::mod"))
def aten_remainder_int(self: TInt, other: TInt) -> TInt:
"""remainder.Tensor(Tensor self, Tensor other) -> Tensor"""

Expand Down

0 comments on commit 500ed62

Please sign in to comment.