Skip to content
New issue

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

upgrade buildwheel #324

Merged
merged 4 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,12 +38,12 @@ 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
- 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
Expand Down
4 changes: 3 additions & 1 deletion tests/test_python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading