Skip to content

Commit be4ea50

Browse files
authored
fix(atenlib): GE and LE op (#325)
previous implementation is greater not greater and equal. fixes #315
1 parent 9439e10 commit be4ea50

File tree

1 file changed

+2
-2
lines changed
  • onnxscript/function_libs/torch_aten/ops

1 file changed

+2
-2
lines changed

onnxscript/function_libs/torch_aten/ops/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,7 @@ def aten_gcd(self: TensorType, other: TensorType) -> TensorType:
19841984
def aten_ge(self: TReal, other: TReal) -> BOOL:
19851985
# ge.Tensor(Tensor self, Tensor other) -> Tensor
19861986

1987-
return op.Greater(self, other)
1987+
return op.GreaterOrEqual(self, other)
19881988

19891989

19901990
def aten_geqrf(self: TensorType) -> tuple[TensorType, TensorType]:
@@ -2542,7 +2542,7 @@ def aten_ldexp(self: TensorType, other: TensorType) -> TensorType:
25422542
def aten_le(self: TReal, other: TReal) -> BOOL:
25432543
# le.Tensor(Tensor self, Tensor other) -> Tensor
25442544

2545-
return op.Less(self, other)
2545+
return op.LessOrEqual(self, other)
25462546

25472547

25482548
def aten_lerp(self: TensorType, end: TensorType, weight: TensorType) -> TensorType:

0 commit comments

Comments
 (0)