From 1cb4a0a453b82855f4533e0d96d1bfe21461632f Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2026 12:06:01 +0000 Subject: [PATCH 1/3] onnxsim: Add version 0.8.1 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/onnxsim.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/onnxsim.yaml b/docs/packages/onnxsim.yaml index 94fc399b58d0..8d4d49ce9c28 100644 --- a/docs/packages/onnxsim.yaml +++ b/docs/packages/onnxsim.yaml @@ -23,3 +23,4 @@ versions: - filename: onnxsim-0.7.3-cp312-abi3-manylinux_2_39_riscv64.whl sha256: 630922bc5ff479b7616d602f3a8dc9d2bdf749096413be6990ce5e66cf89cfe7 requires-python: '>=3.10' +- version: 0.8.1 From 4371fe29fd878f9b9ce1fb8af682bfb9b86c2f6f Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 23 Oct 2026 06:28:13 +0800 Subject: [PATCH 2/3] onnxsim: Tolerate versions without patches 0.8.1 already pins ir_version=10 in tests/test_profiling.py, so the 0.7.3 patch is obsolete and no patch directory exists for it. --- .github/workflows/build-onnxsim.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-onnxsim.yml b/.github/workflows/build-onnxsim.yml index 1339b7eb6d9e..ca91020d6a27 100644 --- a/.github/workflows/build-onnxsim.yml +++ b/.github/workflows/build-onnxsim.yml @@ -94,8 +94,11 @@ jobs: path: python-wheels persist-credentials: false + # Only some versions need patching, so a missing directory is not an error. - name: Apply patches - run: git apply -v python-wheels/patches/onnxsim/${{ env.ONNXSIM_VERSION }}/*.patch + run: | + patches="$PWD/python-wheels/patches/onnxsim/${ONNXSIM_VERSION}" + if [ -d "$patches" ]; then git apply -v "$patches"/*.patch; fi - name: Build wheels uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 From 92eb02e3ba049919bd15ae7f1a4286ca50ec1622 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Sun, 25 Oct 2026 18:57:26 +0100 Subject: [PATCH 3/3] onnxsim: Ignore the 0.8.1 test files that import torch unconditionally --- .github/workflows/build-onnxsim.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-onnxsim.yml b/.github/workflows/build-onnxsim.yml index ca91020d6a27..e5dad032fbe1 100644 --- a/.github/workflows/build-onnxsim.yml +++ b/.github/workflows/build-onnxsim.yml @@ -131,11 +131,13 @@ jobs: # sympy/onnxslim/ultralytics/rfdetr paths; most guard the import with # pytest.importorskip, so they collect fine and just skip without # riscv64 wheels for those. onnxruntime does have a riscv64 wheel on - # our registry, but only from cp312 (matrix.onnxruntime). Five files + # our registry, but only from cp312 (matrix.onnxruntime). These files # import torch/timm/onnxruntime unconditionally at module level # (no importorskip), which aborts collection outright rather than # skipping when the import fails - not just deselecting their tests, - # so ignore the files themselves. + # so ignore the files themselves. 0.8.1 added six more torch-importing + # files (test_gan, test_graph_grad_torch_autograd, test_pytorch_export_simple, + # test_rknn3_compat, test_tflite_export_torchvision, test_torch_export_integration). CIBW_TEST_REQUIRES: pytest pytest-xdist ${{ matrix.onnxruntime }} CIBW_TEST_COMMAND: >- pytest {project}/tests/ @@ -145,6 +147,12 @@ jobs: --ignore={project}/tests/test_timm.py --ignore={project}/tests/test_rfdetr.py --ignore={project}/tests/test_yolo.py + --ignore={project}/tests/test_gan.py + --ignore={project}/tests/test_graph_grad_torch_autograd.py + --ignore={project}/tests/test_pytorch_export_simple.py + --ignore={project}/tests/test_rknn3_compat.py + --ignore={project}/tests/test_tflite_export_torchvision.py + --ignore={project}/tests/test_torch_export_integration.py - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: