Skip to content

Commit dba5dcc

Browse files
committed
Add framework packages
1 parent c54ca14 commit dba5dcc

File tree

218 files changed

+42524
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+42524
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ethos-u-scratch/
1111
executorch.egg-info
1212
pip-out/
1313
__pycache__/
14+
.venv
1415

1516
# Any exported models and profiling outputs
1617
*.pte

extension/benchmark/apple/Benchmark/Benchmark.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>libbackend_coreml-ios-release.a</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64</string>
12+
<key>LibraryPath</key>
13+
<string>libbackend_coreml-ios-release.a</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
</array>
18+
<key>SupportedPlatform</key>
19+
<string>ios</string>
20+
</dict>
21+
<dict>
22+
<key>BinaryPath</key>
23+
<string>libbackend_coreml-macos-release.a</string>
24+
<key>LibraryIdentifier</key>
25+
<string>macos-arm64</string>
26+
<key>LibraryPath</key>
27+
<string>libbackend_coreml-macos-release.a</string>
28+
<key>SupportedArchitectures</key>
29+
<array>
30+
<string>arm64</string>
31+
</array>
32+
<key>SupportedPlatform</key>
33+
<string>macos</string>
34+
</dict>
35+
<dict>
36+
<key>BinaryPath</key>
37+
<string>libbackend_coreml-simulator-release.a</string>
38+
<key>LibraryIdentifier</key>
39+
<string>ios-arm64-simulator</string>
40+
<key>LibraryPath</key>
41+
<string>libbackend_coreml-simulator-release.a</string>
42+
<key>SupportedArchitectures</key>
43+
<array>
44+
<string>arm64</string>
45+
</array>
46+
<key>SupportedPlatform</key>
47+
<string>ios</string>
48+
<key>SupportedPlatformVariant</key>
49+
<string>simulator</string>
50+
</dict>
51+
</array>
52+
<key>CFBundlePackageType</key>
53+
<string>XFWK</string>
54+
<key>XCFrameworkFormatVersion</key>
55+
<string>1.0</string>
56+
</dict>
57+
</plist>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>libbackend_mps-simulator-release.a</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64-simulator</string>
12+
<key>LibraryPath</key>
13+
<string>libbackend_mps-simulator-release.a</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
</array>
18+
<key>SupportedPlatform</key>
19+
<string>ios</string>
20+
<key>SupportedPlatformVariant</key>
21+
<string>simulator</string>
22+
</dict>
23+
<dict>
24+
<key>BinaryPath</key>
25+
<string>libbackend_mps-ios-release.a</string>
26+
<key>LibraryIdentifier</key>
27+
<string>ios-arm64</string>
28+
<key>LibraryPath</key>
29+
<string>libbackend_mps-ios-release.a</string>
30+
<key>SupportedArchitectures</key>
31+
<array>
32+
<string>arm64</string>
33+
</array>
34+
<key>SupportedPlatform</key>
35+
<string>ios</string>
36+
</dict>
37+
<dict>
38+
<key>BinaryPath</key>
39+
<string>libbackend_mps-macos-release.a</string>
40+
<key>LibraryIdentifier</key>
41+
<string>macos-arm64</string>
42+
<key>LibraryPath</key>
43+
<string>libbackend_mps-macos-release.a</string>
44+
<key>SupportedArchitectures</key>
45+
<array>
46+
<string>arm64</string>
47+
</array>
48+
<key>SupportedPlatform</key>
49+
<string>macos</string>
50+
</dict>
51+
</array>
52+
<key>CFBundlePackageType</key>
53+
<string>XFWK</string>
54+
<key>XCFrameworkFormatVersion</key>
55+
<string>1.0</string>
56+
</dict>
57+
</plist>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>libbackend_xnnpack-macos-release.a</string>
10+
<key>LibraryIdentifier</key>
11+
<string>macos-arm64</string>
12+
<key>LibraryPath</key>
13+
<string>libbackend_xnnpack-macos-release.a</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
</array>
18+
<key>SupportedPlatform</key>
19+
<string>macos</string>
20+
</dict>
21+
<dict>
22+
<key>BinaryPath</key>
23+
<string>libbackend_xnnpack-ios-release.a</string>
24+
<key>LibraryIdentifier</key>
25+
<string>ios-arm64</string>
26+
<key>LibraryPath</key>
27+
<string>libbackend_xnnpack-ios-release.a</string>
28+
<key>SupportedArchitectures</key>
29+
<array>
30+
<string>arm64</string>
31+
</array>
32+
<key>SupportedPlatform</key>
33+
<string>ios</string>
34+
</dict>
35+
<dict>
36+
<key>BinaryPath</key>
37+
<string>libbackend_xnnpack-simulator-release.a</string>
38+
<key>LibraryIdentifier</key>
39+
<string>ios-arm64-simulator</string>
40+
<key>LibraryPath</key>
41+
<string>libbackend_xnnpack-simulator-release.a</string>
42+
<key>SupportedArchitectures</key>
43+
<array>
44+
<string>arm64</string>
45+
</array>
46+
<key>SupportedPlatform</key>
47+
<string>ios</string>
48+
<key>SupportedPlatformVariant</key>
49+
<string>simulator</string>
50+
</dict>
51+
</array>
52+
<key>CFBundlePackageType</key>
53+
<string>XFWK</string>
54+
<key>XCFrameworkFormatVersion</key>
55+
<string>1.0</string>
56+
</dict>
57+
</plist>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>libexecutorch-macos-release.a</string>
10+
<key>HeadersPath</key>
11+
<string>Headers</string>
12+
<key>LibraryIdentifier</key>
13+
<string>macos-arm64</string>
14+
<key>LibraryPath</key>
15+
<string>libexecutorch-macos-release.a</string>
16+
<key>SupportedArchitectures</key>
17+
<array>
18+
<string>arm64</string>
19+
</array>
20+
<key>SupportedPlatform</key>
21+
<string>macos</string>
22+
</dict>
23+
<dict>
24+
<key>BinaryPath</key>
25+
<string>libexecutorch-simulator-release.a</string>
26+
<key>HeadersPath</key>
27+
<string>Headers</string>
28+
<key>LibraryIdentifier</key>
29+
<string>ios-arm64-simulator</string>
30+
<key>LibraryPath</key>
31+
<string>libexecutorch-simulator-release.a</string>
32+
<key>SupportedArchitectures</key>
33+
<array>
34+
<string>arm64</string>
35+
</array>
36+
<key>SupportedPlatform</key>
37+
<string>ios</string>
38+
<key>SupportedPlatformVariant</key>
39+
<string>simulator</string>
40+
</dict>
41+
<dict>
42+
<key>BinaryPath</key>
43+
<string>libexecutorch-ios-release.a</string>
44+
<key>HeadersPath</key>
45+
<string>Headers</string>
46+
<key>LibraryIdentifier</key>
47+
<string>ios-arm64</string>
48+
<key>LibraryPath</key>
49+
<string>libexecutorch-ios-release.a</string>
50+
<key>SupportedArchitectures</key>
51+
<array>
52+
<string>arm64</string>
53+
</array>
54+
<key>SupportedPlatform</key>
55+
<string>ios</string>
56+
</dict>
57+
</array>
58+
<key>CFBundlePackageType</key>
59+
<string>XFWK</string>
60+
<key>XCFrameworkFormatVersion</key>
61+
<string>1.0</string>
62+
</dict>
63+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
#import "ExecuTorchLog.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
#import <Foundation/Foundation.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
/**
14+
* Defines log levels with specific character codes representing each level.
15+
*/
16+
typedef NS_ENUM(NSInteger, ExecuTorchLogLevel) {
17+
ExecuTorchLogLevelDebug = 'D',
18+
ExecuTorchLogLevelInfo = 'I',
19+
ExecuTorchLogLevelError = 'E',
20+
ExecuTorchLogLevelFatal = 'F',
21+
ExecuTorchLogLevelUnknown = '?'
22+
} NS_SWIFT_NAME(LogLevel);
23+
24+
/**
25+
* A protocol defining the requirements for a log sink to receive log messages.
26+
*/
27+
NS_SWIFT_NAME(LogSink)
28+
@protocol ExecuTorchLogSink
29+
30+
/**
31+
* Logs a message with the specified additional info.
32+
*
33+
* @param level The log level of the message.
34+
* @param timestamp The timestamp of the log message since ExecuTorch PAL start.
35+
* @param filename The name of the file generating the log message.
36+
* @param line The line number in the file where the log message was generated.
37+
* @param message The log message text.
38+
*/
39+
- (void)logWithLevel:(ExecuTorchLogLevel)level
40+
timestamp:(NSTimeInterval)timestamp
41+
filename:(NSString *)filename
42+
line:(NSUInteger)line
43+
message:(NSString *)message
44+
NS_SWIFT_NAME(log(level:timestamp:filename:line:message:));
45+
46+
@end
47+
48+
/**
49+
* A singleton class for managing log sinks and dispatching log messages.
50+
*/
51+
NS_SWIFT_NAME(Log)
52+
@interface ExecuTorchLog : NSObject
53+
54+
/// The shared singleton log instance.
55+
@property(class, readonly) ExecuTorchLog *sharedLog;
56+
57+
/**
58+
* Adds a log sink to receive log messages.
59+
*
60+
* @param sink The log sink to add.
61+
*/
62+
- (void)addSink:(id<ExecuTorchLogSink>)sink NS_SWIFT_NAME(add(sink:));
63+
64+
/**
65+
* Removes a previously added log sink.
66+
*
67+
* @param sink The log sink to remove.
68+
*/
69+
- (void)removeSink:(id<ExecuTorchLogSink>)sink NS_SWIFT_NAME(remove(sink:));
70+
71+
+ (instancetype)new NS_UNAVAILABLE;
72+
- (instancetype)init NS_UNAVAILABLE;
73+
74+
@end
75+
76+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)