Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2b8129d
Adding x64 to the ARCHs
jchen351 Jan 8, 2025
a494b38
Update macos to 14
jchen351 Jan 8, 2025
6a5c760
update xcode version
jchen351 Jan 8, 2025
3bd93d6
API_AVAILABLE(macos(15), ios(18))
jchen351 Jan 8, 2025
2058317
adding arm64 preset
jchen351 Jan 8, 2025
09f793f
merge with main
jchen351 Jan 9, 2025
e6e3747
Merge branch 'main' into Cjian/macos_14
jchen351 Jan 9, 2025
2eb900a
Adding preprocessor define for checking CAN_USE_COREML8_OR_LATER
jchen351 Jan 10, 2025
f8d1e9b
Adding preprocessor define for checking CAN_USE_COREML8_OR_LATER
jchen351 Jan 10, 2025
f142392
rolling back ios changes
jchen351 Jan 10, 2025
f4accbe
Apply suggestions from code review
jchen351 Jan 10, 2025
9af881a
update project.pbxproj
jchen351 Jan 14, 2025
f1a195b
using the new Podfile
jchen351 Jan 14, 2025
0ebf33a
update Podfile and comment out :mac_catalyst_enabled => false,
jchen351 Jan 14, 2025
e858aa7
Merge branch 'main' into Cjian/macos_14
jchen351 Feb 26, 2025
402f047
Merge branch 'main' into Cjian/macos_14
jchen351 Mar 7, 2025
48574ef
Merge branch 'main' into Cjian/macos_14
jchen351 Mar 7, 2025
275f799
Merge remote-tracking branch 'origin/main' into Cjian/macos_14
jchen351 Mar 7, 2025
d300649
update ios target
jchen351 Mar 7, 2025
59e7ccc
Trying apple_deploy_target to 16.0
jchen351 Mar 12, 2025
af7c0d4
Rolling back 16.0 and add condition to check if FP16 ios supported
jchen351 Mar 12, 2025
e60e3ca
Reformat code
jchen351 Mar 12, 2025
df6ef97
Update #define CAN_BUILD_COREML6_OR_LATER (__MAC_OS_X_VERSION_MAX_ALL…
jchen351 Mar 13, 2025
940d3f3
Merge branch 'main' into Cjian/macos_14
jchen351 Mar 13, 2025
f1bfade
Update #if __has_include(<CoreML/MLOptimizationHints.h>) && CAN_BUILD…
jchen351 Mar 13, 2025
f8c5b09
Lint update
jchen351 Mar 14, 2025
12a84c8
Upgrade simulator to iPhone 15 iOS 17.4
jchen351 Mar 17, 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
2 changes: 1 addition & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
--osx_arch=${{ matrix.target_arch }}

Vcpkg:
runs-on: macos-13
runs-on: macOS-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
23 changes: 23 additions & 0 deletions cmake/CMakePresets.json
Comment thread
jchen351 marked this conversation as resolved.
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
12 changes: 11 additions & 1 deletion js/react_native/e2e/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ end
target 'OnnxruntimeModuleExample' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])
]# Check both symbol and string keys with default value
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => false
)

use_frameworks!

Expand All @@ -33,6 +40,9 @@ post_install do |installer|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'

# TODO: remove this once we migrate the Pipelines to use arm64 MacOS
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
end
Expand Down
14 changes: 11 additions & 3 deletions js/react_native/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ end
def shared
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

# Check both symbol and string keys with default value
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => false
)
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

