[WIP][Native WebGPU] Add Conv, ConTranspose and FusedConv #320
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
# This workflow is used to build and test on Android Emulator on Linux | |
on: | |
push: | |
branches: | |
- main | |
- rel-* | |
pull_request: | |
branches: | |
- main | |
- rel-* | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
android_nnapi_ep: | |
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use jdk 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
architecture: x64 | |
- name: Setup Android NDK | |
uses: ./.github/actions/setup-android-ndk | |
with: | |
ndk-version: 27.2.12479018 | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: NNAPI EP, Build, Test on Android Emulator | |
run: >- | |
python3 tools/ci_build/build.py | |
--enable_lto | |
--android | |
--build_dir build_nnapi | |
--android_sdk_path "$ANDROID_HOME" | |
--android_ndk_path "$ANDROID_NDK_HOME" | |
--android_abi=x86_64 | |
--android_api=29 | |
--skip_submodule_sync | |
--parallel --use_vcpkg --use_vcpkg_ms_internal_asset_cache | |
--use_nnapi | |
--build_shared_lib | |
--cmake_generator=Ninja | |
--build_java | |
shell: bash | |
- name: Build Minimal ORT with NNAPI and run tests | |
run: tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh "$(pwd)" | |
shell: bash | |
- name: Install psutil for emulator shutdown by run_android_emulator.py | |
if: always() | |
run: python3 -m pip install psutil | |
shell: bash | |
- name: Stop Android Emulator | |
if: always() | |
run: | | |
env | grep ANDROID | |
if test -f ${{ github.workspace }}/emulator.pid; then | |
echo "Emulator PID:"`cat ${{ github.workspace }}/emulator.pid` | |
python3 tools/python/run_android_emulator.py \ | |
--android-sdk-root "${ANDROID_SDK_ROOT}" \ | |
--stop \ | |
--emulator-pid-file ${{ github.workspace }}/emulator.pid | |
rm ${{ github.workspace }}/emulator.pid | |
else | |
echo "Emulator PID file was expected to exist but does not." | |
fi | |
shell: bash | |
android_cpu_ep: | |
name: Android CI Pipeline | |
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use jdk 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
architecture: x64 | |
- name: Setup Android NDK | |
uses: ./.github/actions/setup-android-ndk | |
with: | |
ndk-version: 27.2.12479018 | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: CPU EP, Build and Test | |
run: >- | |
python3 tools/ci_build/build.py | |
--enable_lto | |
--android | |
--build_dir build | |
--android_sdk_path $ANDROID_HOME | |
--android_ndk_path $ANDROID_NDK_HOME | |
--android_abi=x86_64 | |
--android_api=30 | |
--skip_submodule_sync | |
--parallel --use_vcpkg --use_vcpkg_ms_internal_asset_cache | |
--cmake_generator=Ninja | |
--build_java | |
shell: bash | |
- name: Install psutil for emulator shutdown by run_android_emulator.py | |
if: always() | |
run: python3 -m pip install psutil | |
shell: bash | |
- name: Stop Android Emulator | |
if: always() | |
run: | | |
if test -f ${{ github.workspace }}/emulator.pid; then | |
echo "Emulator PID:"`cat ${{ github.workspace }}/emulator.pid` | |
python3 tools/python/run_android_emulator.py \ | |
--android-sdk-root "${ANDROID_SDK_ROOT}" \ | |
--stop \ | |
--emulator-pid-file ${{ github.workspace }}/emulator.pid | |
rm ${{ github.workspace }}/emulator.pid | |
else | |
echo "Emulator PID file was expected to exist but does not." | |
fi | |
shell: bash |