diff --git a/.pipelines/macos-ios-cocoapods-publishing.yml b/.pipelines/macos-ios-cocoapods-publishing.yml index b4dc0be3d..f6f2a08c4 100644 --- a/.pipelines/macos-ios-cocoapods-publishing.yml +++ b/.pipelines/macos-ios-cocoapods-publishing.yml @@ -2,7 +2,7 @@ parameters: - name: ort_version displayName: 'OnnxRuntime version' type: string - default: '1.18.0' + default: '1.20.0' - name: build_config displayName: 'Build Configuration' diff --git a/.pipelines/stages/jobs/macos-ios-cocoapods-packaging-job.yml b/.pipelines/stages/jobs/macos-ios-cocoapods-packaging-job.yml index e6bc458a8..7f75279fa 100644 --- a/.pipelines/stages/jobs/macos-ios-cocoapods-packaging-job.yml +++ b/.pipelines/stages/jobs/macos-ios-cocoapods-packaging-job.yml @@ -10,6 +10,8 @@ jobs: vmImage: 'macOS-latest' variables: buildSettingsFile: "tools/ci_build/github/apple/default_full_apple_framework_build_settings.json" + cPodName: onnxruntime-genai-c + objcPodName: onnxruntime-genai-objc workspace: clean: all @@ -29,12 +31,38 @@ jobs: inputs: script: | set -e -x - python tools/ci_build/github/apple/build_and_assemble_apple_pods.py \ + python3 -m pip install requests huggingface_hub + python3 tools/ci_build/github/apple/build_and_assemble_apple_pods.py \ --build-dir "$(Build.BinariesDirectory)/apple_framework" \ --staging-dir "$(Build.BinariesDirectory)/staging" \ --pod-version "$(genai_version)" \ --test \ --variant Full \ --build-settings-file "${{ variables.buildSettingsFile }}" \ - --build-apple-framework-args==--config=$(cmake_build_type) \ + --build-apple-framework-arg=--config=$(cmake_build_type) \ --ort-version ${{parameters.ort_version}} + + - script: | + set -e -x + + for POD_NAME in "${{ variables.cPodName}}" "${{ variables.objcPodName }}"; + do + ./tools/ci_build/github/apple/assemble_apple_packaging_artifacts.sh \ + "$(Build.BinariesDirectory)/staging" \ + "$(Build.ArtifactStagingDirectory)" \ + "${POD_NAME}" \ + "$(genai_version)" + done + + # copy over helper script for use in release pipeline + # cp tools/ci_build/github/apple/package_release_tasks.py "$(Build.ArtifactStagingDirectory)" + displayName: "Assemble artifacts" + + - script: | + set -e -x + ls -R "$(Build.ArtifactStagingDirectory)" + displayName: "List staged artifacts" + + - publish: "$(Build.ArtifactStagingDirectory)" + artifact: "macos_ios_cocoapods_packaging_artifacts" + displayName: "Publish artifacts" \ No newline at end of file diff --git a/test/platform/apple/apple_package_test/.gitignore b/test/platform/apple/apple_package_test/.gitignore new file mode 100644 index 000000000..910554681 --- /dev/null +++ b/test/platform/apple/apple_package_test/.gitignore @@ -0,0 +1,26 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Gcc Patch +/*.gcno diff --git a/test/platform/apple/apple_package_test/Podfile.template b/test/platform/apple/apple_package_test/Podfile.template new file mode 100644 index 000000000..dd99e5104 --- /dev/null +++ b/test/platform/apple/apple_package_test/Podfile.template @@ -0,0 +1,33 @@ +target 'ios_package_test' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + platform :ios, '13.0' + + target 'ios_package_testUITests' do + inherit! :search_paths + pod '@C_POD_NAME@', :podspec => '@C_POD_PODSPEC@' + end +end + +if ENV['SKIP_MACOS_TEST'] != 'true' + target 'macos_package_test' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + platform :osx, '11.0' + + target 'macos_package_testUITests' do + inherit! :search_paths + pod '@C_POD_NAME@', :podspec => '@C_POD_PODSPEC@' + end + end +end + +# This is to prevent the pods to be code signed if enabled +post_install do |installer| + installer.pods_project.build_configurations.each do |config| + config.build_settings['CODE_SIGNING_REQUIRED'] = "NO" + config.build_settings['CODE_SIGNING_ALLOWED'] = "NO" + end +end diff --git a/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.pbxproj b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.pbxproj new file mode 100644 index 000000000..5cd48afb0 --- /dev/null +++ b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.pbxproj @@ -0,0 +1,846 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 229E5921265869BF006E41AE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 229E5920265869BF006E41AE /* AppDelegate.m */; }; + 229E592A265869BF006E41AE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 229E5928265869BF006E41AE /* Main.storyboard */; }; + 229E592F265869C2006E41AE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 229E592D265869C2006E41AE /* LaunchScreen.storyboard */; }; + 229E5932265869C2006E41AE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 229E5931265869C2006E41AE /* main.m */; }; + 22C1D8EA271A79FD002CEE67 /* ios_package_uitest_cpp_api.mm in Sources */ = {isa = PBXBuildFile; fileRef = 22C1D8E9271A79FD002CEE67 /* ios_package_uitest_cpp_api.mm */; }; + 51C316BD2B0881450033C70B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C316BC2B0881450033C70B /* AppDelegate.m */; }; + 51C316C52B0881480033C70B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 51C316C32B0881480033C70B /* Main.storyboard */; }; + 51C316C72B0881480033C70B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C316C62B0881480033C70B /* main.m */; }; + 51C316DC2B0881490033C70B /* macos_package_uitest_cpp_api.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51C316DB2B0881490033C70B /* macos_package_uitest_cpp_api.mm */; }; + 8665DB312CCB82A300720D45 /* added_tokens.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB232CCB82A300720D45 /* added_tokens.json */; }; + 8665DB322CCB82A300720D45 /* config.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB242CCB82A300720D45 /* config.json */; }; + 8665DB332CCB82A300720D45 /* configuration_phi3.py in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB252CCB82A300720D45 /* configuration_phi3.py */; }; + 8665DB342CCB82A300720D45 /* genai_config.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB262CCB82A300720D45 /* genai_config.json */; }; + 8665DB352CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB272CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx */; }; + 8665DB362CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB282CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data */; }; + 8665DB372CCB82A300720D45 /* special_tokens_map.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB292CCB82A300720D45 /* special_tokens_map.json */; }; + 8665DB382CCB82A300720D45 /* tokenizer.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB2A2CCB82A300720D45 /* tokenizer.json */; }; + 8665DB392CCB82A300720D45 /* tokenizer.model in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB2B2CCB82A300720D45 /* tokenizer.model */; }; + 8665DB3A2CCB82A300720D45 /* tokenizer_config.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB2C2CCB82A300720D45 /* tokenizer_config.json */; }; + 8665DB3B2CCB82A300720D45 /* added_tokens.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB232CCB82A300720D45 /* added_tokens.json */; }; + 8665DB3C2CCB82A300720D45 /* config.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB242CCB82A300720D45 /* config.json */; }; + 8665DB3D2CCB82A300720D45 /* configuration_phi3.py in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB252CCB82A300720D45 /* configuration_phi3.py */; }; + 8665DB3E2CCB82A300720D45 /* genai_config.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB262CCB82A300720D45 /* genai_config.json */; }; + 8665DB3F2CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB272CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx */; }; + 8665DB402CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB282CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data */; }; + 8665DB412CCB82A300720D45 /* special_tokens_map.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB292CCB82A300720D45 /* special_tokens_map.json */; }; + 8665DB422CCB82A300720D45 /* tokenizer.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB2A2CCB82A300720D45 /* tokenizer.json */; }; + 8665DB432CCB82A300720D45 /* tokenizer.model in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB2B2CCB82A300720D45 /* tokenizer.model */; }; + 8665DB442CCB82A300720D45 /* tokenizer_config.json in Resources */ = {isa = PBXBuildFile; fileRef = 8665DB2C2CCB82A300720D45 /* tokenizer_config.json */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 22C1D8E4271A79AF002CEE67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 229E5914265869BF006E41AE /* Project object */; + proxyType = 1; + remoteGlobalIDString = 229E591B265869BF006E41AE; + remoteInfo = ios_package_test; + }; + 51C316D82B0881490033C70B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 229E5914265869BF006E41AE /* Project object */; + proxyType = 1; + remoteGlobalIDString = 51C316B82B0881450033C70B; + remoteInfo = macos_package_test; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 229E591C265869BF006E41AE /* ios_package_test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ios_package_test.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 229E591F265869BF006E41AE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 229E5920265869BF006E41AE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 229E5929265869BF006E41AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 229E592E265869C2006E41AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 229E5930265869C2006E41AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 229E5931265869C2006E41AE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 22C1D8DE271A79AF002CEE67 /* ios_package_testUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ios_package_testUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 22C1D8E9271A79FD002CEE67 /* ios_package_uitest_cpp_api.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ios_package_uitest_cpp_api.mm; sourceTree = ""; }; + 513C65792B85789400E4EDFD /* ios_package_test.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ios_package_test.entitlements; sourceTree = ""; }; + 51C316B92B0881450033C70B /* macos_package_test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macos_package_test.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 51C316BB2B0881450033C70B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 51C316BC2B0881450033C70B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 51C316C42B0881480033C70B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 51C316C62B0881480033C70B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 51C316D72B0881490033C70B /* macos_package_testUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macos_package_testUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 51C316DB2B0881490033C70B /* macos_package_uitest_cpp_api.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = macos_package_uitest_cpp_api.mm; sourceTree = ""; }; + 8665DB232CCB82A300720D45 /* added_tokens.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = added_tokens.json; sourceTree = ""; }; + 8665DB242CCB82A300720D45 /* config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = config.json; sourceTree = ""; }; + 8665DB252CCB82A300720D45 /* configuration_phi3.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = configuration_phi3.py; sourceTree = ""; }; + 8665DB262CCB82A300720D45 /* genai_config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = genai_config.json; sourceTree = ""; }; + 8665DB272CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx */ = {isa = PBXFileReference; lastKnownFileType = file; path = "phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx"; sourceTree = ""; }; + 8665DB282CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data */ = {isa = PBXFileReference; lastKnownFileType = file; path = "phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data"; sourceTree = ""; }; + 8665DB292CCB82A300720D45 /* special_tokens_map.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = special_tokens_map.json; sourceTree = ""; }; + 8665DB2A2CCB82A300720D45 /* tokenizer.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = tokenizer.json; sourceTree = ""; }; + 8665DB2B2CCB82A300720D45 /* tokenizer.model */ = {isa = PBXFileReference; lastKnownFileType = file; path = tokenizer.model; sourceTree = ""; }; + 8665DB2C2CCB82A300720D45 /* tokenizer_config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = tokenizer_config.json; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 229E5919265869BF006E41AE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 22C1D8DB271A79AF002CEE67 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 51C316B62B0881450033C70B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 51C316D42B0881490033C70B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 229E5913265869BF006E41AE = { + isa = PBXGroup; + children = ( + 8665DB302CCB82A300720D45 /* models */, + 229E591E265869BF006E41AE /* ios_package_test */, + 22C1D8DF271A79AF002CEE67 /* ios_package_testUITests */, + 51C316BA2B0881450033C70B /* macos_package_test */, + 51C316DA2B0881490033C70B /* macos_package_testUITests */, + 229E591D265869BF006E41AE /* Products */, + B49FE29C3625E88EDCCDD4BC /* Pods */, + ); + sourceTree = ""; + }; + 229E591D265869BF006E41AE /* Products */ = { + isa = PBXGroup; + children = ( + 229E591C265869BF006E41AE /* ios_package_test.app */, + 22C1D8DE271A79AF002CEE67 /* ios_package_testUITests.xctest */, + 51C316B92B0881450033C70B /* macos_package_test.app */, + 51C316D72B0881490033C70B /* macos_package_testUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 229E591E265869BF006E41AE /* ios_package_test */ = { + isa = PBXGroup; + children = ( + 513C65792B85789400E4EDFD /* ios_package_test.entitlements */, + 229E591F265869BF006E41AE /* AppDelegate.h */, + 229E5920265869BF006E41AE /* AppDelegate.m */, + 229E5928265869BF006E41AE /* Main.storyboard */, + 229E592D265869C2006E41AE /* LaunchScreen.storyboard */, + 229E5930265869C2006E41AE /* Info.plist */, + 229E5931265869C2006E41AE /* main.m */, + ); + path = ios_package_test; + sourceTree = ""; + }; + 22C1D8DF271A79AF002CEE67 /* ios_package_testUITests */ = { + isa = PBXGroup; + children = ( + 22C1D8E9271A79FD002CEE67 /* ios_package_uitest_cpp_api.mm */, + ); + path = ios_package_testUITests; + sourceTree = ""; + }; + 51C316BA2B0881450033C70B /* macos_package_test */ = { + isa = PBXGroup; + children = ( + 51C316BB2B0881450033C70B /* AppDelegate.h */, + 51C316BC2B0881450033C70B /* AppDelegate.m */, + 51C316C32B0881480033C70B /* Main.storyboard */, + 51C316C62B0881480033C70B /* main.m */, + ); + path = macos_package_test; + sourceTree = ""; + }; + 51C316DA2B0881490033C70B /* macos_package_testUITests */ = { + isa = PBXGroup; + children = ( + 51C316DB2B0881490033C70B /* macos_package_uitest_cpp_api.mm */, + ); + path = macos_package_testUITests; + sourceTree = ""; + }; + 8665DB2D2CCB82A300720D45 /* cpu-int4-rtn-block-32-acc-level-4 */ = { + isa = PBXGroup; + children = ( + 8665DB232CCB82A300720D45 /* added_tokens.json */, + 8665DB242CCB82A300720D45 /* config.json */, + 8665DB252CCB82A300720D45 /* configuration_phi3.py */, + 8665DB262CCB82A300720D45 /* genai_config.json */, + 8665DB272CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx */, + 8665DB282CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data */, + 8665DB292CCB82A300720D45 /* special_tokens_map.json */, + 8665DB2A2CCB82A300720D45 /* tokenizer.json */, + 8665DB2B2CCB82A300720D45 /* tokenizer.model */, + 8665DB2C2CCB82A300720D45 /* tokenizer_config.json */, + ); + path = "cpu-int4-rtn-block-32-acc-level-4"; + sourceTree = ""; + }; + 8665DB2E2CCB82A300720D45 /* cpu_and_mobile */ = { + isa = PBXGroup; + children = ( + 8665DB2D2CCB82A300720D45 /* cpu-int4-rtn-block-32-acc-level-4 */, + ); + path = cpu_and_mobile; + sourceTree = ""; + }; + 8665DB2F2CCB82A300720D45 /* Phi-3-mini-4k-instruct-onnx */ = { + isa = PBXGroup; + children = ( + 8665DB2E2CCB82A300720D45 /* cpu_and_mobile */, + ); + path = "Phi-3-mini-4k-instruct-onnx"; + sourceTree = ""; + }; + 8665DB302CCB82A300720D45 /* models */ = { + isa = PBXGroup; + children = ( + 8665DB2F2CCB82A300720D45 /* Phi-3-mini-4k-instruct-onnx */, + ); + path = models; + sourceTree = ""; + }; + B49FE29C3625E88EDCCDD4BC /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 229E591B265869BF006E41AE /* ios_package_test */ = { + isa = PBXNativeTarget; + buildConfigurationList = 229E594B265869C2006E41AE /* Build configuration list for PBXNativeTarget "ios_package_test" */; + buildPhases = ( + 229E5918265869BF006E41AE /* Sources */, + 229E5919265869BF006E41AE /* Frameworks */, + 229E591A265869BF006E41AE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ios_package_test; + productName = ios_package_test; + productReference = 229E591C265869BF006E41AE /* ios_package_test.app */; + productType = "com.apple.product-type.application"; + }; + 22C1D8DD271A79AF002CEE67 /* ios_package_testUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 22C1D8E8271A79AF002CEE67 /* Build configuration list for PBXNativeTarget "ios_package_testUITests" */; + buildPhases = ( + 22C1D8DA271A79AF002CEE67 /* Sources */, + 22C1D8DB271A79AF002CEE67 /* Frameworks */, + 22C1D8DC271A79AF002CEE67 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 22C1D8E5271A79AF002CEE67 /* PBXTargetDependency */, + ); + name = ios_package_testUITests; + productName = ios_package_testUITests; + productReference = 22C1D8DE271A79AF002CEE67 /* ios_package_testUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + 51C316B82B0881450033C70B /* macos_package_test */ = { + isa = PBXNativeTarget; + buildConfigurationList = 51C316DF2B0881490033C70B /* Build configuration list for PBXNativeTarget "macos_package_test" */; + buildPhases = ( + 51C316B52B0881450033C70B /* Sources */, + 51C316B62B0881450033C70B /* Frameworks */, + 51C316B72B0881450033C70B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = macos_package_test; + productName = macos_package_test; + productReference = 51C316B92B0881450033C70B /* macos_package_test.app */; + productType = "com.apple.product-type.application"; + }; + 51C316D62B0881490033C70B /* macos_package_testUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 51C316E52B0881490033C70B /* Build configuration list for PBXNativeTarget "macos_package_testUITests" */; + buildPhases = ( + 51C316D32B0881490033C70B /* Sources */, + 51C316D42B0881490033C70B /* Frameworks */, + 51C316D52B0881490033C70B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 51C316D92B0881490033C70B /* PBXTargetDependency */, + ); + name = macos_package_testUITests; + productName = macos_package_testUITests; + productReference = 51C316D72B0881490033C70B /* macos_package_testUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 229E5914265869BF006E41AE /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1250; + TargetAttributes = { + 229E591B265869BF006E41AE = { + CreatedOnToolsVersion = 12.5; + }; + 22C1D8DD271A79AF002CEE67 = { + CreatedOnToolsVersion = 13.0; + TestTargetID = 229E591B265869BF006E41AE; + }; + 51C316B82B0881450033C70B = { + CreatedOnToolsVersion = 15.0.1; + }; + 51C316D62B0881490033C70B = { + CreatedOnToolsVersion = 15.0.1; + TestTargetID = 51C316B82B0881450033C70B; + }; + }; + }; + buildConfigurationList = 229E5917265869BF006E41AE /* Build configuration list for PBXProject "apple_package_test" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 229E5913265869BF006E41AE; + productRefGroup = 229E591D265869BF006E41AE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 229E591B265869BF006E41AE /* ios_package_test */, + 22C1D8DD271A79AF002CEE67 /* ios_package_testUITests */, + 51C316B82B0881450033C70B /* macos_package_test */, + 51C316D62B0881490033C70B /* macos_package_testUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 229E591A265869BF006E41AE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 229E592F265869C2006E41AE /* LaunchScreen.storyboard in Resources */, + 229E592A265869BF006E41AE /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 22C1D8DC271A79AF002CEE67 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8665DB312CCB82A300720D45 /* added_tokens.json in Resources */, + 8665DB322CCB82A300720D45 /* config.json in Resources */, + 8665DB332CCB82A300720D45 /* configuration_phi3.py in Resources */, + 8665DB342CCB82A300720D45 /* genai_config.json in Resources */, + 8665DB352CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx in Resources */, + 8665DB362CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data in Resources */, + 8665DB372CCB82A300720D45 /* special_tokens_map.json in Resources */, + 8665DB382CCB82A300720D45 /* tokenizer.json in Resources */, + 8665DB392CCB82A300720D45 /* tokenizer.model in Resources */, + 8665DB3A2CCB82A300720D45 /* tokenizer_config.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 51C316B72B0881450033C70B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 51C316C52B0881480033C70B /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 51C316D52B0881490033C70B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8665DB3B2CCB82A300720D45 /* added_tokens.json in Resources */, + 8665DB3C2CCB82A300720D45 /* config.json in Resources */, + 8665DB3D2CCB82A300720D45 /* configuration_phi3.py in Resources */, + 8665DB3E2CCB82A300720D45 /* genai_config.json in Resources */, + 8665DB3F2CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx in Resources */, + 8665DB402CCB82A300720D45 /* phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data in Resources */, + 8665DB412CCB82A300720D45 /* special_tokens_map.json in Resources */, + 8665DB422CCB82A300720D45 /* tokenizer.json in Resources */, + 8665DB432CCB82A300720D45 /* tokenizer.model in Resources */, + 8665DB442CCB82A300720D45 /* tokenizer_config.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 229E5918265869BF006E41AE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 229E5921265869BF006E41AE /* AppDelegate.m in Sources */, + 229E5932265869C2006E41AE /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 22C1D8DA271A79AF002CEE67 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 22C1D8EA271A79FD002CEE67 /* ios_package_uitest_cpp_api.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 51C316B52B0881450033C70B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 51C316C72B0881480033C70B /* main.m in Sources */, + 51C316BD2B0881450033C70B /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 51C316D32B0881490033C70B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 51C316DC2B0881490033C70B /* macos_package_uitest_cpp_api.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 22C1D8E5271A79AF002CEE67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 229E591B265869BF006E41AE /* ios_package_test */; + targetProxy = 22C1D8E4271A79AF002CEE67 /* PBXContainerItemProxy */; + }; + 51C316D92B0881490033C70B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 51C316B82B0881450033C70B /* macos_package_test */; + targetProxy = 51C316D82B0881490033C70B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 229E5928265869BF006E41AE /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 229E5929265869BF006E41AE /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 229E592D265869C2006E41AE /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 229E592E265869C2006E41AE /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 51C316C32B0881480033C70B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 51C316C42B0881480033C70B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 229E5949265869C2006E41AE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 229E594A265869C2006E41AE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 229E594C265869C2006E41AE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGNING_STYLE = Automatic; + CODE_SIGN_ENTITLEMENTS = ios_package_test/ios_package_test.entitlements; + INFOPLIST_FILE = ios_package_test/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.ios-package-test"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = YES; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 229E594D265869C2006E41AE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGNING_STYLE = Automatic; + CODE_SIGN_ENTITLEMENTS = ios_package_test/ios_package_test.entitlements; + INFOPLIST_FILE = ios_package_test/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.ios-package-test"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = YES; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 22C1D8E6271A79AF002CEE67 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.ios-package-testUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = ios_package_test; + }; + name = Debug; + }; + 22C1D8E7271A79AF002CEE67 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.ios-package-testUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = ios_package_test; + }; + name = Release; + }; + 51C316E02B0881490033C70B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-test"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = YES; + }; + name = Debug; + }; + 51C316E12B0881490033C70B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-test"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = YES; + }; + name = Release; + }; + 51C316E62B0881490033C70B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-testUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = NO; + TEST_TARGET_NAME = macos_package_test; + }; + name = Debug; + }; + 51C316E72B0881490033C70B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-testUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = NO; + TEST_TARGET_NAME = macos_package_test; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 229E5917265869BF006E41AE /* Build configuration list for PBXProject "apple_package_test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 229E5949265869C2006E41AE /* Debug */, + 229E594A265869C2006E41AE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 229E594B265869C2006E41AE /* Build configuration list for PBXNativeTarget "ios_package_test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 229E594C265869C2006E41AE /* Debug */, + 229E594D265869C2006E41AE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 22C1D8E8271A79AF002CEE67 /* Build configuration list for PBXNativeTarget "ios_package_testUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 22C1D8E6271A79AF002CEE67 /* Debug */, + 22C1D8E7271A79AF002CEE67 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 51C316DF2B0881490033C70B /* Build configuration list for PBXNativeTarget "macos_package_test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 51C316E02B0881490033C70B /* Debug */, + 51C316E12B0881490033C70B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 51C316E52B0881490033C70B /* Build configuration list for PBXNativeTarget "macos_package_testUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 51C316E62B0881490033C70B /* Debug */, + 51C316E72B0881490033C70B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 229E5914265869BF006E41AE /* Project object */; +} diff --git a/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..0c67376eb --- /dev/null +++ b/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/test/platform/apple/apple_package_test/ios_package_test/AppDelegate.h b/test/platform/apple/apple_package_test/ios_package_test/AppDelegate.h new file mode 100644 index 000000000..9f79fc76e --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_test/AppDelegate.h @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// AppDelegate.h +// ios_package_test +// + +#import + +@interface AppDelegate : UIResponder + +@end diff --git a/test/platform/apple/apple_package_test/ios_package_test/AppDelegate.m b/test/platform/apple/apple_package_test/ios_package_test/AppDelegate.m new file mode 100644 index 000000000..4e078f653 --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_test/AppDelegate.m @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// AppDelegate.m +// ios_package_test +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + // Override point for customization after application launch. + return YES; +} + +#pragma mark - UISceneSession lifecycle + +- (UISceneConfiguration*)application:(UIApplication*)application configurationForConnectingSceneSession:(UISceneSession*)connectingSceneSession options:(UISceneConnectionOptions*)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + +- (void)application:(UIApplication*)application didDiscardSceneSessions:(NSSet*)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. +} + +@end diff --git a/test/platform/apple/apple_package_test/ios_package_test/Base.lproj/LaunchScreen.storyboard b/test/platform/apple/apple_package_test/ios_package_test/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_test/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/platform/apple/apple_package_test/ios_package_test/Base.lproj/Main.storyboard b/test/platform/apple/apple_package_test/ios_package_test/Base.lproj/Main.storyboard new file mode 100644 index 000000000..808a21ce7 --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_test/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/platform/apple/apple_package_test/ios_package_test/Info.plist b/test/platform/apple/apple_package_test/ios_package_test/Info.plist new file mode 100644 index 000000000..72bf2c4f5 --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_test/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/test/platform/apple/apple_package_test/ios_package_test/ios_package_test.entitlements b/test/platform/apple/apple_package_test/ios_package_test/ios_package_test.entitlements new file mode 100644 index 000000000..ee95ab7e5 --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_test/ios_package_test.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/test/platform/apple/apple_package_test/ios_package_test/main.m b/test/platform/apple/apple_package_test/ios_package_test/main.m new file mode 100644 index 000000000..7e7f39c96 --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_test/main.m @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// main.m +// ios_package_test +// + +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + NSString* appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/test/platform/apple/apple_package_test/ios_package_testUITests/ios_package_uitest_cpp_api.mm b/test/platform/apple/apple_package_test/ios_package_testUITests/ios_package_uitest_cpp_api.mm new file mode 100644 index 000000000..5612bda3b --- /dev/null +++ b/test/platform/apple/apple_package_test/ios_package_testUITests/ios_package_uitest_cpp_api.mm @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// ios_package_test_cpp_api.mm +// ios_package_test_cpp_api +// +// This file hosts the tests of ORT GenAI C++ API +// + +#import +#include +#include + + +@interface ios_package_test_cpp_api : XCTestCase + +@end + +@implementation ios_package_test_cpp_api + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = YES; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + OgaShutdown(); +} + +- (NSString*)getFilePath { + NSBundle* bundle = [NSBundle bundleForClass:[self class]]; + NSString* path = [bundle resourcePath]; + return path; +} + +- (void)testCppAPI_Basic { + auto model = OgaModel::Create([self getFilePath].UTF8String); + + auto tokenizer = OgaTokenizer::Create(*model); + + const char* prompt = "<|system|>You are a helpful AI assistant.<|end|><|user|>Can you introduce yourself?<|end|><|assistant|>"; + + auto sequences = OgaSequences::Create(); + tokenizer->Encode(prompt, *sequences); + + auto params = OgaGeneratorParams::Create(*model); + params->SetSearchOption("max_length", 100); + params->SetSearchOption("batch_size", 1); + + auto generator = OgaGenerator::Create(*model, *params); + generator->AppendTokenSequences(*sequences); + + while (!generator->IsDone()) { + generator->GenerateNextToken(); + } + const auto output_sequence_length = generator->GetSequenceCount(0); + const auto* output_sequence_data = generator->GetSequenceData(0); + auto out_string = tokenizer->Decode(output_sequence_data, output_sequence_length); +} + +@end diff --git a/test/platform/apple/apple_package_test/macos_package_test/AppDelegate.h b/test/platform/apple/apple_package_test/macos_package_test/AppDelegate.h new file mode 100644 index 000000000..e7b3600a0 --- /dev/null +++ b/test/platform/apple/apple_package_test/macos_package_test/AppDelegate.h @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// AppDelegate.h +// macos_package_test +// + +#import + +@interface AppDelegate : NSObject + +@end diff --git a/test/platform/apple/apple_package_test/macos_package_test/AppDelegate.m b/test/platform/apple/apple_package_test/macos_package_test/AppDelegate.m new file mode 100644 index 000000000..36d16491c --- /dev/null +++ b/test/platform/apple/apple_package_test/macos_package_test/AppDelegate.m @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// AppDelegate.h +// macos_package_test +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification*)aNotification { + // Insert code here to initialize your application +} + +- (void)applicationWillTerminate:(NSNotification*)aNotification { + // Insert code here to tear down your application +} + +- (BOOL)applicationSupportsSecureRestorableState:(NSApplication*)app { + return YES; +} + +@end diff --git a/test/platform/apple/apple_package_test/macos_package_test/Base.lproj/Main.storyboard b/test/platform/apple/apple_package_test/macos_package_test/Base.lproj/Main.storyboard new file mode 100644 index 000000000..1cddb62a0 --- /dev/null +++ b/test/platform/apple/apple_package_test/macos_package_test/Base.lproj/Main.storyboard @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/platform/apple/apple_package_test/macos_package_test/main.m b/test/platform/apple/apple_package_test/macos_package_test/main.m new file mode 100644 index 000000000..ee939ac37 --- /dev/null +++ b/test/platform/apple/apple_package_test/macos_package_test/main.m @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// AppDelegate.h +// macos_package_test +// + +#import + +int main(int argc, const char* argv[]) { + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + } + return NSApplicationMain(argc, argv); +} diff --git a/test/platform/apple/apple_package_test/macos_package_testUITests/macos_package_uitest_cpp_api.mm b/test/platform/apple/apple_package_test/macos_package_testUITests/macos_package_uitest_cpp_api.mm new file mode 100644 index 000000000..e0023f4e8 --- /dev/null +++ b/test/platform/apple/apple_package_test/macos_package_testUITests/macos_package_uitest_cpp_api.mm @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// macos_package_test_cpp_api.mm +// macos_package_test_cpp_api +// +// This file hosts the tests of ORT C++ API +// + +#import +#include +#include + + +@interface macos_package_testUITests : XCTestCase + +@end + +@implementation macos_package_testUITests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + OgaShutdown(); +} + +- (NSString*)getFilePath { + NSBundle* bundle = [NSBundle bundleForClass:[self class]]; + NSString* path = [bundle resourcePath]; + return path; +} + +- (void)testCppAPI_Basic { + auto model = OgaModel::Create([self getFilePath].UTF8String); + + auto tokenizer = OgaTokenizer::Create(*model); + + const char* prompt = "<|system|>You are a helpful AI assistant.<|end|><|user|>Can you introduce yourself?<|end|><|assistant|>"; + + auto sequences = OgaSequences::Create(); + tokenizer->Encode(prompt, *sequences); + + auto params = OgaGeneratorParams::Create(*model); + params->SetSearchOption("max_length", 100); + params->SetSearchOption("batch_size", 1); + + auto generator = OgaGenerator::Create(*model, *params); + generator->AppendTokenSequences(*sequences); + + while (!generator->IsDone()) { + generator->GenerateNextToken(); + } + const auto output_sequence_length = generator->GetSequenceCount(0); + const auto* output_sequence_data = generator->GetSequenceData(0); + auto out_string = tokenizer->Decode(output_sequence_data, output_sequence_length); +} + +@end diff --git a/tools/ci_build/github/apple/assemble_apple_packaging_artifacts.sh b/tools/ci_build/github/apple/assemble_apple_packaging_artifacts.sh new file mode 100755 index 000000000..a2178337e --- /dev/null +++ b/tools/ci_build/github/apple/assemble_apple_packaging_artifacts.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Note: This script is intended to be called from the iOS packaging build or a similar context +# See tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml + +set -e +set -x + +USAGE_TEXT="Usage: ${0} " + +abspath() { + local INPUT_PATH=${1:?"Expected path as the first argument."} + echo "$(cd "$(dirname "${INPUT_PATH}")" && pwd)/$(basename "${INPUT_PATH}")" +} + +# staging directory for binaries (source) +BINARIES_STAGING_DIR=$(abspath "${1:?${USAGE_TEXT}}") +# staging directory for build artifacts (destination) +ARTIFACTS_STAGING_DIR=$(abspath "${2:?${USAGE_TEXT}}") +POD_NAME=${3:?${USAGE_TEXT}} +ORT_POD_VERSION=${4:?${USAGE_TEXT}} + +POD_ARCHIVE_BASENAME="pod-archive-${POD_NAME}-${ORT_POD_VERSION}.zip" +PODSPEC_BASENAME="${POD_NAME}.podspec" + +echo "Contents of ${BINARIES_STAGING_DIR}/${POD_NAME}:" +ls -lR "${BINARIES_STAGING_DIR}/${POD_NAME}" + +pushd "${BINARIES_STAGING_DIR}/${POD_NAME}" + +# assemble the files in the artifacts staging directory +zip -r -y "${ARTIFACTS_STAGING_DIR}/${POD_ARCHIVE_BASENAME}" ./* --exclude "${PODSPEC_BASENAME}" +cp "${PODSPEC_BASENAME}" "${ARTIFACTS_STAGING_DIR}/${PODSPEC_BASENAME}" + +popd