Expand Down Expand Up @@ -44,7 +50,9 @@ post_install do |installer|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'
# TODO: remove this once we migrate the Pipelines to use arm64 MacOS
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
end
end
end
24 changes: 13 additions & 11 deletions onnxruntime/core/providers/coreml/model/model.mm
Original file line number Diff line number Diff line change
Expand Up @@ -369,20 +369,22 @@ void ProfileComputePlan(NSURL* compileUrl, MLModelConfiguration* config) {
#define HAS_COREMLOPTIMIZATIONHINT 0
#endif

API_AVAILABLE_COREML8

void ConfigureOptimizationHints(MLModelConfiguration* config, const CoreMLOptions& coreml_options) {
Comment thread
jchen351 marked this conversation as resolved.
if (HAS_COREML8_OR_LATER) {
#if HAS_COREMLOPTIMIZATIONHINT
MLOptimizationHints* optimizationHints = [[MLOptimizationHints alloc] init];
if (coreml_options.UseStrategy("FastPrediction")) {
optimizationHints.specializationStrategy = MLSpecializationStrategyFastPrediction;
config.optimizationHints = optimizationHints;
} else if (coreml_options.UseStrategy("Default")) {
optimizationHints.specializationStrategy = MLSpecializationStrategyDefault;
config.optimizationHints = optimizationHints;
} else {
// not set
}
MLOptimizationHints* optimizationHints = [[MLOptimizationHints alloc] init];
if (coreml_options.UseStrategy("FastPrediction")) {
optimizationHints.specializationStrategy = MLSpecializationStrategyFastPrediction;
config.optimizationHints = optimizationHints;
} else if (coreml_options.UseStrategy("Default")) {
optimizationHints.specializationStrategy = MLSpecializationStrategyDefault;
config.optimizationHints = optimizationHints;
} else {
// not set
}
#endif
}
}

Status CompileOrReadCachedModel(NSURL* modelUrl, const CoreMLOptions& coreml_options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
workspace:
clean: all
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
MACOSX_DEPLOYMENT_TARGET: '13.3'
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/github/azure-pipelines/mac-ios-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ pr:
jobs:
- job: iOS_CI_on_Mac
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
PROTO_CACHE_DIR: $(Pipeline.Workspace)/proto_ccache
ORT_CACHE_DIR: $(Pipeline.Workspace)/ort_ccache
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
# Note: Keep the Xcode version and iOS simulator version compatible.
# Check the table here to see what iOS simulator versions are supported by a particular Xcode version:
# https://developer.apple.com/support/xcode/
XCODE_VERSION: 14.3.1
XCODE_VERSION: 15.3.0
IOS_SIMULATOR_RUNTIME_VERSION: 16.4
timeoutInMinutes: 150
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ stages:
displayName: "Set common variables"

pool:
vmImage: "macOS-13"
vmImage: "macOS-14"

timeoutInMinutes: 5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stages:
clean: all
timeoutInMinutes: 120
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'

variables:
- name: OnnxRuntimeBuildDirectory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stages:
workspace:
clean: all
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'

variables:
- name: OnnxRuntimeBuildDirectory
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/github/azure-pipelines/post-merge-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ stages:
- job: IosDynamicFramework
timeoutInMinutes: 120
pool:
vmImage: "macOS-13"
vmImage: "macOS-14"

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -459,7 +459,7 @@ stages:
- job: IosMinimalTrainingBuild
timeoutInMinutes: 120
pool:
vmImage: "macOS-13"
vmImage: "macOS-14"

steps:
- task: UsePythonVersion@0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stages:
parameters:
job_name: Test_MAC_Wheels
machine_pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
itemPattern: '*/*mac*x86_64.whl'
- template: templates/py-package-smoking-test.yml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ stages:
workspace:
clean: all
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
MACOSX_DEPLOYMENT_TARGET: '13.3'
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
workspace:
clean: all
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
- name: runCodesignValidationInjection
value: false
Expand Down
6 changes: 3 additions & 3 deletions tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ stages:
workspace:
clean: all
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
timeoutInMinutes: 300
steps:
- template: set-version-number-variables-step.yml
Expand Down Expand Up @@ -816,7 +816,7 @@ stages:

- template: ../nuget/templates/test_macos.yml
parameters:
AgentPool : macOS-13
AgentPool : macOS-14
ArtifactSuffix: 'CPU'

- template: ../nodejs/templates/test_win.yml
Expand Down Expand Up @@ -852,4 +852,4 @@ stages:
OS: MacOS
BuildId: ${{ parameters.BuildId }}
SpecificArtifact: ${{ parameters.SpecificArtifact }}
PoolName: 'macOS-13'
PoolName: 'macOS-14'
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ stages:
jobs:
- job: MacOS_C_API_Package_Publish
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
steps:
- checkout: none
- template: flex-downloadPipelineArtifact.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
PROTO_CACHE_DIR: $(Pipeline.Workspace)/ccache_proto
ORT_CACHE_DIR: $(Pipeline.Workspace)/ccache_ort
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
timeoutInMinutes: 300
steps:
- checkout: self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ stages:

- job: Build_Ios_Pod_For_React_Native
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'

timeoutInMinutes: 90

Expand Down Expand Up @@ -103,7 +103,7 @@ stages:
jobs:
- job: ReactNative_CI
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
runCodesignValidationInjection: false
timeoutInMinutes: 90
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ stages:
displayName: "Build iOS package for variant: ${{ parameters.packageVariant}}"

pool:
vmImage: "macOS-13"
vmImage: "macOS-14"

variables:
# Note: Keep the Xcode version and iOS simulator version compatible.
# Check the table here to see what iOS simulator versions are supported by a particular Xcode version:
# https://developer.apple.com/support/xcode/
xcodeVersion: "14.3.1"
xcodeVersion: "15.3.0"
iosSimulatorRuntimeVersion: "16.4"

ortPodVersion: $[stageDependencies.IosPackaging_SetCommonVariables.j.outputs['SetCommonVariables.ORT_POD_VERSION']]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
parameters:
- name: xcodeVersion
type: string
default: "14.3.1"
default: "15.3.0"

steps:
- bash: |
Expand Down