Skip to content

Commit

Permalink
Merge branch 'main' into opt-to-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
andife committed Feb 22, 2024
2 parents e66fe8d + 66b7fb6 commit b812a27
Show file tree
Hide file tree
Showing 443 changed files with 9,225 additions and 1,874 deletions.
10 changes: 10 additions & 0 deletions .azure-pipelines/Linux-CI.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

schedules:
- cron: '0 0 * * *'
displayName: Nightly Linux CI in main branch
Expand All @@ -14,6 +18,12 @@ jobs:
vmImage: 'Ubuntu-20.04'
strategy:
matrix:
py312-internal-protobuf:
python.version: '3.12'
onnx_ml: 1
build_type: 'Release'
documentation: 0
protobuf_type: 'Internal'
py311-ml-debug-external-protobuf:
python.version: '3.11'
onnx_ml: 1
Expand Down
12 changes: 11 additions & 1 deletion .azure-pipelines/MacOS-CI.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

schedules:
- cron: '0 0 * * *'
displayName: Nightly MacOS CI in main branch
Expand All @@ -14,6 +18,12 @@ jobs:
vmImage: 'macOS-11'
strategy:
matrix:
py312-internal-protobuf:
python.version: '3.12'
onnx_ml: 1
build_type: 'Release'
documentation: 0
protobuf_type: 'Internal'
py311-external-protobuf:
python.version: '3.11'
onnx_ml: 0
Expand Down Expand Up @@ -80,7 +90,7 @@ jobs:
fi
python -m pip install onnxruntime
export ORT_MAX_IR_SUPPORTED_VERSION=8
export ORT_MAX_IR_SUPPORTED_VERSION=9
export ORT_MAX_ML_OPSET_SUPPORTED_VERSION=3
export ORT_MAX_ONNX_OPSET_SUPPORTED_VERSION=19
pytest -n auto --dist loadscope
Expand Down
10 changes: 10 additions & 0 deletions .azure-pipelines/Windows-CI.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

