-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add iOS bindings to ExecuTorch (#39)
## Description This PR provides a bridge between native ExecuTorch iOS API and TypeScript. It allows to perform basic ET operations such as running methods from arrays and loading them. ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update (improves or adds clarity to existing documentation) ### Tested on - [x] iOS - [ ] Android ### Testing instructions <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues <!-- Link related issues here using #issue-number --> ### Checklist - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
- Loading branch information
Showing
25 changed files
with
383 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+12.6 MB
...mulator/LLaMARunner.framework/LLaMARunner → ...tor/ExecutorchLib.framework/ExecutorchLib
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/ETModel.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef ETModel_hpp | ||
#define ETModel_hpp | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ETModel : NSObject | ||
|
||
- (NSNumber *)loadModel:(NSString *)filePath; | ||
- (NSNumber *)loadMethod:(NSString *)methodName; | ||
- (NSNumber *)loadForward; | ||
- (NSArray *)forward:(NSArray *)input | ||
shape:(NSArray *)shape | ||
inputType:(NSNumber *)inputType; | ||
|
||
@end | ||
|
||
#endif // ETModel_hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+742 Bytes
...imulator/LLaMARunner.framework/Info.plist → ...ulator/ExecutorchLib.framework/Info.plist
Binary file not shown.
Binary file renamed
BIN
+12.3 MB
...s-arm64/LLaMARunner.framework/LLaMARunner → ...m64/ExecutorchLib.framework/ExecutorchLib
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/ETModel.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef ETModel_hpp | ||
#define ETModel_hpp | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ETModel : NSObject | ||
|
||
- (NSNumber *)loadModel:(NSString *)filePath; | ||
- (NSNumber *)loadMethod:(NSString *)methodName; | ||
- (NSNumber *)loadForward; | ||
- (NSArray *)forward:(NSArray *)input | ||
shape:(NSArray *)shape | ||
inputType:(NSNumber *)inputType; | ||
|
||
@end | ||
|
||
#endif // ETModel_hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+762 Bytes
...os-arm64/LLaMARunner.framework/Info.plist → ...-arm64/ExecutorchLib.framework/Info.plist
Binary file not shown.
6 changes: 0 additions & 6 deletions
6
...LaMARunner.xcframework/ios-arm64-simulator/LLaMARunner.framework/Modules/module.modulemap
This file was deleted.
Oops, something went wrong.
124 changes: 0 additions & 124 deletions
124
...Runner.xcframework/ios-arm64-simulator/LLaMARunner.framework/_CodeSignature/CodeResources
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
ios/LLaMARunner.xcframework/ios-arm64/LLaMARunner.framework/Modules/module.modulemap
This file was deleted.
Oops, something went wrong.
124 changes: 0 additions & 124 deletions
124
ios/LLaMARunner.xcframework/ios-arm64/LLaMARunner.framework/_CodeSignature/CodeResources
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.