raise RuntimeError for int base pow (#8852)

current implementation is not precise and blocking other simplification change
This commit is contained in:
chenyu
2025-02-01 12:11:57 -05:00
committed by GitHub
parent 72e1f41f8e
commit 73ee2d74c0
3 changed files with 7 additions and 0 deletions

View File

@@ -95,6 +95,10 @@ backend_test.exclude('test_dequantizelinear_e5m2_cpu')
# we don't support indexes
backend_test.exclude('test_nonzero_*')
# no support for int pow
backend_test.exclude('test_pow_types_int32_int32_cpu')
backend_test.exclude('test_pow_types_int64_int64_cpu')
# no support for fmod
backend_test.exclude('test_mod_int64_fmod_cpu')
backend_test.exclude('test_mod_mixed_sign_float16_cpu')

View File

@@ -619,6 +619,7 @@ class TestOps(unittest.TestCase):
# TODO: fix backward, should be nan
helper_test_op(None, lambda x: (-2)**x, vals=[[-2.,-1,0,1,2,3]], forward_only=True)
@unittest.skip("not supported")
def test_pow_int(self):
def _test(base, exponent): helper_test_op(None, lambda x,y: x**y, vals=[base, exponent], forward_only=True)