Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/stefanzweifel/git-…
Browse files Browse the repository at this point in the history
…auto-commit-action-5.0.1
  • Loading branch information
justinchuby committed May 8, 2024
2 parents 7db938a + 09dc4ab commit a418849
Show file tree
Hide file tree
Showing 34 changed files with 138 additions and 88 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/dco_merge_group.yml
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

name: DCO
on:
merge_group:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Expand Up @@ -42,7 +42,7 @@ jobs:
level: info
filter_mode: diff_context
- name: cpplint # Static check C++ code
uses: reviewdog/action-cpplint@b6c13159b10435813edfddea9e1cd02157544f45 # v1.1.0
uses: reviewdog/action-cpplint@f4595711c17503b596166b81782d83774541c2d8 # v1.2.0
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

name: CI

on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manylinux/entrypoint.sh
Expand Up @@ -16,12 +16,12 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
# Compile wheels
# Need to be updated if there is a new Python Version
if [ "$(uname -m)" == "aarch64" ]; then
PIP_INSTALL_COMMAND="$PY_VERSION -m pip install --no-cache-dir -q"
PIP_INSTALL_COMMAND="$PY_VERSION -m pip install --only-binary google-re2 --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" ["3.12"]="cp312-cp312")
PY_VER=${python_map[$PY_VERSION]}
PIP_INSTALL_COMMAND="/opt/python/${PY_VER}/bin/pip install --no-cache-dir -q"
PIP_INSTALL_COMMAND="/opt/python/${PY_VER}/bin/pip install --only-binary google-re2 --no-cache-dir -q"
PYTHON_COMMAND="/opt/python/${PY_VER}/bin/python"
fi

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_linux_aarch64.yml
Expand Up @@ -50,7 +50,7 @@ jobs:
${{ env.img }} \
bash -exc '${{ env.py }} -m pip install -q virtualenv && ${{ env.py }} -m venv .env && \
source .env/bin/activate && \
${{ env.py }} -m pip install -q -r requirements-release.txt && \
${{ env.py }} -m pip install -q --only-binary google-re2 -r requirements-release.txt && \
yum install -y protobuf-compiler protobuf-devel
deactivate'
Expand All @@ -74,7 +74,7 @@ jobs:
bash -exc '\
source .env/bin/activate && \
python -m pip install -q --upgrade pip && \
python -m pip install -q -r requirements-release.txt && \
python -m pip install -q --only-binary google-re2 -r requirements-release.txt && \
pip install dist/*manylinux2014_aarch64.whl && \
pytest && \
deactivate'
Expand Down
85 changes: 52 additions & 33 deletions .github/workflows/release_mac.yml
Expand Up @@ -10,9 +10,9 @@ on:
branches: [main, rel-*]
workflow_dispatch:

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

permissions:
contents: read
Expand All @@ -28,8 +28,6 @@ jobs:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
host-architecture: ['x64']
target-architecture: ['x86_64', 'universal2']

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -43,7 +41,6 @@ jobs:
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.host-architecture }}

