Onnx 1.15.0 gogogo (#2217)

* lol

* lol

* add GELULULULUL

* onnx 1.50

* fuk torch bool neg

* exclude regex tests

* exclude dequantizelinear for now

* is sunny in philly

* damn it affinegrid

* fixed auto_pad VALID

* skip 0 shape tests

* add temporary cast in Reduces

* tests should pass now

* added comments and cleanup

* try moving dequantizelinear to onnx.py

* fixed dequantizedlinear?

* cleanup

* try?

* float16 segfaults LLVM CI..???

* cleanup comments

* pin to 1.50.0

* remove use of -np.inf cuz numpy is kill

* 1.50? lol I'm actually retarded

* thx for review, muhbad

* moved Gelu higher up
This commit is contained in:
geohotstan
2023-11-11 07:36:48 +08:00
committed by GitHub
parent 85d26ddc36
commit b853e9bb8c
6 changed files with 123 additions and 40 deletions

View File

@@ -93,9 +93,15 @@ backend_test.exclude('test_lstm_*')
backend_test.exclude('test_simple_rnn_*')
# no control flow
# control flow uses AttributeProto.GRAPH
backend_test.exclude('test_if_*')
backend_test.exclude('test_loop*')
backend_test.exclude('test_range_float_type_positive_delta_expanded_cpu') # requires loop
backend_test.exclude('test_affine_grid_2d_align_corners_expanded_cpu')
backend_test.exclude('test_affine_grid_2d_expanded_cpu')
backend_test.exclude('test_affine_grid_3d_align_corners_expanded_cpu')
backend_test.exclude('test_affine_grid_3d_expanded_cpu')
backend_test.exclude('test_range_int32_type_negative_delta_expanded_cpu')
# unsupported (strange) ops
backend_test.exclude('test_bitwise_*')
@@ -139,20 +145,26 @@ backend_test.exclude('test_resize_upsample_scales_cubic_*') # unsure how to impl
backend_test.exclude('test_resize_upsample_sizes_cubic_*') # unsure how to implement cubic
# rest of the failing tests
backend_test.exclude('test_averagepool_2d_dilations_cpu') # dilations != 1 not supported for avgpool
backend_test.exclude('test_averagepool_2d_dilations_*') # dilations != 1 not supported for avgpool in tensor.py
backend_test.exclude('test_averagepool_3d_dilations_*') # dilations != 1 not supported for avgpool in tensor.py
backend_test.exclude('test_regex_*') # does not support string Tensors
backend_test.exclude('test_convtranspose_autopad_same_cpu') # TODO geohotstan has no idea how this is done, autopad requires output_shape but output_shape requires pads from autopad
backend_test.exclude('test_optional_has_element_empty_optional_input_cpu') # Attempts to create Tensor from None
backend_test.exclude('test_range_int32_type_negative_delta_expanded_cpu') # AttributeProto.GRAPH not implemented
backend_test.exclude('test_reshape_allowzero_reordered_cpu') # reshaping to 0 shape
backend_test.exclude('test_reshape_allowzero_reordered_cpu') # reshaping to shape with 0
backend_test.exclude('test_reduce_min_empty_set_cpu') # max a tensor with 0 in shape
backend_test.exclude('test_reduce_sum_empty_set_non_reduced_axis_zero_cpu') # reducing a tensor with 0 in shape
backend_test.exclude('test_resize_downsample_scales_linear_antialias_cpu') # antialias not implemented
backend_test.exclude('test_resize_downsample_sizes_linear_antialias_cpu') # antialias not implemented
backend_test.exclude('test_resize_tf_crop_and_resize_cpu') # unsure about fill value after clip
backend_test.exclude('test_operator_addconstant_cpu') # bad data type
backend_test.exclude('test_ai_onnx_ml_label_encoder_tensor_value_only_mapping_cpu') # bad data type string
backend_test.exclude('test_ai_onnx_ml_label_encoder_tensor_mapping_cpu') # bad data type string
# issue 1556 https://github.com/tinygrad/tinygrad/issues/1556
backend_test.exclude('test_isinf_cpu')
backend_test.exclude('test_isinf_negative_cpu')
backend_test.exclude('test_isinf_positive_cpu')
backend_test.exclude('test_isinf_float16_cpu')
backend_test.exclude('test_isnan_float16_cpu')
backend_test.exclude('test_isnan_cpu')
# issue 1791 fast math messes with these https://github.com/tinygrad/tinygrad/issues/1791
@@ -165,15 +177,19 @@ if getenv('METAL'):
backend_test.exclude('test_maxpool_2d_pads_cpu')
backend_test.exclude('test_maxpool_2d_same_lower_cpu')
# Don't know how to treat special TensorProto like TensorProto.FLOAT8E4M3FN
if getenv("CPU") or getenv("TORCH"):
backend_test.exclude('test_dequantizelinear_axis_cpu')
backend_test.exclude('test_dequantizelinear_cpu')
# compiled backends cannot reshape to and from 0
# compiled backends cannot reshape to or from 0
if getenv('LLVM') or getenv('GPU') or getenv('CLANG') or getenv('METAL') or getenv('CUDA'):
backend_test.exclude('test_slice_start_out_of_bounds_cpu')
backend_test.exclude('test_constantofshape_int_shape_zero_cpu')
backend_test.exclude('test_reduce_l1_empty_set_cpu')
backend_test.exclude('test_reduce_sum_empty_set_cpu')
backend_test.exclude('test_reduce_l1_empty_set_expanded_cpu')
backend_test.exclude('test_reduce_sum_square_empty_set_cpu')
backend_test.exclude('test_reduce_l2_empty_set_cpu')
backend_test.exclude('test_reduce_sum_square_empty_set_expanded_cpu')
backend_test.exclude('test_reduce_l2_empty_set_expanded_cpu')
backend_test.exclude('test_reduce_log_sum_empty_set_cpu')
backend_test.exclude('test_reduce_log_sum_empty_set_expanded_cpu')
if getenv('GPU') or getenv('METAL'):
backend_test.exclude('test_mish_cpu') # weird inaccuracy
@@ -184,6 +200,7 @@ if getenv('GPU') or getenv('METAL'):
if (getenv('LLVM') or getenv('CUDA')) and CI:
backend_test.exclude('test_max_float16_cpu')
backend_test.exclude('test_min_float16_cpu')
backend_test.exclude('test_dequantizelinear_e4m3fn_float16_cpu')
# disable model tests for now since they are slow
if not getenv("MODELTESTS"):