Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade current MacOS-13 to 14 #23293

Merged
merged 27 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from 19 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
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
4 changes: 4 additions & 0 deletions onnxruntime/core/providers/coreml/model/host_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
#define API_AVAILABLE_COREML7 API_AVAILABLE(macos(14), ios(17))
#define API_AVAILABLE_COREML8 API_AVAILABLE(macos(15), ios(18))

// The previous macros are used in header files to declare the availability of the APIs.
// The following macros are used in implementation files to check the availability of the APIs.
#define CAN_USE_COREML8_OR_LATER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)

// @available is used in implementation code
// Base required OS to run CoreML Specification Version 4 (Core ML 3)
#define HAS_COREML3_OR_LATER @available(macOS 10.15, iOS 13, *)
Expand Down
3 changes: 1 addition & 2 deletions onnxruntime/core/providers/coreml/model/model.mm
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,8 @@ void ProfileComputePlan(NSURL* compileUrl, MLModelConfiguration* config) {
#define HAS_COREMLOPTIMIZATIONHINT 0
#endif

API_AVAILABLE_COREML8
void ConfigureOptimizationHints(MLModelConfiguration* config, const CoreMLOptions& coreml_options) {
#if HAS_COREMLOPTIMIZATIONHINT
#if HAS_COREMLOPTIMIZATIONHINT && CAN_USE_COREML8_OR_LATER
MLOptimizationHints* optimizationHints = [[MLOptimizationHints alloc] init];
if (coreml_options.UseStrategy("FastPrediction")) {
optimizationHints.specializationStrategy = MLSpecializationStrategyFastPrediction;
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
6 changes: 3 additions & 3 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,16 +31,16 @@ 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
IOS_SIMULATOR_RUNTIME_VERSION: 16.4
XCODE_VERSION: 15.4.0
IOS_SIMULATOR_RUNTIME_VERSION: 17.5
timeoutInMinutes: 150
steps:
- template: templates/use-xcode-version.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extends:
# Update the pool with your team's 1ES hosted pool.
pool:
name: "Azure Pipelines"
image: "macOS-13"
image: "macOS-14"
os: macOS
sdl:
sourceAnalysisPool:
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 @@ -427,7 +427,7 @@ stages:
- job: IosDynamicFramework
timeoutInMinutes: 120
pool:
vmImage: "macOS-13"
vmImage: "macOS-14"

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -463,7 +463,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 @@ -199,7 +199,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 @@ -24,6 +24,8 @@ jobs:
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
workspace:
clean: all
pool:
vmImage: 'macOS-14'
variables:
runCodesignValidationInjection: false
ANDROID_AVD_HOME: $(Agent.TempDirectory)
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 @@ -123,7 +123,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 @@ -797,7 +797,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 @@ -833,4 +833,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 @@ -64,7 +64,7 @@ stages:
- job: ReactNative_CI_iOS
pool:
name: 'Azure Pipelines'
image: 'macOS-13'
image: 'macOS-14'
os: 'macOS'

timeoutInMinutes: 120
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
Loading