From bb1c6a4a100cfdd1ab5881fd11d2baf51b761b5c Mon Sep 17 00:00:00 2001 From: take-cheeze Date: Thu, 22 Jan 2026 19:53:26 +0900 Subject: [PATCH 1/2] Fix type information vanishing for non tensor types Signed-off-by: take-cheeze --- onnxoptimizer/test/ir_test.py | 8 ++++++++ third_party/onnx | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 onnxoptimizer/test/ir_test.py diff --git a/onnxoptimizer/test/ir_test.py b/onnxoptimizer/test/ir_test.py new file mode 100644 index 000000000..e760392ba --- /dev/null +++ b/onnxoptimizer/test/ir_test.py @@ -0,0 +1,8 @@ +import onnx +import onnx.backend.test.loader +import onnxoptimizer + +def test_seq_type(): + orig = onnx.load(onnx.backend.test.loader.DATA_DIR + "/node/test_sequence_insert_at_back/model.onnx") + optimized = onnxoptimizer.optimize(orig) + assert optimized.graph.input[0].type == orig.graph.input[0].type diff --git a/third_party/onnx b/third_party/onnx index 9c31fa6d3..72e9d52a8 160000 --- a/third_party/onnx +++ b/third_party/onnx @@ -1 +1 @@ -Subproject commit 9c31fa6d39400d444c6b1a4de2a247ad32174f63 +Subproject commit 72e9d52a86dca8cefc330ac410689ae89af9ab77 From de25cdf33b164610be338eb214bb40d32157322b Mon Sep 17 00:00:00 2001 From: take-cheeze Date: Sun, 25 Jan 2026 15:03:43 +0900 Subject: [PATCH 2/2] Bump up onnx Signed-off-by: take-cheeze --- onnxoptimizer/test/ir_test.py | 10 +++++++++- third_party/onnx | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/onnxoptimizer/test/ir_test.py b/onnxoptimizer/test/ir_test.py index e760392ba..455cb759c 100644 --- a/onnxoptimizer/test/ir_test.py +++ b/onnxoptimizer/test/ir_test.py @@ -1,8 +1,16 @@ +# Copyright (c) ONNX Project Contributors +# +# SPDX-License-Identifier: Apache-2.0 + import onnx import onnx.backend.test.loader + import onnxoptimizer + def test_seq_type(): - orig = onnx.load(onnx.backend.test.loader.DATA_DIR + "/node/test_sequence_insert_at_back/model.onnx") + orig = onnx.load( + onnx.backend.test.loader.DATA_DIR + "/node/test_sequence_insert_at_back/model.onnx" + ) optimized = onnxoptimizer.optimize(orig) assert optimized.graph.input[0].type == orig.graph.input[0].type diff --git a/third_party/onnx b/third_party/onnx index 72e9d52a8..82d3af2e7 160000 --- a/third_party/onnx +++ b/third_party/onnx @@ -1 +1 @@ -Subproject commit 72e9d52a86dca8cefc330ac410689ae89af9ab77 +Subproject commit 82d3af2e77e15207b9e753b35d17141c208e840a