diff --git a/onnxscript/backend/onnx_export_test.py b/onnxscript/backend/onnx_export_test.py index ab97c5f98..c1a2afbfb 100644 --- a/onnxscript/backend/onnx_export_test.py +++ b/onnxscript/backend/onnx_export_test.py @@ -100,6 +100,10 @@ def skip(pattern: str | Pattern, reason: str, *, condition: bool = True): "cannot import module, import_module does not work", ), skip("^test_bitwise_not_3d", "cannot import module, import_module does not work"), + skip( + "^test_resize_upsample_scales_linear_half_pixel_symmetric", + "cannot import module, import_module does not work", + ), ) diff --git a/onnxscript/function_libs/torch_lib/ops/quantized_decomposed.py b/onnxscript/function_libs/torch_lib/ops/quantized_decomposed.py index fa2df9751..92962a9ea 100644 --- a/onnxscript/function_libs/torch_lib/ops/quantized_decomposed.py +++ b/onnxscript/function_libs/torch_lib/ops/quantized_decomposed.py @@ -56,6 +56,8 @@ def quantized_decomposed_dequantize_per_tensor( ) -> TensorType: # TODO(justinchuby): Use dtype when we use opset 21 dequantized = op.DequantizeLinear(input, scale, common.constant(zero_point, dtype=dtype)) - if out_dtype == -1: + if out_dtype in (-1, None): + # out_dtype can be None as well return dequantized + assert out_dtype > 0, f"out_dtype must be -1 or > 0 not {out_dtype}" return op.Cast(dequantized, to=out_dtype)