diff --git a/.github/workflows/build-onnxsim.yml b/.github/workflows/build-onnxsim.yml index 1339b7eb6d9e..e5dad032fbe1 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 @@ -128,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/ @@ -142,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: 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