Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a46d212
add bool support to EPContext schema to unblock some models (#24065)
HectorSVC Mar 18, 2025
b3aa5a3
[WebGPU EP] fix for reduce min/max error on MacOS CI (#24077)
prathikr Mar 18, 2025
e495750
Upgrade current MacOS-13 to 14 (#23293)
jchen351 Mar 18, 2025
c6a2675
Fix CUDA EP Abs and Sign bfloat16 support (#23914)
skottmckay Mar 18, 2025
12fea57
Improve typing for OrtValue and other public Python interfaces (#24086)
justinchuby Mar 18, 2025
a85977d
[webgpu] Limit that K must be divisible by 128 to apply dp4a matmul (…
qjia7 Mar 18, 2025
d98046b
Add macOS ARM64 pipeline for webgpu (#24060)
fs-eire Mar 19, 2025
eceae8b
[WebNN/WebGPU JS] Fix shared Module methods overriding each other (#2…
egalli Mar 19, 2025
7fc7d5e
Enable multithreading on FP16 to FP32 cast operator (#23619)
Mar 19, 2025
3488ba3
Move Android CI Pipeline to Github Actions (#24094)
Mar 19, 2025
7444fee
Cleanup CoreML EP's code to remove COREML_ENABLE_MLPROGRAM (#23490)
Mar 19, 2025
b626409
webgpu ep support for argmax/argmin (#24089)
guschmue Mar 19, 2025
d8ed4da
[mobile/reactnative] Remove namespace from AndroidManifest.XML to res…
carzh Mar 19, 2025
80441e4
[WebGPU EP] fix implementation of Pow (#24088)
fs-eire Mar 19, 2025
731b27e
Increase timeout to 90min for ARM64-Xcode16-targeting-iphonesimulator…
fs-eire Mar 19, 2025
da7874c
[WebGPU] fix test failure in Reduce operators on macOS ARM64 (#24108)
fs-eire Mar 19, 2025
8d21bf7
[WebGPU EP] Implements CumSum Operator (#24047)
prathikr Mar 19, 2025
81a8920
[webgpu] Use 1d dispatch group size (#24084)
qjia7 Mar 19, 2025
9dcb99c
[WebGPU] fix test failure in MatMulNBits on macOS ARM64 (#24109)
fs-eire Mar 20, 2025
4d5e274
[QNN-EP] Add support for Sum operator with 2 inputs (#24098)
chuteng-quic Mar 20, 2025
5d43f0a
[WebNN] Replace narrow with SafeInt for consistently in integer handl…
Honry Mar 20, 2025
9ee95d1
Merge branch 'master' into sync_msft_20_3_25
jatinwadhwa921 Mar 20, 2025
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
98 changes: 98 additions & 0 deletions .github/actions/setup-android-ndk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# .github/actions/setup-android-ndk/action.yml
name: 'Setup Android NDK'
description: 'Installs and configures a specific version of the Android NDK'
inputs:
ndk-version:
description: 'The version of the Android NDK to install (e.g., 27.2.12479018)'
required: true
default: '27.2.12479018'
android-sdk-root:
description: 'The root directory of the Android SDK'
required: true
default: '/usr/local/lib/android/sdk'

runs:
using: "composite" # Use a composite action for multiple shell commands
steps:
- name: Install coreutils and ninja
shell: bash
run: sudo apt-get update -y && sudo apt-get install -y coreutils ninja-build

- name: Install Android NDK
shell: bash
run: |
set -e
"${{ inputs.android-sdk-root }}/cmdline-tools/latest/bin/sdkmanager" --install "ndk;${{ inputs.ndk-version }}"

NDK_PATH="${{ inputs.android-sdk-root }}/ndk/${{ inputs.ndk-version }}"
if [[ ! -d "${NDK_PATH}" ]]; then
echo "NDK directory is not in expected location: ${NDK_PATH}"
exit 1
fi

# Use standard environment variable setting in bash and add to GITHUB_ENV
echo "ANDROID_NDK_HOME=${NDK_PATH}" >> $GITHUB_ENV
echo "ANDROID_NDK_ROOT=${NDK_PATH}" >> $GITHUB_ENV
echo "ANDROID_NDK_HOME: ${NDK_PATH}"
echo "ANDROID_NDK_ROOT: ${NDK_PATH}"

- name: Check if emulator are installed and add to PATH
shell: bash
run: |
if [[ ":$PATH:" == *":${ANDROID_SDK_ROOT}/emulator:"* ]]; then
echo "${ANDROID_SDK_ROOT}/emulator is in PATH"
else
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "emulator"
echo "${ANDROID_SDK_ROOT}/emulator" >> $GITHUB_PATH
fi

- name: Check if platform tools are installed and add to PATH
shell: bash
run: |
if [[ ":$PATH:" == *":${ANDROID_SDK_ROOT}/platform-tools:"* ]]; then
echo "${ANDROID_SDK_ROOT}/platform-tools is in PATH"
else
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "platform-tools"
echo "${ANDROID_SDK_ROOT}/platform-tools" >> $GITHUB_PATH
fi
ls -R "${ANDROID_SDK_ROOT}/platform-tools"

- name: Create Android Emulator
shell: bash
env:
ANDROID_AVD_HOME: ${{ runner.temp }}/android-avd
run: |
python3 tools/python/run_android_emulator.py \
--android-sdk-root "${ANDROID_SDK_ROOT}" \
--create-avd --system-image "system-images;android-31;default;x86_64"

- name: List Android AVDs
shell: bash
env:
ANDROID_AVD_HOME: ${{ runner.temp }}/android-avd
run: |
"${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/avdmanager" list avd

- name: Check emulator.pid does not exist
shell: bash
run: |
if test -f ./emulator.pid; then
echo "Emulator PID file was not expected to exist but does and has pid: `cat ./emulator.pid`"
exit 1
fi

- name: Start Android Emulator
shell: bash
env:
ANDROID_AVD_HOME: ${{ runner.temp }}/android-avd
run: |
set -e -x
python3 tools/python/run_android_emulator.py \
--android-sdk-root "${ANDROID_SDK_ROOT}" \
--start --emulator-extra-args="-partition-size 2047" \
--emulator-pid-file ./emulator.pid
echo "Emulator PID: `cat ./emulator.pid`"

- name: View Android ENVs
shell: bash
run: env | grep ANDROID
147 changes: 147 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
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
42 changes: 41 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,46 @@ jobs:
--use_xnnpack \
--use_binskim_compliant_compile_flags

ARM64-Xcode16-webgpu:
runs-on: macos-15

env:
xcode_version: 16

timeout-minutes: 60

steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}

- name: Verify ARM64 machine
shell: python
run: |
import platform
assert platform.machine() == "arm64", "This job expects to be run on an ARM64 machine."

- name: Use Xcode ${{ env.xcode_version }}
shell: bash
run: |
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer"
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"

- uses: actions/checkout@v4

- name: Build and test
shell: bash
run: |
python ./tools/ci_build/build.py \
--build_dir ./build \
--update \
--build --parallel \
--test \
--build_shared_lib \
--build_nodejs \
--use_webgpu \
--use_binskim_compliant_compile_flags

ARM64-Xcode16-targeting-iphonesimulator:
runs-on: macos-15

Expand All @@ -164,7 +204,7 @@ jobs:
matrix:
target_arch: [x86_64, arm64]

timeout-minutes: 75
timeout-minutes: 90

steps:
- uses: actions/setup-python@v5
Expand Down
23 changes: 23 additions & 0 deletions cmake/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,29 @@
"rhs": "Darwin"
}
},
{
"name": "arm64-osx",
"inherits": [
"unit-test"
],
"generator": "Xcode",
"binaryDir": "${sourceParentDir}/cmake_build/arm64-osx",
"installDir": "${sourceParentDir}/cmake_build/out",
"cacheVariables": {
"CMAKE_OSX_ARCHITECTURES": "arm64",
"onnxruntime_BUILD_SHARED_LIB": true,
"onnxruntime_USE_XNNPACK": false,
"onnxruntime_USE_COREML": true,
"onnxruntime_BUILD_OBJC": true,
"onnxruntime_BUILD_APPLE_FRAMEWORK": true,
"CMAKE_CONFIGURATION_TYPES": "Debug;Release"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "x64-osx-vcpkg",
"inherits": [
Expand Down
2 changes: 1 addition & 1 deletion docs/ContribOperators.md
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ This version of the operator has been available since version 1 of the 'com.micr
#### Type Constraints

<dl>
<dt><tt>T</tt> : tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(float16), tensor(float), tensor(double), tensor(bfloat16)</dt>
<dt><tt>T</tt> : tensor(bool), tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(float16), tensor(float), tensor(double), tensor(bfloat16)</dt>
<dd>Constrain input and output types.</dd>
</dl>

Expand Down
4 changes: 2 additions & 2 deletions docs/OperatorKernels.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ Do not modify directly.*
| Op Name | Parameters | OpSet Version | Types Supported |
|---------|------------|---------------|-----------------|
|**Operator Domain:** *ai.onnx*||||
|Abs|*in* X:**T**<br> *out* Y:**T**|13+|**T** = tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
|Abs|*in* X:**T**<br> *out* Y:**T**|13+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
|||[6, 12]|**T** = tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
|Add|*in* A:**T**<br> *in* B:**T**<br> *out* C:**T**|14+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
|||13|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64), tensor(uint32), tensor(uint64)|
Expand Down Expand Up @@ -839,7 +839,7 @@ Do not modify directly.*
|Shrink|*in* input:**T**<br> *out* output:**T**|9+|**T** = tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
|Sigmoid|*in* X:**T**<br> *out* Y:**T**|13+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)|
|||[6, 12]|**T** = tensor(double), tensor(float), tensor(float16)|
|Sign|*in* input:**T**<br> *out* output:**T**|13+|**T** = tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
|Sign|*in* input:**T**<br> *out* output:**T**|13+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
|SimplifiedLayerNormalization|*in* X:**T**<br> *in* scale:**V**<br> *out* Y:**V**<br> *out* inv_std_var:**U**|1+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)<br/> **U** = tensor(double), tensor(float)<br/> **V** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)|
|Sin|*in* input:**T**<br> *out* output:**T**|7+|**T** = tensor(double), tensor(float), tensor(float16)|
|Size|*in* data:**T**<br> *out* size:**T1**|13+|**T** = tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)<br/> **T1** = tensor(int64)|
Expand Down
3 changes: 1 addition & 2 deletions js/react_native/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ai.onnxruntime.reactnative">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
4 changes: 2 additions & 2 deletions js/react_native/e2e/.detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module.exports = {
simulator: {
type: 'ios.simulator',
device: {
type: 'iPhone 14',
os: 'iOS 16.4',
type: 'iPhone 15',
os: 'iOS 17.4',
},
},
attached: {
Expand Down
Loading
Loading