- name: Install Python dependencies
run: |
Expand All @@ -55,12 +52,7 @@ jobs:
CC: "clang"
CXX: "clang++"
ONNX_ML: 1
CMAKE_OSX_ARCHITECTURES: ${{ matrix.target-architecture == 'x86_64' && 'x86_64' || 'arm64;x86_64' }}
# 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_15_universal2.whl
ONNX_WHEEL_PLATFORM_NAME: macosx_10_15_${{ matrix.target-architecture }}
CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
CMAKE_ARGS: "-DONNX_USE_LITE_PROTO=ON"
run: |
# Install Protobuf from source
Expand All @@ -72,47 +64,73 @@ jobs:
fi
python -m build --wheel
for file in dist/*.whl; do
python -m pip install --upgrade $file;
done
- name: Test the installed wheel
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: macos-wheel-${{ matrix.python-version }}
path: dist

test:
needs: build
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
target-architecture: ['x86_64', 'arm64']

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
pytest
arch -${{ matrix.target-architecture }} python -m pip install -q --upgrade pip
arch -${{ matrix.target-architecture }} python -m pip install -q -r requirements-release.txt
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: wheels
name: macos-wheel-${{ matrix.python-version }}
path: dist

- name: Test the wheel
run: |
arch -${{ matrix.target-architecture }} python -m pip install --upgrade dist/*.whl
arch -${{ matrix.target-architecture }} pytest
- name: Upload wheel to PyPI weekly
if: github.event_name == 'schedule' # Only triggered by weekly event
if: github.event_name == 'schedule' && matrix.target-architecture == 'arm64' # Only triggered by weekly event
run: |
twine upload --verbose dist/*.whl --repository-url https://upload.pypi.org/legacy/ -u ${{ secrets.ONNXWEEKLY_USERNAME }} -p ${{ secrets.ONNXWEEKLY_TOKEN }}
- name: Verify ONNX with the latest numpy
if: ${{ always() }}
run: |
python -m pip uninstall -y numpy onnx && python -m pip install numpy
for file in dist/*.whl; do python -m pip install --upgrade $file; done
pytest
arch -${{ matrix.target-architecture }} python -m pip uninstall -y numpy onnx
arch -${{ matrix.target-architecture }} python -m pip install numpy
arch -${{ matrix.target-architecture }} python -m pip install --upgrade dist/*.whl
arch -${{ matrix.target-architecture }} 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
arch -${{ matrix.target-architecture }} python -m pip uninstall -y protobuf onnx
arch -${{ matrix.target-architecture }} python -m pip install protobuf
arch -${{ matrix.target-architecture }} python -m pip install --upgrade dist/*.whl
arch -${{ matrix.target-architecture }} pytest
- name: Verify ONNX with the minimumly supported packages
if: ${{ always() }}
if: always() && (matrix.target-architecture == 'x86_64' || (matrix.python-version != '3.8' && matrix.python-version != '3.9'))
run: |
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
arch -${{ matrix.target-architecture }} python -m pip uninstall -y numpy protobuf onnx
arch -${{ matrix.target-architecture }} python -m pip install -r requirements-min.txt
arch -${{ matrix.target-architecture }} python -m pip install --upgrade dist/*.whl
arch -${{ matrix.target-architecture }} pytest
# Only triggered by weekly event on certain CI
- name: Build and upload source distribution to PyPI weekly
if: github.event_name == 'schedule' && matrix.python-version == '3.10' && matrix.target-architecture == 'x86_64'
if: github.event_name == 'schedule' && matrix.python-version == '3.10' && matrix.target-architecture == 'arm64'
run: |
# Build and upload source distribution to PyPI
git clean -xdf
Expand All @@ -129,9 +147,10 @@ jobs:
- 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
arch -${{ matrix.target-architecture }} python -m pip uninstall -y protobuf numpy
arch -${{ matrix.target-architecture }} python -m pip install -q -r requirements-release.txt
arch -${{ matrix.target-architecture }} python -m pip install -q onnxruntime
export ORT_MAX_IR_SUPPORTED_VERSION=9
export ORT_MAX_ML_OPSET_SUPPORTED_VERSION=3
export ORT_MAX_ONNX_OPSET_SUPPORTED_VERSION=20
pytest
arch -${{ matrix.target-architecture }} pytest
4 changes: 4 additions & 0 deletions .github/workflows/release_win.yml
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

name: WindowsRelease

on:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/scorecard.yml
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/stale.yml
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/weekly_mac_ci.yml
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

# Weekly ci workflow for model zoo.
# Runs model checker/shape_inference/version_converter for all models
name: Weekly CI with the latest ONNX and ONNX Model Zoo
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/win_no_exception_ci.yml
@@ -1,3 +1,7 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

name: Windows_No_Exception_CI

on:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
@@ -1,8 +1,8 @@
<!--
Copyright (c) ONNX Project Contributors
-->
<!--- SPDX-License-Identifier: Apache-2.0 -->
SPDX-License-Identifier: Apache-2.0
-->

# ONNX Community Involvement and Contribution Guidelines

Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,8 +1,8 @@
<!--
Copyright (c) ONNX Project Contributors
-->
<!--- SPDX-License-Identifier: Apache-2.0 -->
SPDX-License-Identifier: Apache-2.0
-->

<p align="center"><img width="40%" src="https://github.com/onnx/onnx/raw/main/docs/onnx-horizontal-color.png" /></p>

Expand Down
4 changes: 2 additions & 2 deletions RELEASE-MANAGEMENT.md
@@ -1,8 +1,8 @@
<!--
Copyright (c) ONNX Project Contributors
-->
<!--- SPDX-License-Identifier: Apache-2.0 -->
SPDX-License-Identifier: Apache-2.0
-->

# ONNX release management

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
@@ -1,8 +1,8 @@
<!--
Copyright (c) ONNX Project Contributors
-->
<!--- SPDX-License-Identifier: Apache-2.0 -->
SPDX-License-Identifier: Apache-2.0
-->

# Security Policy

Expand Down
2 changes: 1 addition & 1 deletion docs/CIPipelines.md
Expand Up @@ -17,7 +17,7 @@ SPDX-License-Identifier: Apache-2.0
[WindowsRelease](/.github/workflows/release_win.yml) | <ul><li>Main branch</li><li>Release branch</li><li>Weekly(1)</li></ul> | <ul><li>Latest Windows</li><li>x86 and x64</li><li>ONNX_USE_LITE_PROTO=ON</li><li>ONNX_USE_PROTOBUF_SHARED_LIBS=OFF</li><li>ONNX_ML=1</li><li>ONNX_USE_MSVC_STATIC_RUNTIME=OFF</li></ul>| <ul><li> Release Windows wheel</li><li>Release onnx-weekly package</li><li>Verify with different dependency versions - latest and min supported numpy version, latest and min supported protobuf version(2)</li><li>Verify ONNX with the latest [ONNX Runtime PyPI package](https://pypi.org/project/onnxruntime/)(3).</li></ul> |
[LinuxRelease_aarch64](/.github/workflows/release_linux_aarch64.yml) | <ul><li>Main branch</li><li>Release branch</li><li>Weekly</li></ul>  | <ul><li>Latest manylinux2014_aarch64</li><li>ONNX_USE_PROTOBUF_SHARED_LIBS=OFF</li><li>ONNX_ML=1</li><li>ONNX_USE_LITE_PROTO=ON</li></ul>| <ul><li> Release Linux aarch64 wheel</li><li>Release onnx-weekly package</li><li>Verify with different dependency versions - latest numpy version, latest and min supported protobuf version</li><li>Verify ONNX with the latest ONNX Runtime PyPI package</li></ul> |
[LinuxRelease_x86_64](/.github/workflows/release_linux_x86_64.yml) | <ul><li>Main branch</li><li>Release branch</li><li>Weekly</li></ul> | <ul><li>Latest LinuxRelease_x86_64</li><li>ONNX_USE_PROTOBUF_SHARED_LIBS=OFF</li><li>ONNX_ML=1</li><li>ONNX_USE_LITE_PROTO=ON</li></ul>| <ul><li> Release Linux x86_64 wheel</li><li>Release onnx-weekly package</li><li>Test TEST_HUB=1(4)</li><li>Verify with different dependency versions - latest numpy version, latest and min supported protobuf version</li><li>Verify ONNX with the latest ONNX Runtime PyPI package.</li></ul> |
[MacRelease](/.github/workflows/release_win.yml) | <ul><li>Main branch</li><li>Release branch</li><li>Weekly</li></ul> | <ul><li>macos-11</li><li> MACOSX_DEPLOYMENT_TARGET=10.12(5) </li><li>ONNX_USE_PROTOBUF_SHARED_LIBS=OFF</li><li>ONNX_ML=1</li><li>ONNX_USE_LITE_PROTO=ON</li></ul>| <ul><li>Release Mac wheel</li><li>Release onnx-weekly package</li><li>Verify with different dependency versions - latest numpy version, latest and min supported protobuf version</li><li>Verify ONNX with the latest ONNX Runtime PyPI package.</li><li>Test source distribution generation</li><li>Test build with source distribution</li><li>Release onnx-weekly source distribution</li></ul> |
[MacRelease](/.github/workflows/release_mac.yml) | <ul><li>Main branch</li><li>Release branch</li><li>Weekly</li></ul> | <ul><li>macos-latest</li><li> MACOSX_DEPLOYMENT_TARGET=11.0 </li><li>ONNX_USE_PROTOBUF_SHARED_LIBS=OFF</li><li>ONNX_ML=1</li><li>ONNX_USE_LITE_PROTO=ON</li></ul>| <ul><li>Release Mac wheel</li><li>Release onnx-weekly package</li><li>Verify with different dependency versions - latest numpy version, latest and min supported protobuf version</li><li>Verify ONNX with the latest ONNX Runtime PyPI package.</li><li>Test source distribution generation</li><li>Test build with source distribution</li><li>Release onnx-weekly source distribution</li></ul> |
[Weekly CI with latest onnx.checker](/.github/workflows/weekly_mac_ci.yml) | weekly(6) |<ul><li>macos-latest</li><li>MACOSX_DEPLOYMENT_TARGET=10.12</li><li>ONNX_USE_PROTOBUF_SHARED_LIBS=OFF</li><li>ONNX_ML=1</li></ul>| <ul><li>Test latest ONNX checker</li><li>Test latest ONNX shape inference</li><li>With all models from [onnx/models](https://github.com/onnx/models)(7)</li></ul> |
[Reuse](/.github/workflows/reuse.yml) | Every PR | | <ul><li>Checks for Copyright and License header</li><li>More information could be found at: https://reuse.software/</li><li>If no license is to be added, or the checker does not recognize it, it must be configured under .reuse/dep5.</li></ul> |
[Dependabot](/.github/dependabot.yml) | <ul><li>Main branch</li><li>weekly</li></ul> | | <ul><li>Create PRs for new dependency versions (will occur more often because p.ex. GitHub actions are pinned to commit hashes due to security best practices and not just to a version number).</li></ul> |
Expand Down
4 changes: 2 additions & 2 deletions docs/Changelog.md
Expand Up @@ -22955,7 +22955,7 @@ This version of the operator has been available since version 19 of the default

<dl>
<dt><tt>axis</tt> : int (default is 1)</dt>
<dd>(Optional) The axis of the dequantizing dimension of the input tensor. Ignored for per-tensor quantization. Negative value means counting dimensions from the back. Accepted range is [-r, r-1] where r = rank(input).</dd>
<dd>(Optional) The axis of the dequantizing dimension of the input tensor. Used only for per-axis quantization. Negative value means counting dimensions from the back. Accepted range is `[-r, r-1]` where `r = rank(input)`. When the rank of the input is 1, per-tensor quantization is applied, rendering the axis unnecessary in this scenario.</dd>
</dl>

#### Inputs (2 - 3)
Expand Down Expand Up @@ -25406,7 +25406,7 @@ This version of the operator has been available since version 21 of the default

<dl>
<dt><tt>axis</tt> : int (default is 1)</dt>
<dd>(Optional) The axis of the dequantizing dimension of the input tensor. Used for per-axis and blocked quantization. Negative value means counting dimensions from the back. Accepted range is `[-r, r-1]` where `r = rank(input)`.</dd>
<dd>(Optional) The axis of the dequantizing dimension of the input tensor. Used only for per-axis and blocked quantization. Negative value means counting dimensions from the back. Accepted range is `[-r, r-1]` where `r = rank(input)`. When the rank of the input is 1, per-tensor quantization is applied, rendering the axis unnecessary in this scenario.</dd>
<dt><tt>block_size</tt> : int (default is 0)</dt>
<dd>(Optional) The size of the quantization block (number of times every scale is replicated). Used only for blocked quantization. The block size is a positive integer. Given `x` shape `(D0, ..., Di, ..., Dn)`, `y_scale` shape `(S0, ... Si, ...Sn)` and `axis=i`, the accepted range is `[ceil(Di/Si), ceil(Di/(Si-1))-1]`</dd>
<dt><tt>output_dtype</tt> : int (default is 0)</dt>
Expand Down

0 comments on commit a418849

Please sign in to comment.