diff --git a/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..60a633afbc --- /dev/null +++ b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj @@ -0,0 +1,720 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 0324D68B2BAACB6900DEF36F /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6802BAACB6900DEF36F /* App.swift */; }; + 0324D68C2BAACB6900DEF36F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6812BAACB6900DEF36F /* ContentView.swift */; }; + 0324D68D2BAACB6900DEF36F /* LogManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6822BAACB6900DEF36F /* LogManager.swift */; }; + 0324D68E2BAACB6900DEF36F /* LogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6832BAACB6900DEF36F /* LogView.swift */; }; + 0324D68F2BAACB6900DEF36F /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6842BAACB6900DEF36F /* Message.swift */; }; + 0324D6902BAACB6900DEF36F /* MessageListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6852BAACB6900DEF36F /* MessageListView.swift */; }; + 0324D6912BAACB6900DEF36F /* MessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6862BAACB6900DEF36F /* MessageView.swift */; }; + 0324D6922BAACB6900DEF36F /* ResourceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6872BAACB6900DEF36F /* ResourceManager.swift */; }; + 0324D6932BAACB6900DEF36F /* ResourceMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0324D6882BAACB6900DEF36F /* ResourceMonitor.swift */; }; + 0324D6962BAACB7000DEF36F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0324D6942BAACB7000DEF36F /* Assets.xcassets */; }; + 03729EDB2BB1F8DE00152F2E /* LLaMARunner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03729ED52BB1F8DE00152F2E /* LLaMARunner.framework */; }; + 03729EDC2BB1F8DE00152F2E /* LLaMARunner.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 03729ED52BB1F8DE00152F2E /* LLaMARunner.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 03729EE12BB1F93800152F2E /* LLaMARunner.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0324D69A2BAACB7C00DEF36F /* LLaMARunner.mm */; }; + 03729EE22BB1F93E00152F2E /* LLaMARunner.h in Headers */ = {isa = PBXBuildFile; fileRef = 0324D6992BAACB7C00DEF36F /* LLaMARunner.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03729F0A2BB203B300152F2E /* runner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03729F072BB203B300152F2E /* runner.cpp */; }; + 03729F0B2BB203B300152F2E /* runner.h in Headers */ = {isa = PBXBuildFile; fileRef = 03729F082BB203B300152F2E /* runner.h */; }; + 03729F0C2BB203B300152F2E /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 03729F092BB203B300152F2E /* util.h */; }; + 03729F122BB2042B00152F2E /* sampler.h in Headers */ = {isa = PBXBuildFile; fileRef = 03729F102BB2042B00152F2E /* sampler.h */; }; + 03729F132BB2042B00152F2E /* sampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03729F112BB2042B00152F2E /* sampler.cpp */; }; + 03729F162BB2043600152F2E /* tokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03729F142BB2043600152F2E /* tokenizer.cpp */; }; + 03729F172BB2043600152F2E /* tokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 03729F152BB2043600152F2E /* tokenizer.h */; }; + 0395C6D32BB34ED10090705A /* coreml_backend in Frameworks */ = {isa = PBXBuildFile; productRef = 0395C6D22BB34ED10090705A /* coreml_backend */; }; + 0395C6D52BB34ED10090705A /* executorch in Frameworks */ = {isa = PBXBuildFile; productRef = 0395C6D42BB34ED10090705A /* executorch */; }; + 0395C6D72BB34ED10090705A /* mps_backend in Frameworks */ = {isa = PBXBuildFile; productRef = 0395C6D62BB34ED10090705A /* mps_backend */; }; + 0395C6DB2BB34ED10090705A /* portable_backend in Frameworks */ = {isa = PBXBuildFile; productRef = 0395C6DA2BB34ED10090705A /* portable_backend */; }; + 0395C6DD2BB34ED10090705A /* quantized_backend in Frameworks */ = {isa = PBXBuildFile; productRef = 0395C6DC2BB34ED10090705A /* quantized_backend */; }; + 0395C6DF2BB34ED10090705A /* xnnpack_backend in Frameworks */ = {isa = PBXBuildFile; productRef = 0395C6DE2BB34ED10090705A /* xnnpack_backend */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 03729ED92BB1F8DE00152F2E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 032C01672AC228E5002955E1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 03729ED42BB1F8DE00152F2E; + remoteInfo = LLaMARunner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 03729EE02BB1F8DE00152F2E /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 03729EDC2BB1F8DE00152F2E /* LLaMARunner.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0324D6802BAACB6900DEF36F /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = ""; }; + 0324D6812BAACB6900DEF36F /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 0324D6822BAACB6900DEF36F /* LogManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogManager.swift; sourceTree = ""; }; + 0324D6832BAACB6900DEF36F /* LogView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogView.swift; sourceTree = ""; }; + 0324D6842BAACB6900DEF36F /* Message.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = ""; }; + 0324D6852BAACB6900DEF36F /* MessageListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageListView.swift; sourceTree = ""; }; + 0324D6862BAACB6900DEF36F /* MessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageView.swift; sourceTree = ""; }; + 0324D6872BAACB6900DEF36F /* ResourceManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResourceManager.swift; sourceTree = ""; }; + 0324D6882BAACB6900DEF36F /* ResourceMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResourceMonitor.swift; sourceTree = ""; }; + 0324D6942BAACB7000DEF36F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0324D6992BAACB7C00DEF36F /* LLaMARunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLaMARunner.h; sourceTree = ""; }; + 0324D69A2BAACB7C00DEF36F /* LLaMARunner.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LLaMARunner.mm; sourceTree = ""; }; + 036CAF9D2BB1444500D6C2D5 /* LLaMA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LLaMA.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 03729ED52BB1F8DE00152F2E /* LLaMARunner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LLaMARunner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 03729F072BB203B300152F2E /* runner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = runner.cpp; sourceTree = ""; }; + 03729F082BB203B300152F2E /* runner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = runner.h; sourceTree = ""; }; + 03729F092BB203B300152F2E /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = ""; }; + 03729F102BB2042B00152F2E /* sampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sampler.h; sourceTree = ""; }; + 03729F112BB2042B00152F2E /* sampler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sampler.cpp; sourceTree = ""; }; + 03729F142BB2043600152F2E /* tokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tokenizer.cpp; sourceTree = ""; }; + 03729F152BB2043600152F2E /* tokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tokenizer.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 032C016C2AC228E6002955E1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0395C6D72BB34ED10090705A /* mps_backend in Frameworks */, + 0395C6DD2BB34ED10090705A /* quantized_backend in Frameworks */, + 0395C6DB2BB34ED10090705A /* portable_backend in Frameworks */, + 03729EDB2BB1F8DE00152F2E /* LLaMARunner.framework in Frameworks */, + 0395C6DF2BB34ED10090705A /* xnnpack_backend in Frameworks */, + 0395C6D32BB34ED10090705A /* coreml_backend in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 03729ED22BB1F8DE00152F2E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0395C6D52BB34ED10090705A /* executorch in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0324D6892BAACB6900DEF36F /* Application */ = { + isa = PBXGroup; + children = ( + 0324D6802BAACB6900DEF36F /* App.swift */, + 0324D6812BAACB6900DEF36F /* ContentView.swift */, + 0324D6822BAACB6900DEF36F /* LogManager.swift */, + 0324D6832BAACB6900DEF36F /* LogView.swift */, + 0324D6842BAACB6900DEF36F /* Message.swift */, + 0324D6852BAACB6900DEF36F /* MessageListView.swift */, + 0324D6862BAACB6900DEF36F /* MessageView.swift */, + 0324D6872BAACB6900DEF36F /* ResourceManager.swift */, + 0324D6882BAACB6900DEF36F /* ResourceMonitor.swift */, + ); + path = Application; + sourceTree = ""; + }; + 0324D68A2BAACB6900DEF36F /* LLaMA */ = { + isa = PBXGroup; + children = ( + 0324D6892BAACB6900DEF36F /* Application */, + ); + path = LLaMA; + sourceTree = ""; + }; + 0324D6952BAACB7000DEF36F /* LLaMAAssets */ = { + isa = PBXGroup; + children = ( + 0324D6942BAACB7000DEF36F /* Assets.xcassets */, + ); + path = LLaMAAssets; + sourceTree = ""; + }; + 0324D69B2BAACB7C00DEF36F /* Exported */ = { + isa = PBXGroup; + children = ( + 0324D6992BAACB7C00DEF36F /* LLaMARunner.h */, + 0324D69A2BAACB7C00DEF36F /* LLaMARunner.mm */, + ); + path = Exported; + sourceTree = ""; + }; + 0324D69C2BAACB7C00DEF36F /* LLaMARunner */ = { + isa = PBXGroup; + children = ( + 0324D69B2BAACB7C00DEF36F /* Exported */, + 03729F062BB2035900152F2E /* runner */, + 03729F0F2BB203E100152F2E /* sampler */, + 03729F0E2BB203D700152F2E /* tokenizer */, + ); + path = LLaMARunner; + sourceTree = ""; + }; + 0324D69F2BAACB7C00DEF36F /* LLaMARunner */ = { + isa = PBXGroup; + children = ( + 0324D69C2BAACB7C00DEF36F /* LLaMARunner */, + ); + path = LLaMARunner; + sourceTree = ""; + }; + 032C01662AC228E5002955E1 = { + isa = PBXGroup; + children = ( + 0324D68A2BAACB6900DEF36F /* LLaMA */, + 0324D6952BAACB7000DEF36F /* LLaMAAssets */, + 0324D69F2BAACB7C00DEF36F /* LLaMARunner */, + 036CAF9D2BB1444500D6C2D5 /* LLaMA.app */, + 03729ED52BB1F8DE00152F2E /* LLaMARunner.framework */, + ); + sourceTree = ""; + }; + 03729F062BB2035900152F2E /* runner */ = { + isa = PBXGroup; + children = ( + 03729F072BB203B300152F2E /* runner.cpp */, + 03729F082BB203B300152F2E /* runner.h */, + 03729F092BB203B300152F2E /* util.h */, + ); + name = runner; + path = ../../../../../models/llama2/runner; + sourceTree = ""; + }; + 03729F0E2BB203D700152F2E /* tokenizer */ = { + isa = PBXGroup; + children = ( + 03729F142BB2043600152F2E /* tokenizer.cpp */, + 03729F152BB2043600152F2E /* tokenizer.h */, + ); + name = tokenizer; + path = ../../../../../models/llama2/tokenizer; + sourceTree = ""; + }; + 03729F0F2BB203E100152F2E /* sampler */ = { + isa = PBXGroup; + children = ( + 03729F112BB2042B00152F2E /* sampler.cpp */, + 03729F102BB2042B00152F2E /* sampler.h */, + ); + name = sampler; + path = ../../../../../models/llama2/sampler; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 03729ED02BB1F8DE00152F2E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 03729F172BB2043600152F2E /* tokenizer.h in Headers */, + 03729EE22BB1F93E00152F2E /* LLaMARunner.h in Headers */, + 03729F122BB2042B00152F2E /* sampler.h in Headers */, + 03729F0C2BB203B300152F2E /* util.h in Headers */, + 03729F0B2BB203B300152F2E /* runner.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 032C016E2AC228E6002955E1 /* App */ = { + isa = PBXNativeTarget; + buildConfigurationList = 032C017D2AC228E7002955E1 /* Build configuration list for PBXNativeTarget "App" */; + buildPhases = ( + 032C016B2AC228E6002955E1 /* Sources */, + 032C016C2AC228E6002955E1 /* Frameworks */, + 032C016D2AC228E6002955E1 /* Resources */, + 03729EE02BB1F8DE00152F2E /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 03729EDA2BB1F8DE00152F2E /* PBXTargetDependency */, + ); + name = App; + packageProductDependencies = ( + 0395C6D22BB34ED10090705A /* coreml_backend */, + 0395C6D62BB34ED10090705A /* mps_backend */, + 0395C6DA2BB34ED10090705A /* portable_backend */, + 0395C6DC2BB34ED10090705A /* quantized_backend */, + 0395C6DE2BB34ED10090705A /* xnnpack_backend */, + ); + productName = LLaMA; + productReference = 036CAF9D2BB1444500D6C2D5 /* LLaMA.app */; + productType = "com.apple.product-type.application"; + }; + 03729ED42BB1F8DE00152F2E /* LLaMARunner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 03729EDD2BB1F8DE00152F2E /* Build configuration list for PBXNativeTarget "LLaMARunner" */; + buildPhases = ( + 03729ED02BB1F8DE00152F2E /* Headers */, + 03729ED12BB1F8DE00152F2E /* Sources */, + 03729ED22BB1F8DE00152F2E /* Frameworks */, + 03729ED32BB1F8DE00152F2E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LLaMARunner; + packageProductDependencies = ( + 0395C6D42BB34ED10090705A /* executorch */, + ); + productName = LLaMARunner; + productReference = 03729ED52BB1F8DE00152F2E /* LLaMARunner.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 032C01672AC228E5002955E1 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1530; + TargetAttributes = { + 032C016E2AC228E6002955E1 = { + CreatedOnToolsVersion = 15.0; + }; + 03729ED42BB1F8DE00152F2E = { + CreatedOnToolsVersion = 15.3; + }; + }; + }; + buildConfigurationList = 032C016A2AC228E5002955E1 /* Build configuration list for PBXProject "LLaMA" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 032C01662AC228E5002955E1; + packageReferences = ( + 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */, + ); + productRefGroup = 032C01662AC228E5002955E1; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 032C016E2AC228E6002955E1 /* App */, + 03729ED42BB1F8DE00152F2E /* LLaMARunner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 032C016D2AC228E6002955E1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0324D6962BAACB7000DEF36F /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 03729ED32BB1F8DE00152F2E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 032C016B2AC228E6002955E1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0324D6932BAACB6900DEF36F /* ResourceMonitor.swift in Sources */, + 0324D68D2BAACB6900DEF36F /* LogManager.swift in Sources */, + 0324D68E2BAACB6900DEF36F /* LogView.swift in Sources */, + 0324D68F2BAACB6900DEF36F /* Message.swift in Sources */, + 0324D6922BAACB6900DEF36F /* ResourceManager.swift in Sources */, + 0324D68C2BAACB6900DEF36F /* ContentView.swift in Sources */, + 0324D6902BAACB6900DEF36F /* MessageListView.swift in Sources */, + 0324D6912BAACB6900DEF36F /* MessageView.swift in Sources */, + 0324D68B2BAACB6900DEF36F /* App.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 03729ED12BB1F8DE00152F2E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 03729EE12BB1F93800152F2E /* LLaMARunner.mm in Sources */, + 03729F162BB2043600152F2E /* tokenizer.cpp in Sources */, + 03729F0A2BB203B300152F2E /* runner.cpp in Sources */, + 03729F132BB2042B00152F2E /* sampler.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 03729EDA2BB1F8DE00152F2E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 03729ED42BB1F8DE00152F2E /* LLaMARunner */; + targetProxy = 03729ED92BB1F8DE00152F2E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 032C017B2AC228E7002955E1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = x86_64; + GCC_C_LANGUAGE_STANDARD = c17; + 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 = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-all_load"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 032C017C2AC228E7002955E1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = x86_64; + GCC_C_LANGUAGE_STANDARD = c17; + 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 = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_LDFLAGS = "-all_load"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 032C017E2AC228E7002955E1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = iLLaMA; + INFOPLIST_KEY_NSCameraUsageDescription = ""; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UIRequiresFullScreen = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.pytorch.executorch.llama; + PRODUCT_NAME = "$(PROJECT_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 032C017F2AC228E7002955E1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = iLLaMA; + INFOPLIST_KEY_NSCameraUsageDescription = ""; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UIRequiresFullScreen = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.pytorch.executorch.llama; + PRODUCT_NAME = "$(PROJECT_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + 03729EDE2BB1F8DE00152F2E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../..\""; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = org.pytorch.executorch.llama.LLaMARunner; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = 1; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 03729EDF2BB1F8DE00152F2E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../..\""; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = org.pytorch.executorch.llama.LLaMARunner; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = 1; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 032C016A2AC228E5002955E1 /* Build configuration list for PBXProject "LLaMA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 032C017B2AC228E7002955E1 /* Debug */, + 032C017C2AC228E7002955E1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 032C017D2AC228E7002955E1 /* Build configuration list for PBXNativeTarget "App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 032C017E2AC228E7002955E1 /* Debug */, + 032C017F2AC228E7002955E1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 03729EDD2BB1F8DE00152F2E /* Build configuration list for PBXNativeTarget "LLaMARunner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 03729EDE2BB1F8DE00152F2E /* Debug */, + 03729EDF2BB1F8DE00152F2E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/pytorch/executorch"; + requirement = { + branch = main; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 0395C6D22BB34ED10090705A /* coreml_backend */ = { + isa = XCSwiftPackageProductDependency; + package = 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */; + productName = coreml_backend; + }; + 0395C6D42BB34ED10090705A /* executorch */ = { + isa = XCSwiftPackageProductDependency; + package = 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */; + productName = executorch; + }; + 0395C6D62BB34ED10090705A /* mps_backend */ = { + isa = XCSwiftPackageProductDependency; + package = 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */; + productName = mps_backend; + }; + 0395C6DA2BB34ED10090705A /* portable_backend */ = { + isa = XCSwiftPackageProductDependency; + package = 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */; + productName = portable_backend; + }; + 0395C6DC2BB34ED10090705A /* quantized_backend */ = { + isa = XCSwiftPackageProductDependency; + package = 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */; + productName = quantized_backend; + }; + 0395C6DE2BB34ED10090705A /* xnnpack_backend */ = { + isa = XCSwiftPackageProductDependency; + package = 0395C6D12BB34ED10090705A /* XCRemoteSwiftPackageReference "executorch" */; + productName = xnnpack_backend; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 032C01672AC228E5002955E1 /* Project object */; +} diff --git a/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/xcshareddata/xcschemes/App.xcscheme new file mode 100644 index 0000000000..68bdac5800 --- /dev/null +++ b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/xcshareddata/xcschemes/LLaMARunner.xcscheme b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/xcshareddata/xcschemes/LLaMARunner.xcscheme new file mode 100644 index 0000000000..d820e0a5f8 --- /dev/null +++ b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/xcshareddata/xcschemes/LLaMARunner.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/demo-apps/apple_ios/LLaMA/LLaMARunner/LLaMARunner/Exported/LLaMARunner.mm b/examples/demo-apps/apple_ios/LLaMA/LLaMARunner/LLaMARunner/Exported/LLaMARunner.mm index 9cd7af0d06..51cfca9647 100644 --- a/examples/demo-apps/apple_ios/LLaMA/LLaMARunner/LLaMARunner/Exported/LLaMARunner.mm +++ b/examples/demo-apps/apple_ios/LLaMA/LLaMARunner/LLaMARunner/Exported/LLaMARunner.mm @@ -2,7 +2,7 @@ #import "LLaMARunner.h" -#import +#import #import using namespace ::torch::executor;