We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preprocess does not fold 'Pad' in 'Conv' when model has an opset version higher than 20.
def test_pad(op_version=22): path = "opt_model.onnx" model = onnx.parser.parse_model( """ <ir_version: 9, opset_import: ["": {op_version}]> agraph (float[1, 3, 10, 10] X) => (float[1, ?, ?, ?] Y){{ pad_values = Constant<value_ints=[0,0,1,1,0,0,1,1]>() pad = Pad(X, pad_values) Y = Conv(pad, W) }} """.format( op_version=op_version ) ) w = onnx.numpy_helper.from_array(np.ones((3, 3, 3, 3), "float32"), "W") model.graph.initializer.extend([w]) ort_quant.quant_pre_process(model, path, skip_symbolic_shape=True) opt_model = onnx.load(path) current_nodes = [node.op_type for node in opt_model.graph.node] print([node.op_type for node in opt_model.graph.node]) assert current_nodes == ["Conv"], f"Wrong. Current nodes: {current_nodes}." test_pad(op_version=18) # This pass test_pad(op_version=21) # This raises an exception
No response
Linux
Ubuntu 22.04
Released Package
1.21.0
Python
X64
Default CPU
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the issue
Preprocess does not fold 'Pad' in 'Conv' when model has an opset version higher than 20.
To reproduce
Urgency
No response
Platform
Linux
OS Version
Ubuntu 22.04
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.21.0
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: