This commit is contained in:
chenyu 2025-02-28 14:09:22 -05:00 committed by GitHub
commit 38d7aae3b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 7 deletions

View file

@ -317,7 +317,7 @@ def get_onnx_ops():
def BitwiseXor(x:Tensor,y:Tensor): return x ^ y
def BitwiseNot(x:Tensor): return ~x
def Mod(x:Tensor,y:Tensor,fmod=0):
if fmod != 0: raise NotImplementedError("float mod is not supported")
if fmod: return x - x.div(y, rounding_mode="trunc") * y
return x % y
# ***** Casting Ops *****

View file

@ -77,6 +77,7 @@ backend_test.exclude('cast_no_saturate')
backend_test.exclude('test_dequantizelinear_e4m3fn_float16_cpu')
backend_test.exclude('test_max_float16_cpu')
backend_test.exclude('test_min_float16_cpu')
backend_test.exclude('test_mod_mixed_sign_float16_cpu')
backend_test.exclude('test_dequantizelinear_int4_cpu')
backend_test.exclude('test_dequantizelinear_uint4_cpu')
@ -99,12 +100,6 @@ backend_test.exclude('test_nonzero_*')
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')
backend_test.exclude('test_mod_mixed_sign_float32_cpu')
backend_test.exclude('test_mod_mixed_sign_float64_cpu')
# no boolean ops (2d, 3d, 4d)
backend_test.exclude('test_bitshift_*')