From e55f7246c4e24163a7508812335ab750ec9ac55a Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Thu, 11 Apr 2024 11:17:41 +0800 Subject: [PATCH 01/32] Update operator sets --- .../apple/hws_mobile_package.required_operators.config | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index 061da62f0a972..09a8b2be353ae 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -10,3 +10,10 @@ com.microsoft;1;DynamicQuantizeMatMul,FusedConv,FusedGemm,FusedMatMul,Gelu,MatMu # NHWC transformer also uses this, so assuming it's valuable enough to include com.microsoft;1;QLinearLeakyRelu + +# Hanwang HWR operators +ai.onnx;13;ConvInteger +com.microsoft;1;DynamicQuantizeLSTM +ai.onnx;6;Relu +ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round +ai.onnx;8;Min,Max From 1645c21f4c1f2484de817155c8cd18656fd5f2b7 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Thu, 11 Apr 2024 11:18:33 +0800 Subject: [PATCH 02/32] Never search for packages in the system --- tools/ci_build/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 41bcef33bd415..deaa4f9a53053 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -1019,6 +1019,7 @@ def generate_build_tree( "-Donnxruntime_BUILD_OBJC=" + ("ON" if args.build_objc else "OFF"), "-Donnxruntime_BUILD_SHARED_LIB=" + ("ON" if args.build_shared_lib else "OFF"), "-Donnxruntime_BUILD_APPLE_FRAMEWORK=" + ("ON" if args.build_apple_framework else "OFF"), + "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER", #PACO "-Donnxruntime_USE_DNNL=" + ("ON" if args.use_dnnl else "OFF"), "-Donnxruntime_USE_NNAPI_BUILTIN=" + ("ON" if args.use_nnapi else "OFF"), "-Donnxruntime_USE_RKNPU=" + ("ON" if args.use_rknpu else "OFF"), @@ -1792,7 +1793,7 @@ def build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, targe if args.android: env["ANDROID_SDK_ROOT"] = args.android_sdk_path env["ANDROID_NDK_HOME"] = args.android_ndk_path - cmd_args += ['--verbose'] + # cmd_args += ['--verbose'] print(cmd_args) print(env) run_subprocess(cmd_args, env=env) From cd75b177cfbc6b28b8f4b499f6ec0080e9b378dc Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Mon, 14 Oct 2024 21:47:01 +0800 Subject: [PATCH 03/32] Minimal change --- .../generate-xcframework-maccatalyst.yml | 63 +++++++++++++++++++ ...s_mobile_package.required_operators.config | 22 +++++++ 2 files changed, 85 insertions(+) create mode 100644 .github/workflows/generate-xcframework-maccatalyst.yml create mode 100644 tools/ci_build/github/apple/hws_mobile_package.required_operators.config diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml new file mode 100644 index 0000000000000..eb7c35db22edb --- /dev/null +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -0,0 +1,63 @@ +name: "Build XCFramework for MacCatalyst" + +on: + workflow_dispatch: + push: + #workflow_dispatch: + # branches: [main, develop] + + +jobs: + build_macabi_xcf: + runs-on: macos-latest + steps: + - name: install Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: check Xcode version and Python 3 + run: | + /usr/bin/xcodebuild -version + python3 --version + python --version + which python3 + - name: checkout repository + uses: actions/checkout@v3 + + # - name: install protoc + # run : | + # mkdir -p $HOME/Downloads + # cd $HOME/Downloads + # curl -LJO https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-osx-universal_binary.zip + # unzip protoc-21.12-osx-universal_binary.zip -d protoc-21.12-osx-universal_binary + # mv protoc-21.12-osx-universal_binary/bin/protoc /usr/local/bin/protoc-3.21.12.0 + # mv protoc-21.12-osx-universal_binary/include/* /usr/local/include/ + + - name: create directory to store the library + run: mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 + + # - name: create release build + # run: | + # # Since Python 3.12, distutils is removed + # # pip3 install setuptools + # export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH + # cd ${{ github.workspace }}/tools/python + # ls ${{ github.workspace }}/tools/python + # pip install -r ${{ github.workspace }}/requirements-dev.txt + # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt + # #Deal with lSystem + # export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + # export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib" + # #Build command + # python ${{ github.workspace }}/tools/ci_build/github/apple/build_macabi_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ + # --path_to_protoc_exe=/usr/local/bin/protoc-3.21.12.0 ${{ github.workspace }}/tools/ci_build/github/apple/default_full_macabi_framework_build_settings.json + + - name: create releae build + run: | + pip install -r ${{ github.workspace }}/requirements-dev.txt + pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt + python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dirr=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ + --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config new file mode 100644 index 0000000000000..dc41125798609 --- /dev/null +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -0,0 +1,22 @@ +# HWS operators +ai.onnx;9;Add,BatchNormalization,Cast,Concat,Constant,ConstantOfShape,Conv,Div,Equal,Exp,Expand,Floor,Gather,Gemm,InstanceNormalization,LeakyRelu,Less,LogSoftmax,LSTM,MatMul,Mul,Neg,NonZero,Pad,ReduceSum,Reshape,Shape,Sigmoid,Slice,Softmax,Softplus,Split,Squeeze,Sub,Tanh,Transpose,Unsqueeze,Where +ai.onnx;11;Concat,Constant,Gather,MatMul,Reshape,Shape,Transpose,Unsqueeze +ai.onnx;13;Add,BatchNormalization,Cast,Concat,Constant,ConstantOfShape,Conv,Equal,Expand,Gather,Mul,Pow,Range,ReduceSum,Reshape,ScatterND,Shape,Sigmoid,Slice,Transpose,Unsqueeze,Where + +# internal ops added by optimizers +# Note: LayerNormalization is an internal op even though it is (incorrectly) registered in the ONNX domain. +ai.onnx;1;LayerNormalization +com.microsoft;1;DynamicQuantizeMatMul,FusedConv,FusedGemm,FusedMatMul,Gelu,MatMulIntegerToFloat,NhwcMaxPool,QLinearAdd,QLinearAveragePool,QLinearConv,QLinearGlobalAveragePool,QLinearMul,QLinearSigmoid,QuickGelu + +# NHWC transformer also uses this, so assuming it's valuable enough to include +com.microsoft;1;QLinearLeakyRelu + +# Hanwang HWR operators +ai.onnx;13;ConvInteger +com.microsoft;1;DynamicQuantizeLSTM +ai.onnx;6;Relu +ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round +ai.onnx;8;Min,Max + +# Voice activity detector +ai.onnx;16;Add,Cast,Concat,ConstantOfShape,Conv,Equal,Gather,Identity,If,LSTM,Log,Mul,Neg,Pad,Pow,ReduceMean,Relu,Reshape,Shape,Sigmoid,Slice,Sqrt,Squeeze,Transpose,Unsqueeze From b9b6f78b820560c6d7c8af8b0693938b67e6dcf4 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Mon, 14 Oct 2024 22:21:08 +0800 Subject: [PATCH 04/32] Use official build script build.py --- .../generate-xcframework-maccatalyst.yml | 91 ++++++++++++++----- 1 file changed, 67 insertions(+), 24 deletions(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index eb7c35db22edb..8ec1ee4e793a2 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -6,15 +6,19 @@ on: #workflow_dispatch: # branches: [main, develop] +env: + python_version: 3.11 jobs: build_macabi_xcf: - runs-on: macos-latest + runs-on: macos-14 + env: + xcode_version: 15 steps: - name: install Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: ${{ env.python_version }} - name: check Xcode version and Python 3 run: | @@ -22,8 +26,15 @@ jobs: python3 --version python --version which python3 + + - 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}" + - name: checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # - name: install protoc # run : | @@ -37,27 +48,59 @@ jobs: - name: create directory to store the library run: mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 - # - name: create release build - # run: | - # # Since Python 3.12, distutils is removed - # # pip3 install setuptools - # export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH - # cd ${{ github.workspace }}/tools/python - # ls ${{ github.workspace }}/tools/python - # pip install -r ${{ github.workspace }}/requirements-dev.txt - # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt - # #Deal with lSystem - # export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) - # export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib" - # #Build command - # python ${{ github.workspace }}/tools/ci_build/github/apple/build_macabi_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ - # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ - # --path_to_protoc_exe=/usr/local/bin/protoc-3.21.12.0 ${{ github.workspace }}/tools/ci_build/github/apple/default_full_macabi_framework_build_settings.json - - - name: create releae build + - name: create release build run: | + # Since Python 3.12, distutils is removed + # pip3 install setuptools + export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH + cd ${{ github.workspace }}/tools/python + ls ${{ github.workspace }}/tools/python pip install -r ${{ github.workspace }}/requirements-dev.txt pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt - python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dirr=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + #Deal with lSystem + export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib" + #Build command + python ${{ github.workspace }}/tools/ci_build/github/apple/build_macabi_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ - --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config + --path_to_protoc_exe=/usr/local/bin/protoc-3.21.12.0 ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config + + # - name: create releae build + # run: | + # # pip install -r ${{ github.workspace }}/requirements-dev.txt + # # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt + # # python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dirr=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + # # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ + # # --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config + + # python ./tools/ci_build/build.py \ + # --build_dir $HOME/onnxlibrary/macabi_release_v20230327_2320 \ + # --update \ + # --build --parallel \ + # --test \ + # --build_shared_lib \ + # --build_objc \ + # --use_coreml \ + # --use_xnnpack \ + # --use_binskim_compliant_compile_flags \ + # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/default_full_macabi_framework_build_settings.json + + + - name: create release build 2 + run: | + python ./tools/ci_build/build.py \ + --build_dir $HOME/onnxlibrary/macabi_release_v20230327_2320 \ + --update \ + --build --parallel \ + --skip_tests \ + --build_apple_framework \ + --use_xcode \ + --use_coreml \ + --use_xnnpack \ + --use_binskim_compliant_compile_flags \ + --ios \ + --apple_deploy_target=16.0 \ + --apple_sysroot=iphonesimulator \ + --osx_arch=x86_64 \ + --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF \ + --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config From 296b5e6f8886aa3163323c68624de15a49d69b30 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Mon, 14 Oct 2024 22:31:20 +0800 Subject: [PATCH 05/32] Do not set version --- .github/workflows/generate-xcframework-maccatalyst.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index 8ec1ee4e793a2..d5f004e9f3bde 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -27,11 +27,11 @@ jobs: python --version which python3 - - 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}" + # - 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}" - name: checkout repository uses: actions/checkout@v4 From 5918efd4d8b51276f93661dc7074e2e22a34bba1 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Mon, 14 Oct 2024 22:36:20 +0800 Subject: [PATCH 06/32] Remove pip install --- .github/workflows/generate-xcframework-maccatalyst.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index d5f004e9f3bde..74507c8a4cfda 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -55,8 +55,8 @@ jobs: export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH cd ${{ github.workspace }}/tools/python ls ${{ github.workspace }}/tools/python - pip install -r ${{ github.workspace }}/requirements-dev.txt - pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt + # pip install -r ${{ github.workspace }}/requirements-dev.txt + # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt #Deal with lSystem export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib" From 1bf923e79bccbccd051a713ca23c9d0b3edf60b4 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Mon, 14 Oct 2024 22:44:39 +0800 Subject: [PATCH 07/32] Use build_apple_framework instead --- .../generate-xcframework-maccatalyst.yml | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index 74507c8a4cfda..561e9cc56890a 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -48,30 +48,32 @@ jobs: - name: create directory to store the library run: mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 - - name: create release build + # - name: create release build + # run: | + # # Since Python 3.12, distutils is removed + # # pip3 install setuptools + # export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH + # cd ${{ github.workspace }}/tools/python + # ls ${{ github.workspace }}/tools/python + # # pip install -r ${{ github.workspace }}/requirements-dev.txt + # # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt + # #Deal with lSystem + # export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + # export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib" + # #Build command + # python tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dir /Users/goodnotesci/onnxlibrary/ios_release_v20240405_onnx116 --include_ops_by_config tools/ci_build/github/apple/hws_mobile_package.required_operators.config tools/ci_build/github/apple/default_full_ios_framework_build_settings.json + + # python ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ + # --path_to_protoc_exe=/usr/local/bin/protoc-3.21.12.0 ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config + + - name: create releae build run: | - # Since Python 3.12, distutils is removed - # pip3 install setuptools - export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH - cd ${{ github.workspace }}/tools/python - ls ${{ github.workspace }}/tools/python # pip install -r ${{ github.workspace }}/requirements-dev.txt # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt - #Deal with lSystem - export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) - export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib" - #Build command - python ${{ github.workspace }}/tools/ci_build/github/apple/build_macabi_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dirr=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ - --path_to_protoc_exe=/usr/local/bin/protoc-3.21.12.0 ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config - - # - name: create releae build - # run: | - # # pip install -r ${{ github.workspace }}/requirements-dev.txt - # # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt - # # python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dirr=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ - # # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ - # # --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config + --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config # python ./tools/ci_build/build.py \ # --build_dir $HOME/onnxlibrary/macabi_release_v20230327_2320 \ From 886c429559a47059aec792d58e26c03c064c678b Mon Sep 17 00:00:00 2001 From: pacowong Date: Mon, 14 Oct 2024 22:51:17 +0800 Subject: [PATCH 08/32] Update generate-xcframework-maccatalyst.yml --- .github/workflows/generate-xcframework-maccatalyst.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index 561e9cc56890a..9bf57ff4a8bd2 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -71,7 +71,7 @@ jobs: run: | # pip install -r ${{ github.workspace }}/requirements-dev.txt # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt - python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dirr=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config From 505b74328e1e1c7c9991b3ada7b45d1173ec7ef5 Mon Sep 17 00:00:00 2001 From: pacowong Date: Mon, 14 Oct 2024 22:54:34 +0800 Subject: [PATCH 09/32] Update generate-xcframework-maccatalyst.yml --- .github/workflows/generate-xcframework-maccatalyst.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index 9bf57ff4a8bd2..130da3ac27fe5 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -73,7 +73,7 @@ jobs: # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ - --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config + --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json # python ./tools/ci_build/build.py \ # --build_dir $HOME/onnxlibrary/macabi_release_v20230327_2320 \ From 9ecdba42b60caeea02c4a9639dcada4add458b4c Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 00:07:43 +0800 Subject: [PATCH 10/32] Update generate-xcframework-maccatalyst.yml --- .github/workflows/generate-xcframework-maccatalyst.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index 130da3ac27fe5..e2569ff640d09 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -69,6 +69,7 @@ jobs: - name: create releae build run: | + export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH # pip install -r ${{ github.workspace }}/requirements-dev.txt # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ From 95f97cf538bcb2a86f37a43f7f9d3c598b09412f Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 00:15:20 +0800 Subject: [PATCH 11/32] Update generate-xcframework-maccatalyst.yml --- .github/workflows/generate-xcframework-maccatalyst.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index e2569ff640d09..b1d22b07af866 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -70,8 +70,7 @@ jobs: - name: create releae build run: | export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH - # pip install -r ${{ github.workspace }}/requirements-dev.txt - # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt + pip install -r ${{ github.workspace }}/requirements-dev.txt python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json From e5aebfb74e12a7d7130c3ff2b9bd328a6c43f207 Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 00:20:20 +0800 Subject: [PATCH 12/32] Update generate-xcframework-maccatalyst.yml --- .github/workflows/generate-xcframework-maccatalyst.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index b1d22b07af866..7bc238f0f170b 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -73,7 +73,7 @@ jobs: pip install -r ${{ github.workspace }}/requirements-dev.txt python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ - --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json + ${{ github.workspace }}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json # python ./tools/ci_build/build.py \ # --build_dir $HOME/onnxlibrary/macabi_release_v20230327_2320 \ From 483f7b7a495732632aa5d9f5215abdfce2c468fd Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Tue, 15 Oct 2024 10:07:18 +0800 Subject: [PATCH 13/32] Add circleci job --- .circleci/config.yaml | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .circleci/config.yaml diff --git a/.circleci/config.yaml b/.circleci/config.yaml new file mode 100644 index 0000000000000..7d0017f94e644 --- /dev/null +++ b/.circleci/config.yaml @@ -0,0 +1,47 @@ +version: 2.1 +parameters: + xcode-version: + type: string + default: "15.4.0" + macos-resource-class: + type: string + default: macos.m1.medium.gen1 + +# Jobs ------------------------------------------------------------------------- +jobs: + build-and-test-xcframework: + macos: + xcode: << pipeline.parameters.xcode-version >> + resource_class: << pipeline.parameters.macos-resource-class >> + + shell: /bin/bash --login -o pipefail + + steps: + - run: + name: check Xcode version and Python 3 + command: | + /usr/bin/xcodebuild -version + python3 --version + python --version + which python3 + echo $CIRCLE_WORKING_DIRECTORY + - checkout + - run: + name: create directory to store the library + command: | + mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 + - run: + name: buld with build_apple_framework.py + command: | + export PYTHONPATH=${CIRCLE_WORKING_DIRECTORY}/tools/python:$PYTHONPATH + pip install -r ${CIRCLE_WORKING_DIRECTORY}/requirements-dev.txt + python3 ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + --include_ops_by_config=${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ + ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json + + +workflows: + version: 2 + build-and-test-xcframework: + jobs: + - build-and-test-xcframework From 95c0ba43d2da96fde69b2950eeed5bfe8ad2b30e Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 10:37:45 +0800 Subject: [PATCH 14/32] Rename config.yaml to config.yml --- .circleci/{config.yaml => config.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .circleci/{config.yaml => config.yml} (100%) diff --git a/.circleci/config.yaml b/.circleci/config.yml similarity index 100% rename from .circleci/config.yaml rename to .circleci/config.yml From 7489ecd35bb83cfb5a5db2077fcd62bbd64fa750 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Tue, 15 Oct 2024 14:05:36 +0800 Subject: [PATCH 15/32] Update .circleci config.yaml --- .circleci/config.yaml | 51 +++++++++++++++++++ ...ult_full_ios_framework_build_settings.json | 6 +-- 2 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .circleci/config.yaml diff --git a/.circleci/config.yaml b/.circleci/config.yaml new file mode 100644 index 0000000000000..c14b5f66b1556 --- /dev/null +++ b/.circleci/config.yaml @@ -0,0 +1,51 @@ +version: 2.1 +parameters: + xcode-version: + type: string + default: "15.4.0" + macos-resource-class: + type: string + default: macos.m1.medium.gen1 + +# Jobs ------------------------------------------------------------------------- +jobs: + build-and-test-xcframework: + macos: + xcode: << pipeline.parameters.xcode-version >> + resource_class: << pipeline.parameters.macos-resource-class >> + + shell: /bin/bash --login -o pipefail + + steps: + - run: + name: check Xcode version and Python 3 + command: | + /usr/bin/xcodebuild -version + python3 --version + python --version + which python3 + echo $CIRCLE_WORKING_DIRECTORY + - checkout + - run: + name: create directory to store the library + command: | + mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 + - run: + name: install tools for build + command: | + brew install cmake + pip install -r ${CIRCLE_WORKING_DIRECTORY}/requirements-dev.txt + - run: + name: build with build_apple_framework.py + command: | + export PYTHONPATH=${CIRCLE_WORKING_DIRECTORY}/tools/python:$PYTHONPATH + python3 ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ + --include_ops_by_config=${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ + ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json + + +workflows: + version: 2 + build-and-test-xcframework: + jobs: + - build-and-test-xcframework diff --git a/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json b/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json index 4bc978956d7fc..e50ee3de7221d 100644 --- a/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json +++ b/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json @@ -24,17 +24,17 @@ "--ios", "--use_xcode", "--use_xnnpack", - "--apple_deploy_target=12.0" + "--apple_deploy_target=16.6" ], "iphonesimulator": [ "--ios", "--use_xcode", "--use_xnnpack", - "--apple_deploy_target=12.0" + "--apple_deploy_target=16.6" ], "macabi":[ "--macos=Catalyst", - "--apple_deploy_target=14.0" + "--apple_deploy_target=16.6" ] } } From 084ec3995a8f3d41578c489d306ca6aba665cfc2 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Tue, 15 Oct 2024 14:21:37 +0800 Subject: [PATCH 16/32] Fix lipo path --- tools/ci_build/github/apple/build_apple_framework.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/github/apple/build_apple_framework.py b/tools/ci_build/github/apple/build_apple_framework.py index e17bcd65d8814..33497f3259324 100644 --- a/tools/ci_build/github/apple/build_apple_framework.py +++ b/tools/ci_build/github/apple/build_apple_framework.py @@ -66,7 +66,11 @@ def _build_for_apple_sysroot( framework_dir = os.path.join( build_dir_current_arch, build_config, - build_config + "-" + sysroot, + ( + '' + if sysroot == "macabi" + else build_config + "-" + sysroot + ), ( "onnxruntime.framework" if build_dynamic_framework From fcad7649b45841c5f39d69d31b489382f496cd6d Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Tue, 15 Oct 2024 14:33:38 +0800 Subject: [PATCH 17/32] Store artifacts --- .circleci/config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.circleci/config.yaml b/.circleci/config.yaml index c14b5f66b1556..9f0cb236a7cdf 100644 --- a/.circleci/config.yaml +++ b/.circleci/config.yaml @@ -43,7 +43,14 @@ jobs: --include_ops_by_config=${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json + - run: + name: archive + command: | + cd $HOME/onnxlibrary/ + tar -cvf onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 + - store_artifacts: + path: $HOME/onnxlibrary/macabi_release_v20230327_2320/ workflows: version: 2 build-and-test-xcframework: From 55538843560b73aa1407308353e512d7aae86e5d Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Tue, 15 Oct 2024 14:38:27 +0800 Subject: [PATCH 18/32] Remove config.yaml --- .circleci/config.yaml | 58 ------------------------------------------- .circleci/config.yml | 15 +++++++++-- 2 files changed, 13 insertions(+), 60 deletions(-) delete mode 100644 .circleci/config.yaml diff --git a/.circleci/config.yaml b/.circleci/config.yaml deleted file mode 100644 index 9f0cb236a7cdf..0000000000000 --- a/.circleci/config.yaml +++ /dev/null @@ -1,58 +0,0 @@ -version: 2.1 -parameters: - xcode-version: - type: string - default: "15.4.0" - macos-resource-class: - type: string - default: macos.m1.medium.gen1 - -# Jobs ------------------------------------------------------------------------- -jobs: - build-and-test-xcframework: - macos: - xcode: << pipeline.parameters.xcode-version >> - resource_class: << pipeline.parameters.macos-resource-class >> - - shell: /bin/bash --login -o pipefail - - steps: - - run: - name: check Xcode version and Python 3 - command: | - /usr/bin/xcodebuild -version - python3 --version - python --version - which python3 - echo $CIRCLE_WORKING_DIRECTORY - - checkout - - run: - name: create directory to store the library - command: | - mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 - - run: - name: install tools for build - command: | - brew install cmake - pip install -r ${CIRCLE_WORKING_DIRECTORY}/requirements-dev.txt - - run: - name: build with build_apple_framework.py - command: | - export PYTHONPATH=${CIRCLE_WORKING_DIRECTORY}/tools/python:$PYTHONPATH - python3 ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ - --include_ops_by_config=${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ - ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json - - - run: - name: archive - command: | - cd $HOME/onnxlibrary/ - tar -cvf onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 - - - store_artifacts: - path: $HOME/onnxlibrary/macabi_release_v20230327_2320/ -workflows: - version: 2 - build-and-test-xcframework: - jobs: - - build-and-test-xcframework diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d0017f94e644..b68636aac34da 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,15 +31,26 @@ jobs: command: | mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 - run: - name: buld with build_apple_framework.py + name: install tools for build command: | - export PYTHONPATH=${CIRCLE_WORKING_DIRECTORY}/tools/python:$PYTHONPATH + brew install cmake pip install -r ${CIRCLE_WORKING_DIRECTORY}/requirements-dev.txt + - run: + name: build with build_apple_framework.py + command: | + export PYTHONPATH=${CIRCLE_WORKING_DIRECTORY}/tools/python:$PYTHONPATH python3 ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ --include_ops_by_config=${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json + - run: + name: archive the build results + command: | + cd $HOME/onnxlibrary/ + tar -cvf onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 + - store_artifacts: + path: $HOME/onnxlibrary/macabi_release_v20230327_2320/ workflows: version: 2 build-and-test-xcframework: From 3e7b44b59c629135d813f068cec60956c4419542 Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 15:47:24 +0800 Subject: [PATCH 19/32] store_artifacts tar --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b68636aac34da..a5734e6301e8c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,7 +50,7 @@ jobs: tar -cvf onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 - store_artifacts: - path: $HOME/onnxlibrary/macabi_release_v20230327_2320/ + path: $HOME/onnxlibrary/onnxruntime_xcf.tar workflows: version: 2 build-and-test-xcframework: From cd791f2a6e1a721aab42b0129798dbde45744c25 Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 15:51:38 +0800 Subject: [PATCH 20/32] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a5734e6301e8c..d86e857c7c10d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,6 +51,7 @@ jobs: - store_artifacts: path: $HOME/onnxlibrary/onnxruntime_xcf.tar + destination: onnxruntime_xcf.tar workflows: version: 2 build-and-test-xcframework: From a6b610b7802cd0edb2b036b37823a60fe170791c Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 17:55:21 +0800 Subject: [PATCH 21/32] Update config.yml --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d86e857c7c10d..d0d37e768a6d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,11 +46,10 @@ jobs: - run: name: archive the build results command: | - cd $HOME/onnxlibrary/ - tar -cvf onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 + tar -cvf /Users/distiller/project/onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 - store_artifacts: - path: $HOME/onnxlibrary/onnxruntime_xcf.tar + path: /onnxruntime_xcf.tar destination: onnxruntime_xcf.tar workflows: version: 2 From 5331cb8ff93a5589d222690b3650e2f9f4f9c4c4 Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 19:39:16 +0800 Subject: [PATCH 22/32] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d0d37e768a6d9..5cb84228f3a25 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ jobs: tar -cvf /Users/distiller/project/onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 - store_artifacts: - path: /onnxruntime_xcf.tar + path: /Users/distiller/project/onnxruntime_xcf.tar destination: onnxruntime_xcf.tar workflows: version: 2 From 5d05a199cb2985a79076985a25280ad6cfb41760 Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 21:34:32 +0800 Subject: [PATCH 23/32] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5cb84228f3a25..3febcb66fa5d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: - run: name: archive the build results command: | - tar -cvf /Users/distiller/project/onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320 + tar -cvf /Users/distiller/project/onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320/framework_out - store_artifacts: path: /Users/distiller/project/onnxruntime_xcf.tar From 9acb8e0f8ccaaa42f12f61e3b62b434be8399118 Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 21:37:48 +0800 Subject: [PATCH 24/32] Update hws_mobile_package.required_operators.config --- .../github/apple/hws_mobile_package.required_operators.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index dc41125798609..3735a048aac24 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -12,7 +12,7 @@ com.microsoft;1;DynamicQuantizeMatMul,FusedConv,FusedGemm,FusedMatMul,Gelu,MatMu com.microsoft;1;QLinearLeakyRelu # Hanwang HWR operators -ai.onnx;13;ConvInteger +ai.onnx;10;ConvInteger com.microsoft;1;DynamicQuantizeLSTM ai.onnx;6;Relu ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round From a64ff1a99af1add4690d0e142368f6c6d64b191c Mon Sep 17 00:00:00 2001 From: pacowong Date: Tue, 15 Oct 2024 23:47:46 +0800 Subject: [PATCH 25/32] Update hws_mobile_package.required_operators.config --- .../github/apple/hws_mobile_package.required_operators.config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index 3735a048aac24..a00fd4e8b43e8 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -14,6 +14,7 @@ com.microsoft;1;QLinearLeakyRelu # Hanwang HWR operators ai.onnx;10;ConvInteger com.microsoft;1;DynamicQuantizeLSTM +ai.onnx;7;AveragePool ai.onnx;6;Relu ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round ai.onnx;8;Min,Max From 11a70902b8fb638b37d54d83784c803321d67595 Mon Sep 17 00:00:00 2001 From: pacowong Date: Wed, 16 Oct 2024 09:23:09 +0800 Subject: [PATCH 26/32] Update hws_mobile_package.required_operators.config --- .../apple/hws_mobile_package.required_operators.config | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index a00fd4e8b43e8..cd9c9a5b09365 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -12,12 +12,13 @@ com.microsoft;1;DynamicQuantizeMatMul,FusedConv,FusedGemm,FusedMatMul,Gelu,MatMu com.microsoft;1;QLinearLeakyRelu # Hanwang HWR operators -ai.onnx;10;ConvInteger -com.microsoft;1;DynamicQuantizeLSTM -ai.onnx;7;AveragePool +ai.onnx;1;ConvTranspose ai.onnx;6;Relu -ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round +ai.onnx;7;AveragePool ai.onnx;8;Min,Max +ai.onnx;10;ConvInteger +ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round +com.microsoft;1;DynamicQuantizeLSTM # Voice activity detector ai.onnx;16;Add,Cast,Concat,ConstantOfShape,Conv,Equal,Gather,Identity,If,LSTM,Log,Mul,Neg,Pad,Pow,ReduceMean,Relu,Reshape,Shape,Sigmoid,Slice,Sqrt,Squeeze,Transpose,Unsqueeze From 432a98e11e07d6c3b3312f9bee40db8c7e9b82f3 Mon Sep 17 00:00:00 2001 From: pacowong Date: Wed, 16 Oct 2024 12:21:52 +0800 Subject: [PATCH 27/32] Update hws_mobile_package.required_operators.config --- .../github/apple/hws_mobile_package.required_operators.config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index cd9c9a5b09365..bb041998a193e 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -19,6 +19,7 @@ ai.onnx;8;Min,Max ai.onnx;10;ConvInteger ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round com.microsoft;1;DynamicQuantizeLSTM +com.microsoft.nchwc;1;AveragePool # Voice activity detector ai.onnx;16;Add,Cast,Concat,ConstantOfShape,Conv,Equal,Gather,Identity,If,LSTM,Log,Mul,Neg,Pad,Pow,ReduceMean,Relu,Reshape,Shape,Sigmoid,Slice,Sqrt,Squeeze,Transpose,Unsqueeze From 0239ac6baa03c4e6a8f6a02aa5550135830dd49e Mon Sep 17 00:00:00 2001 From: pacowong Date: Wed, 16 Oct 2024 12:25:21 +0800 Subject: [PATCH 28/32] Update hws_mobile_package.required_operators.config --- .../github/apple/hws_mobile_package.required_operators.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index bb041998a193e..cf5062de05ba1 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -19,7 +19,7 @@ ai.onnx;8;Min,Max ai.onnx;10;ConvInteger ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round com.microsoft;1;DynamicQuantizeLSTM -com.microsoft.nchwc;1;AveragePool +com.microsoft;1;NhwcConv # Voice activity detector ai.onnx;16;Add,Cast,Concat,ConstantOfShape,Conv,Equal,Gather,Identity,If,LSTM,Log,Mul,Neg,Pad,Pow,ReduceMean,Relu,Reshape,Shape,Sigmoid,Slice,Sqrt,Squeeze,Transpose,Unsqueeze From a02789b30f7e5b89bfbb08f00f7c00a09be6a0ab Mon Sep 17 00:00:00 2001 From: pacowong Date: Wed, 16 Oct 2024 12:26:35 +0800 Subject: [PATCH 29/32] Update hws_mobile_package.required_operators.config --- .../github/apple/hws_mobile_package.required_operators.config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index cf5062de05ba1..fc400ad59813e 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -20,6 +20,7 @@ ai.onnx;10;ConvInteger ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round com.microsoft;1;DynamicQuantizeLSTM com.microsoft;1;NhwcConv +com.microsoft.nchwc;1;AveragePool # Voice activity detector ai.onnx;16;Add,Cast,Concat,ConstantOfShape,Conv,Equal,Gather,Identity,If,LSTM,Log,Mul,Neg,Pad,Pow,ReduceMean,Relu,Reshape,Shape,Sigmoid,Slice,Sqrt,Squeeze,Transpose,Unsqueeze From be09afeeda27aaac326242114fb2cc6204e754fa Mon Sep 17 00:00:00 2001 From: pacowong Date: Wed, 16 Oct 2024 13:55:02 +0800 Subject: [PATCH 30/32] Update hws_mobile_package.required_operators.config --- .../github/apple/hws_mobile_package.required_operators.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index fc400ad59813e..7c328bd17f3b1 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -20,7 +20,7 @@ ai.onnx;10;ConvInteger ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round com.microsoft;1;DynamicQuantizeLSTM com.microsoft;1;NhwcConv -com.microsoft.nchwc;1;AveragePool +com.microsoft.nchwc;1;AveragePool,ReorderInput # Voice activity detector ai.onnx;16;Add,Cast,Concat,ConstantOfShape,Conv,Equal,Gather,Identity,If,LSTM,Log,Mul,Neg,Pad,Pow,ReduceMean,Relu,Reshape,Shape,Sigmoid,Slice,Sqrt,Squeeze,Transpose,Unsqueeze From ef050e8c86d3464183c7b2ed60bad7f61b9d8449 Mon Sep 17 00:00:00 2001 From: pacowong Date: Thu, 17 Oct 2024 17:18:23 +0800 Subject: [PATCH 31/32] Update hws_mobile_package.required_operators.config --- .../github/apple/hws_mobile_package.required_operators.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config index 7c328bd17f3b1..c98ff0628d73e 100644 --- a/tools/ci_build/github/apple/hws_mobile_package.required_operators.config +++ b/tools/ci_build/github/apple/hws_mobile_package.required_operators.config @@ -20,7 +20,7 @@ ai.onnx;10;ConvInteger ai.onnx;11;AveragePool,ConvTranspose,Split,ReduceMin,ReduceMean,ReduceMax,ReduceSum,ReduceProd,Clip,Ceil,Round com.microsoft;1;DynamicQuantizeLSTM com.microsoft;1;NhwcConv -com.microsoft.nchwc;1;AveragePool,ReorderInput +com.microsoft.nchwc;1;AveragePool,ReorderInput,Conv,ReorderOutput # Voice activity detector ai.onnx;16;Add,Cast,Concat,ConstantOfShape,Conv,Equal,Gather,Identity,If,LSTM,Log,Mul,Neg,Pad,Pow,ReduceMean,Relu,Reshape,Shape,Sigmoid,Slice,Sqrt,Squeeze,Transpose,Unsqueeze From ef04ce32a13fb1d27c7db4a3b30f2f0206c488e0 Mon Sep 17 00:00:00 2001 From: pacowong Date: Fri, 18 Oct 2024 09:45:59 +0800 Subject: [PATCH 32/32] Change directory with tar --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3febcb66fa5d7..0ed7072bbaca0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: - run: name: archive the build results command: | - tar -cvf /Users/distiller/project/onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320/framework_out + tar -cvf /Users/distiller/project/onnxruntime_xcf.tar -C $HOME/onnxlibrary/macabi_release_v20230327_2320/framework_out . - store_artifacts: path: /Users/distiller/project/onnxruntime_xcf.tar