Skip to content

Commit e495750

Browse files
Upgrade current MacOS-13 to 14 (microsoft#23293)
### Description Upgrade current MacOS-13 to 14 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> - [x] Update the RN to 0.73.x+ to have the newer version of boost --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b3aa5a3 commit e495750

File tree

17 files changed

+54
-21
lines changed

17 files changed

+54
-21
lines changed

cmake/CMakePresets.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,29 @@
109109
"rhs": "Darwin"
110110
}
111111
},
112+
{
113+
"name": "arm64-osx",
114+
"inherits": [
115+
"unit-test"
116+
],
117+
"generator": "Xcode",
118+
"binaryDir": "${sourceParentDir}/cmake_build/arm64-osx",
119+
"installDir": "${sourceParentDir}/cmake_build/out",
120+
"cacheVariables": {
121+
"CMAKE_OSX_ARCHITECTURES": "arm64",
122+
"onnxruntime_BUILD_SHARED_LIB": true,
123+
"onnxruntime_USE_XNNPACK": false,
124+
"onnxruntime_USE_COREML": true,
125+
"onnxruntime_BUILD_OBJC": true,
126+
"onnxruntime_BUILD_APPLE_FRAMEWORK": true,
127+
"CMAKE_CONFIGURATION_TYPES": "Debug;Release"
128+
},
129+
"condition": {
130+
"type": "equals",
131+
"lhs": "${hostSystemName}",
132+
"rhs": "Darwin"
133+
}
134+
},
112135
{
113136
"name": "x64-osx-vcpkg",
114137
"inherits": [

js/react_native/e2e/.detoxrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ module.exports = {
3838
simulator: {
3939
type: 'ios.simulator',
4040
device: {
41-
type: 'iPhone 14',
42-
os: 'iOS 16.4',
41+
type: 'iPhone 15',
42+
os: 'iOS 17.4',
4343
},
4444
},
4545
attached: {

onnxruntime/core/providers/coreml/builders/impl/base_op_builder.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "core/providers/coreml/builders/helper.h"
77
#include "core/providers/coreml/builders/impl/base_op_builder.h"
88
#include "core/providers/coreml/builders/model_builder.h"
9+
#include "core/providers/coreml/model/host_utils.h"
910
#include "core/providers/shared/utils/utils.h"
1011

1112
using namespace CoreML::Specification;
@@ -113,10 +114,12 @@ bool BaseOpBuilder::IsInputDtypeSupport(const Node& node, size_t idx,
113114
return true;
114115
}
115116

117+
#if CAN_BUILD_COREML6_OR_LATER
116118
// only MLProgram support FP16
117119
if (input_params.create_mlprogram && input_type == ONNX_NAMESPACE::TensorProto_DataType_FLOAT16) {
118120
return true;
119121
}
122+
#endif
120123

121124
LOGS(logger, VERBOSE) << "[" << node.OpType() << "] Input type: [" << input_type << "] is not currently supported";
122125
return false;

onnxruntime/core/providers/coreml/model/host_utils.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@
4343
#define API_AVAILABLE_COREML7 API_AVAILABLE(macos(14), ios(17))
4444
#define API_AVAILABLE_COREML8 API_AVAILABLE(macos(15), ios(18))
4545

46-
// @available is used in implementation code
46+
// The previous macros are used in header files to declare the availability of the APIs.
47+
// The following macros are used in build time checks to determine if the APIs are available.
48+
#define CAN_BUILD_COREML8_OR_LATER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
49+
#define CAN_BUILD_COREML7_OR_LATER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000)
50+
#define CAN_BUILD_COREML6_OR_LATER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 130000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000)
51+
52+
// @available is used in implementation code to check the availability of the APIs at runtime.
4753
// Base required OS to run CoreML Specification Version 4 (Core ML 3)
4854
#define HAS_COREML3_OR_LATER @available(macOS 10.15, iOS 13, *)
4955
#define HAS_COREML4_OR_LATER @available(macOS 11, iOS 14, *)

onnxruntime/core/providers/coreml/model/model.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,12 @@ void ProfileComputePlan(NSURL* compileUrl, MLModelConfiguration* config) {
363363
#endif
364364
}
365365

366-
#if __has_include(<CoreML/MLOptimizationHints.h>)
366+
#if __has_include(<CoreML/MLOptimizationHints.h>) && CAN_BUILD_COREML8_OR_LATER
367367
#define HAS_COREMLOPTIMIZATIONHINT 1
368368
#else
369369
#define HAS_COREMLOPTIMIZATIONHINT 0
370370
#endif
371371

372-
API_AVAILABLE_COREML8
373372
void ConfigureOptimizationHints(MLModelConfiguration* config, const CoreMLOptions& coreml_options) {
374373
#if HAS_COREMLOPTIMIZATIONHINT
375374
MLOptimizationHints* optimizationHints = [[MLOptimizationHints alloc] init];

tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extends:
5656
# Update the pool with your team's 1ES hosted pool.
5757
pool:
5858
name: "Azure Pipelines"
59-
image: "macOS-13"
59+
image: "macOS-14"
6060
os: macOS
6161
sdl:
6262
sourceAnalysisPool:

tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ stages:
1111
clean: all
1212
timeoutInMinutes: 120
1313
pool:
14-
vmImage: 'macOS-13'
14+
vmImage: 'macOS-14'
1515

1616
variables:
1717
- name: OnnxRuntimeBuildDirectory

tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ stages:
1111
workspace:
1212
clean: all
1313
pool:
14-
vmImage: 'macOS-13'
14+
vmImage: 'macOS-14'
1515

1616
variables:
1717
- name: OnnxRuntimeBuildDirectory

tools/ci_build/github/azure-pipelines/post-merge-jobs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ stages:
427427
- job: IosDynamicFramework
428428
timeoutInMinutes: 120
429429
pool:
430-
vmImage: "macOS-13"
430+
vmImage: "macOS-14"
431431

432432
steps:
433433
- task: UsePythonVersion@0
@@ -463,7 +463,7 @@ stages:
463463
- job: IosMinimalTrainingBuild
464464
timeoutInMinutes: 120
465465
pool:
466-
vmImage: "macOS-13"
466+
vmImage: "macOS-14"
467467

468468
steps:
469469
- task: UsePythonVersion@0

tools/ci_build/github/azure-pipelines/py-package-test-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ stages:
2929
parameters:
3030
job_name: Test_MAC_Wheels
3131
machine_pool:
32-
vmImage: 'macOS-13'
32+
vmImage: 'macOS-14'
3333
itemPattern: '*/*mac*x86_64.whl'
3434
arch: 'x86_64'
3535
- template: templates/py-package-smoking-test.yml

0 commit comments

Comments
 (0)