Skip to content

Enabling gpnpu mode in qlinearconv #100

Enabling gpnpu mode in qlinearconv

Enabling gpnpu mode in qlinearconv #100

Workflow file for this run

name: CI && Release & Upload Wheel
on:
workflow_call:
inputs:
onnxruntime_branch:
type: string
default: "main"
workflow_dispatch:
inputs:
onnxruntime_branch:
type: string
default: "main"
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_upload_wheel_linux:
runs-on: The_CTOs_Choice
container:
image: ghcr.io/quadric-io/tvm:devel
options: "--mount type=bind,source=${{ github.workspace }},target=/workspace"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: quadric-io/onnxruntime
ref: ${{ inputs.onnxruntime_branch || github.ref }}
- name: Build ONNX Runtime wheel
working-directory: /workspace
run: |
python3 -m pip install cmake --upgrade
./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync --allow_running_as_root --compile_no_warning_as_error
wheel_path=$(find . -name '*.whl' | xargs readlink -f)
echo "wheel_path=$wheel_path" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ort-wheel-linux
path: ${{ env.wheel_path }}
build_and_upload_wheel_mac:
if: github.repository != 'quadric-io/sdk-cli'
runs-on: [self-hosted, macOS, ARM64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: quadric-io/onnxruntime
ref: ${{ inputs.onnxruntime_branch || github.ref }}
- name: Build ONNX Runtime wheel
run: |
./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync --compile_no_warning_as_error --skip_submodule_sync --apple_deploy_target 12
wheel_path=$(find . -name '*.whl' | xargs readlink -f)
echo "wheel_path=$wheel_path" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ort-wheel-mac
path: ${{ env.wheel_path }}
create_release:
permissions:
contents: write
if: (github.ref == 'refs/heads/main') && ( github.event_name != 'workflow_call' && github.event_name != 'workflow_dispatch' )
needs: [build_and_upload_wheel_mac, build_and_upload_wheel_linux]
runs-on: ubuntu-latest
steps:
- name: Download ort-wheel-linux artifact
uses: actions/download-artifact@v3
with:
name: ort-wheel-linux
path: artifacts/
- name: Download ort-wheel-mac artifact
uses: actions/download-artifact@v3
with:
name: ort-wheel-mac
path: artifacts/
- name: Count releases
id: count_releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
count=$(curl --request GET \
--url https://api.github.com/repos/${{ github.repository }}/releases \
--header "Authorization: Bearer $GITHUB_TOKEN" | jq length)
echo "count=$count" >> $GITHUB_ENV
- name: Create Release and Upload Both Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.count }}
name: Release v${{ env.count }}
files: |
artifacts/*.whl