fix: big round even rounder round (#3242)

* fix: big round even rounder round

* fix: variable name lol

* feat: 1 less potential cast

* consistant naming (im just spaming commits now)

* LOL MISSED ONNX ANOTHER COMMIT

* test: fix test_ops and remove _round

* test: tensor methods oops
This commit is contained in:
geohotstan
2024-01-26 01:24:15 +08:00
committed by GitHub
parent da5e27968c
commit 3628bea910
3 changed files with 8 additions and 27 deletions

View File

@@ -245,11 +245,7 @@ class TestOps(unittest.TestCase):
def test_round(self):
helper_test_op([(45,35)], lambda x: x.round(), forward_only=True)
helper_test_op(None, lambda x: x.round(), vals=[[1.499, 1.5, 1.501, 1.0, 2.1, 0.0, -5.0, -2.499, -2.5, -2.501]], forward_only=True)
# TODO: implement round to even
with self.assertRaises(Exception):
helper_test_op(None, lambda x: x.round(), vals=[[2.5]], forward_only=True)
with self.assertRaises(Exception):
helper_test_op(None, lambda x: x.round(), vals=[[-1.5]], forward_only=True)
helper_test_op(None, lambda x: x.round(), vals=[[2.5, -1.5]], forward_only=True)
def test_tril(self):
helper_test_op([(3,3)], lambda x: x.tril())