schedules:
- cron: '0 0 * * *'
displayName: Nightly Windows CI in main branch
Expand All @@ -15,6 +19,12 @@ jobs:
vmImage: 'windows-2019'
strategy:
matrix:
py312-internal-protobuf:
python.version: '3.12'
onnx_ml: 1
build_type: 'Release'
documentation: 0
protobuf_type: 'Internal'
py311-ml-external-protobuf:
python.version: '3.11'
onnx_ml: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto_update_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# back to this branch.
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: "3.11"
- name: Install ONNX from source and update documentation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: misspell # Check spellings as well
uses: reviewdog/action-misspell@cc799b020b057600b66eedf2b6e97ca26137de21 # v1.14.0
uses: reviewdog/action-misspell@06d6a480724fa783c220081bbc22336a78dbbe82 # v1.15.0
with:
github_token: ${{ secrets.github_token }}
locale: "US"
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
# Version range or exact version of Python to use, using SemVer's version range syntax. Reads from .python-version if unset.
python-version: "3.10"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manylinux/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ "$(uname -m)" == "aarch64" ]; then
PIP_INSTALL_COMMAND="$PY_VERSION -m pip install --no-cache-dir -q"
PYTHON_COMMAND="$PY_VERSION"
else
declare -A python_map=( ["3.8"]="cp38-cp38" ["3.9"]="cp39-cp39" ["3.10"]="cp310-cp310" ["3.11"]="cp311-cp311")
declare -A python_map=( ["3.8"]="cp38-cp38" ["3.9"]="cp39-cp39" ["3.10"]="cp310-cp310" ["3.11"]="cp311-cp311" ["3.12"]="cp312-cp312")
PY_VER=${python_map[$PY_VERSION]}
PIP_INSTALL_COMMAND="/opt/python/${PY_VER}/bin/pip install --no-cache-dir -q"
PYTHON_COMMAND="/opt/python/${PY_VER}/bin/python"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.10'
- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382 # v3.0.6
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
- name: Install Dependencies
run: |
python -m pip install --quiet --upgrade pip setuptools wheel
Expand All @@ -48,9 +48,9 @@ jobs:
cd docs/docsgen
make html
- name: Upload artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0
with:
path: 'docs/docsgen/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@de14547edc9944350dc0481aa5b7afb08e75f254 # v2.0.5
uses: actions/deploy-pages@7a9bd943aa5e5175aeb8502edcc6c1c02d398e10 # v4.0.2
31 changes: 4 additions & 27 deletions .github/workflows/release_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311]
python-version: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
env:
# setting up python and docker image
py: /opt/python/${{ matrix.python-version }}/bin/python
Expand Down Expand Up @@ -98,43 +98,20 @@ jobs:
pytest && \
deactivate'
- name: Verify ONNX with the minimum supported numpy
if: ${{ always() }}
run: |
# only difference is numpy version
if [[ "${{ matrix.python-version }}" == "cp38-cp38" || "${{ matrix.python-version }}" == "cp39-cp39" ]]; then
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
python -m pip uninstall -y onnx numpy && python -m pip install numpy==1.16.6 && \
python -m pip install dist/*manylinux2014_aarch64.whl && \
pytest && \
deactivate'
else
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
python -m pip uninstall -y onnx numpy && python -m pip install numpy==1.23.2 && \
python -m pip install dist/*manylinux2014_aarch64.whl && \
pytest && \
deactivate'
fi
- name: Verify ONNX with the minimum supported protobuf (from requirements.txt)
- name: Verify ONNX with the minimumly supported packages
if: ${{ always() }}
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
python -m pip uninstall -y onnx && python -m pip install protobuf==3.20.2 && \
python -m pip uninstall -y onnx && python -m pip install -r requirements-min.txt && \
python -m pip install dist/*manylinux2014_aarch64.whl && \
pytest && \
deactivate'
- name: Verify ONNX with ONNX Runtime PyPI package
if: matrix.python-version != 'cp312-cp312'
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/release_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
architecture: ['x64']

steps:
Expand All @@ -32,13 +32,13 @@ jobs:
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Build manylinux2014_x86_64
uses: docker://quay.io/pypa/manylinux2014_x86_64:latest@sha256:085b7c2c1bcb45b936e5478fe24a5142b0519e242a0104142fd50d569d6cb922
uses: docker://quay.io/pypa/manylinux2014_x86_64:latest
with:
entrypoint: bash
args: .github/workflows/manylinux/entrypoint.sh ${{ matrix.python-version }} manylinux2014_x86_64 ${{ github.event_name }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
Expand Down Expand Up @@ -75,33 +75,22 @@ jobs:
python -m pip install dist/*manylinux2014_x86_64.whl
pytest
- name: Verify ONNX with the minimum supported numpy
if: ${{ always() }}
run: |
if [[ "${{ matrix.python-version }}" == "3.8" || "${{ matrix.python-version }}" == "3.9" ]]; then
export minimum_numpy_version=1.16.6
else
export minimum_numpy_version=1.23.2
fi
python -m pip uninstall -y numpy onnx && python -m pip install numpy==$minimum_numpy_version
python -m pip install dist/*manylinux2014_x86_64.whl
pytest
- name: Verify ONNX with the latest protobuf
if: ${{ always() }}
run: |
python -m pip uninstall -y protobuf onnx && python -m pip install protobuf
python -m pip install dist/*manylinux2014_x86_64.whl
pytest
- name: Verify ONNX with the minimum supported protobuf (from requirements.txt)
- name: Verify ONNX with the minimumly supported packages
if: ${{ always() }}
run: |
python -m pip uninstall -y protobuf onnx && python -m pip install protobuf==3.20.2
python -m pip uninstall -y numpy protobuf onnx && python -m pip install -r requirements-min.txt
python -m pip install dist/*manylinux2014_x86_64.whl
pytest
- name: Verify ONNX with ONNX Runtime PyPI package
if: matrix.python-version != '3.12'
run: |
python -m pip uninstall -y protobuf numpy && python -m pip install -q -r requirements-release.txt
python -m pip install -q onnxruntime
Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/release_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ on:
branches: [main, rel-*]
workflow_dispatch:

# Use MACOSX_DEPLOYMENT_TARGET=10.12 to produce compatible wheel
# Use MACOSX_DEPLOYMENT_TARGET=10.15 to produce compatible wheel
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
MACOSX_DEPLOYMENT_TARGET: 10.15

permissions:
contents: read
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
host-architecture: ['x64']
target-architecture: ['x86_64', 'universal2']

Expand All @@ -36,7 +36,7 @@ jobs:
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.host-architecture }}
Expand All @@ -55,8 +55,8 @@ jobs:
# Currently GitHub Action agent is using macos-11, we rename the wheels
# to use the MACOSX_DEPLOYMENT_TARGET
# Rename e.g. onnx-1.15.0-cp38-cp38-macosx_11_0_x86_64.whl
# to onnx-1.15.0-cp38-cp38-macosx_10_12_universal2.whl
ONNX_WHEEL_PLATFORM_NAME: macosx_10_12_${{ matrix.target-architecture }}
# to onnx-1.15.0-cp38-cp38-macosx_10_15_universal2.whl
ONNX_WHEEL_PLATFORM_NAME: macosx_10_15_${{ matrix.target-architecture }}
CMAKE_ARGS: "-DONNX_USE_LITE_PROTO=ON"
run: |
# Install Protobuf from source
Expand Down Expand Up @@ -92,29 +92,17 @@ jobs:
for file in dist/*.whl; do python -m pip install --upgrade $file; done
pytest
- name: Verify ONNX with the minimum supported numpy
if: ${{ always() }}
run: |
if [[ "${{ matrix.python-version }}" == "3.8" || "${{ matrix.python-version }}" == "3.9" ]]; then
export minimum_numpy_version=1.16.6
else
export minimum_numpy_version=1.23.2
fi
python -m pip uninstall -y numpy onnx && python -m pip install numpy==$minimum_numpy_version
for file in dist/*.whl; do python -m pip install --upgrade $file; done
pytest
- name: Verify ONNX with the latest protobuf
if: ${{ always() }}
run: |
python -m pip uninstall -y protobuf onnx && python -m pip install protobuf
for file in dist/*.whl; do python -m pip install --upgrade $file; done
pytest
- name: Verify ONNX with the minimum supported protobuf (from requirements.txt)
- name: Verify ONNX with the minimumly supported packages
if: ${{ always() }}
run: |
python -m pip uninstall -y protobuf onnx && python -m pip install protobuf==3.20.2
python -m pip uninstall -y numpy protobuf onnx && python -m pip install -r requirements-min.txt
for file in dist/*.whl; do python -m pip install --upgrade $file; done
pytest
Expand All @@ -135,6 +123,7 @@ jobs:
pytest
- name: Verify ONNX with ONNX Runtime PyPI package
if: matrix.python-version != '3.12'
run: |
python -m pip uninstall -y protobuf numpy && python -m pip install -q -r requirements-release.txt
python -m pip install -q onnxruntime
Expand Down
Loading

0 comments on commit b812a27

Please sign in to comment.