failed test case for copysign -0.0 (#14379)

* failed test case for copysign -0.0

* skip those
This commit is contained in:
chenyu
2026-01-27 14:37:17 -05:00
committed by GitHub
parent ec1b28bc2c
commit 62884585a7

View File

@@ -951,6 +951,11 @@ class TestOps(unittest.TestCase):
for i in [-1.,0.,1.]:
for j in [-1., 0., 1.]:
helper_test_op(None, torch.copysign, Tensor.copysign, vals=[[i], [j]])
# TODO: fix copysign to distinguish between -0.0 and 0.0
@unittest.skipIf(COMPILE_ONLY or getenv("TINY_BACKEND"), "test requires runtime")
@unittest.expectedFailure
def test_copysign_signed_zero(self):
helper_test_op(None, torch.copysign, Tensor.copysign, vals=[[1.0, 1.0], [-0.0, 0.0]])
def test_logaddexp(self):
helper_test_op([(45,65), (45,65)], torch.logaddexp, Tensor.logaddexp)