[Regression] 1.14RC1 side effects on graph output
Describe the issue
Discovered by PyTorch exporter, the 1.14RC1 seems to exhibit side effects on graph output that was used as one of the inputs for "quantizeLinear" operator. The output should be np.array(1.0), but instead becomes None in 1.14RC1.
The repro script and comparison between ORT 1.14RC1 and 1.13 can be found below.
To reproduce
import onnx from onnx import numpy_helper import numpy as np import onnxruntime import onnxscript from onnxscript import opset17 as op @onnxscript.script() def repro(x: onnxscript.FLOAT): y_scale = op.Constant(value_float=1.0) y_zero_point = op.Constant( value=numpy_helper.from_array(np.array(1, dtype=np.uint8)) ) return op.QuantizeLinear(x, y_scale, y_zero_point), y_scale, y_zero_point model: onnx.ModelProto = repro.to_model_proto() onnx.save(model, "model.onnx") session = onnxruntime.InferenceSession("model.onnx") x = np.array([1.0, 2.0], dtype=np.float32) print(session.run(None, {"x": x})) """ ORT 1.14 2023-01-30 16:36:46.616346569 [W:onnxruntime:, execution_frame.cc:835 VerifyOutputSizes] Expected shape from model of {} does not match actual shape of {2} for output return_val0 [array([2, 3], dtype=uint8), None, array(1, dtype=uint8)] """ """ ORT 1.13 2023-01-30 16:36:27.314479278 [W:onnxruntime:, execution_frame.cc:828 VerifyOutputSizes] Expected shape from model of {} does not match actual shape of {2} for output return_val0 [array([2, 3], dtype=uint8), array(1., dtype=float32), array(1, dtype=uint8)] """
Urgency
No response
Platform
Linux
OS Version
Ubuntu 20.04
ONNX Runtime Installation
Other / Unknown
ONNX Runtime Version or Commit ID
ort-nightly==1.14.0.dev20230119003
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response