mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
onnx fmod (#9307)
This commit is contained in:
parent
7c7db78feb
commit
38d7aae3b7
2 changed files with 2 additions and 7 deletions
|
|
@ -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 *****
|
||||
|
|
|
|||
7
test/external/external_test_onnx_backend.py
vendored
7
test/external/external_test_onnx_backend.py
vendored
|
|
@ -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_*')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue