From 08da043905905e05e13a8ef14b2b0a68970fc549 Mon Sep 17 00:00:00 2001 From: daquexian Date: Sun, 3 Mar 2024 17:54:11 +0800 Subject: [PATCH 1/4] upgrade buildwheel Signed-off-by: daquexian --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9499b23..b16dcdb 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -38,7 +38,7 @@ jobs: submodules: recursive fetch-depth: 0 - name: Build onnxsim wheels - uses: pypa/cibuildwheel@v2.11.4 + uses: pypa/cibuildwheel@v2.16.5 env: CIBW_ENVIRONMENT: CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnxsim CIBW_ENVIRONMENT_WINDOWS: USE_MSVC_STATIC_RUNTIME=0 CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnxsim From 2f5b9d7a2491774b12f8938e56233bf896dece3c Mon Sep 17 00:00:00 2001 From: daquexian Date: Sun, 3 Mar 2024 20:15:35 +0800 Subject: [PATCH 2/4] set opset explicitly in "test_unset_optional_input" test Signed-off-by: daquexian --- tests/test_python_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_python_api.py b/tests/test_python_api.py index 0a631c4..5e490b1 100644 --- a/tests/test_python_api.py +++ b/tests/test_python_api.py @@ -293,8 +293,10 @@ def test_unset_optional_input(): value_info=fmap, initializer=initializers ) + + opset_imports = [onnx.helper.make_opsetid("", 14)] - model = onnx.helper.make_model(graph_def) + model = onnx.helper.make_model(graph_def, opset_imports=opset_imports) sim_model, check_ok = onnxsim.simplify(model, check_n=3) assert check_ok assert len(model.graph.node) == 1 From a3a8c82fe222d271e4bb7f4d65717a3be761f4f2 Mon Sep 17 00:00:00 2001 From: daquexian Date: Sun, 3 Mar 2024 22:05:09 +0800 Subject: [PATCH 3/4] update other cibuildwheel Signed-off-by: daquexian --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b16dcdb..c7b7055 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -43,7 +43,7 @@ jobs: CIBW_ENVIRONMENT: CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnxsim CIBW_ENVIRONMENT_WINDOWS: USE_MSVC_STATIC_RUNTIME=0 CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnxsim - name: Build onnx-simplifier wheels - uses: pypa/cibuildwheel@v2.11.4 + uses: pypa/cibuildwheel@v2.16.5 env: # set ONNXSIM_PKG_NAME to onnx-simplifier CIBW_ENVIRONMENT: CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnx-simplifier From b00c218bfb9f94cc757e3f6317dc2f66bc2e77b6 Mon Sep 17 00:00:00 2001 From: daquexian Date: Mon, 4 Mar 2024 10:20:27 +0800 Subject: [PATCH 4/4] test replacing pip to python3 -m pip Signed-off-by: daquexian --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c7b7055..d2addab 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -13,7 +13,7 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_ENVIRONMENT_PASS_LINUX: ONNXSIM_CI CIBW_BEFORE_ALL_LINUX: WD=`pwd` && /opt/python/cp38-cp38/bin/python -m pip install --target tmp_cmake cmake && cp tmp_cmake/bin/cmake /usr/local/bin/cmake && rm -rf tmp_cmake && /opt/python/cp38-cp38/bin/python -m pip install cmake && cmake --version && whereis cmake - CIBW_BEFORE_ALL_MACOS: WD=`pwd` && pip install cmake + CIBW_BEFORE_ALL_MACOS: WD=`pwd` && python3 -m pip install cmake CIBW_TEST_REQUIRES_LINUX: pytest flake8 onnxruntime CIBW_TEST_REQUIRES_MACOS: pytest onnxruntime CIBW_TEST_REQUIRES_WINDOWS: pytest onnxruntime