Skip to content

Commit e0ed175

Browse files
committed
Address comments
1 parent 9a5c951 commit e0ed175

22 files changed

+73
-52
lines changed

backends/apple/coreml/runtime/delegate/ETCoreMLAsset.mm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
//
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

8-
#import "ETCoreMLLogging.h"
98
#import "ETCoreMLAsset.h"
109

10+
#import "ETCoreMLLogging.h"
11+
#import "objc_safe_cast.h"
12+
1113
#import <fcntl.h>
1214
#import <os/lock.h>
1315
#import <stdio.h>
1416
#import <system_error>
15-
16-
#import "objc_safe_cast.h"
17-
1817
namespace {
1918
using namespace executorchcoreml;
2019

backends/apple/coreml/runtime/delegate/ETCoreMLAssetManager.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

88
#import "ETCoreMLAssetManager.h"
9+
910
#import "ETCoreMLAsset.h"
1011
#import "ETCoreMLLogging.h"
1112
#import "database.hpp"
12-
#import <iostream>
1313
#import "json_key_value_store.hpp"
1414
#import "serde_json.h"
15+
16+
#import <iostream>
1517
#import <sstream>
1618

1719
namespace {

backends/apple/coreml/runtime/delegate/ETCoreMLDefaultModelExecutor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//
2-
// ETCoreMLDefaultModelExecutor.h
3-
// executorchcoreml_tests
2+
// ETCoreMLDefaultModelExecutor.h
43
//
5-
// Created by Gyan Sinha on 2/25/24.
4+
// Copyright © 2024 Apple Inc. All rights reserved.
65
//
6+
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

88
#import <CoreML/CoreML.h>
99

backends/apple/coreml/runtime/delegate/ETCoreMLDefaultModelExecutor.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//
2-
// ETCoreMLDefaultModelExecutor.m
3-
// executorchcoreml_tests
2+
// ETCoreMLDefaultModelExecutor.mm
43
//
5-
// Created by Gyan Sinha on 2/25/24.
4+
// Copyright © 2024 Apple Inc. All rights reserved.
65
//
6+
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

88
#import "ETCoreMLAsset.h"
99
#import "ETCoreMLDefaultModelExecutor.h"

backends/apple/coreml/runtime/delegate/ETCoreMLLogging.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

88
#import <Foundation/Foundation.h>
9+
#import <os/log.h>
910

1011
#import <executorch/runtime/platform/log.h>
11-
#import <os/log.h>
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414

@@ -51,9 +51,9 @@ typedef NS_ERROR_ENUM(ETCoreMLErrorDomain, ETCoreMLError) {
5151
#define ETCoreMLLogError(error, formatString, ...) \
5252
do { \
5353
NSString *message = error.localizedDescription; \
54-
message = [NSString stringWithFormat:@"[Core ML] " formatString " %@", ##__VA_ARGS__, message]; \
54+
message = [NSString stringWithFormat:@"[Core ML] " formatString " %@", ##__VA_ARGS__, message]; \
5555
ET_LOG(Error, "%s", message.UTF8String); \
56-
} while(0) \
56+
} while(0)
5757
#else
5858
#define ETCoreMLLogError(error, formatString, ...) \
5959
os_log_error(ETCoreMLErrorUtils.loggingChannel, formatString " %@", ##__VA_ARGS__, error.localizedDescription);
@@ -77,7 +77,7 @@ typedef NS_ERROR_ENUM(ETCoreMLErrorDomain, ETCoreMLError) {
7777
if (errorOut) { \
7878
*errorOut = localError; \
7979
} \
80-
} while (0)
80+
} while(0)
8181

8282
/// Record the error and its underlying error with `os_log_error` and fills `*errorOut` with `NSError`.
8383
#define ETCoreMLLogUnderlyingErrorAndSetNSError(errorOut, errorCode, underlyingNSError, formatString, ...) \
@@ -88,7 +88,7 @@ typedef NS_ERROR_ENUM(ETCoreMLErrorDomain, ETCoreMLError) {
8888
underlyingError:underlyingNSError \
8989
format:@formatString, ##__VA_ARGS__]; \
9090
} \
91-
} while(0) \
91+
} while(0)
9292

9393

9494
#pragma clang diagnostic pop

backends/apple/coreml/runtime/delegate/ETCoreMLLogging.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

88
#import "ETCoreMLLogging.h"
9+
910
#import "ETCoreMLStrings.h"
1011

1112
const NSErrorDomain ETCoreMLErrorDomain = @"com.apple.executorchcoreml";

backends/apple/coreml/runtime/delegate/ETCoreMLModelCompiler.mm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
//
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

8-
#import <ETCoreMLModelCompiler.h>
9-
#import <ETCoreMLLogging.h>
8+
#import "ETCoreMLModelCompiler.h"
9+
10+
#import "ETCoreMLLogging.h"
11+
1012
#import <TargetConditionals.h>
1113

1214
@implementation ETCoreMLModelCompiler

backends/apple/coreml/runtime/delegate/ETCoreMLModelLoader.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
//
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

8+
#import "ETCoreMLModelLoader.h"
9+
10+
#import "asset.h"
811
#import "ETCoreMLAsset.h"
912
#import "ETCoreMLAssetManager.h"
1013
#import "ETCoreMLDefaultModelExecutor.h"
1114
#import "ETCoreMLLogging.h"
1215
#import "ETCoreMLModel.h"
13-
#import "ETCoreMLModelLoader.h"
14-
#import "asset.h"
1516
#import "model_metadata.h"
1617

1718
using namespace executorchcoreml;

backends/apple/coreml/runtime/delegate/ETCoreMLModelManager.mm

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,30 @@
55
//
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

8+
#import "ETCoreMLModelManager.h"
9+
810
#import "ETCoreMLAsset.h"
9-
#include <Foundation/Foundation.h>
1011
#import "ETCoreMLAssetManager.h"
1112
#import "ETCoreMLDefaultModelExecutor.h"
1213
#import "ETCoreMLLogging.h"
1314
#import "ETCoreMLModel.h"
1415
#import "ETCoreMLModelCompiler.h"
1516
#import "ETCoreMLModelExecutor.h"
1617
#import "ETCoreMLModelLoader.h"
17-
#import "ETCoreMLModelManager.h"
1818
#import "ETCoreMLStrings.h"
1919
#import "MLModel_Prewarm.h"
2020
#import "MLMultiArray_Copy.h"
21-
#import <filesystem>
2221
#import "inmemory_filesystem_utils.hpp"
23-
#import <iostream>
24-
#import <memory>
2522
#import "model_metadata.h"
2623
#import "multiarray.h"
2724
#import "objc_array_util.h"
25+
#import "serde_json.h"
26+
27+
#import <filesystem>
28+
#import <iostream>
29+
#import <memory>
2830
#import <optional>
2931
#import <os/lock.h>
30-
#import "serde_json.h"
3132
#import <string>
3233
#import <system_error>
3334
#import <vector>

backends/apple/coreml/runtime/delegate/MLModel_Prewarm.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Please refer to the license found in the LICENSE file in the root directory of the source tree.
77

88
#import "MLModel_Prewarm.h"
9+
910
#import <algorithm>
1011

1112
@interface MLMultiArray (Prewarm)

0 commit comments

Comments
 (0)