Skip to content

Commit

Permalink
Fix lint in clang-format (#3041)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3041

We are updating to clang-formatter 18.

The current clang-format in coreml code has duplicate key. Deleting one of them.

See context D56139356

bypass-github-export-checks
bypass-github-pytorch-ci-checks
bypass-github-executorch-ci-checks

Reviewed By: cccclai

Differential Revision: D56139927

fbshipit-source-id: 937f58092abd6f695304ee2a5dd38bc4b8412ec0
  • Loading branch information
mergennachin authored and facebook-github-bot committed Apr 15, 2024
1 parent 7616d42 commit 7c81155
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 12 deletions.
1 change: 0 additions & 1 deletion backends/apple/coreml/.clang-format
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
BasedOnStyle: WebKit
BreakBeforeBraces: Attach
AllowShortIfStatementsOnASingleLine: false
BreakBeforeBinaryOperators: None
BreakConstructorInitializers: BeforeColon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

NS_ASSUME_NONNULL_BEGIN
/// The default model executor, the executor ignores logging options.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLDefaultModelExecutor : NSObject<ETCoreMLModelExecutor>
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLDefaultModelExecutor : NSObject<ETCoreMLModelExecutor>

+ (instancetype)new NS_UNAVAILABLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

NS_ASSUME_NONNULL_BEGIN
/// A class responsible for compiling a CoreML model.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelCompiler : NSObject
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLModelCompiler : NSObject

+ (instancetype)new NS_UNAVAILABLE;

Expand Down
3 changes: 2 additions & 1 deletion backends/apple/coreml/runtime/delegate/ETCoreMLModelLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ struct ModelMetadata;

NS_ASSUME_NONNULL_BEGIN
/// A class responsible for loading a CoreML model.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelLoader : NSObject
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLModelLoader : NSObject

+ (instancetype)new NS_UNAVAILABLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class ModelEventLogger;
typedef void ModelHandle;

/// A class responsible for managing the models loaded by the delegate.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelManager : NSObject
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLModelManager : NSObject

+ (instancetype)new NS_UNAVAILABLE;

Expand Down
3 changes: 1 addition & 2 deletions backends/apple/coreml/runtime/kvstore/key_value_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ get_create_store_statement(std::string_view store_name, StorageType key_storage_

std::string get_create_index_statement(std::string_view store_name, std::string_view column_name) {
std::stringstream ss;
ss << "CREATE INDEX IF NOT EXISTS " << column_name << "_INDEX"
<< " ON " << store_name << "(" << column_name << ")";
ss << "CREATE INDEX IF NOT EXISTS " << column_name << "_INDEX" << " ON " << store_name << "(" << column_name << ")";

return ss.str();
}
Expand Down
3 changes: 2 additions & 1 deletion backends/apple/coreml/runtime/sdk/ETCoreMLModelDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ typedef NSDictionary<ETCoreMLModelStructurePath*, MLMultiArray*> ETCoreMLModelOu

NS_ASSUME_NONNULL_BEGIN
/// A class responsible for debugging a model.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelDebugger : NSObject
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLModelDebugger : NSObject

- (instancetype)init NS_UNAVAILABLE;

Expand Down
3 changes: 2 additions & 1 deletion backends/apple/coreml/runtime/sdk/ETCoreMLModelProfiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ typedef NSDictionary<ETCoreMLModelStructurePath*, ETCoreMLOperationProfilingInfo

NS_ASSUME_NONNULL_BEGIN
/// A class responsible for profiling a model.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelProfiler : NSObject
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLModelProfiler : NSObject

- (instancetype)init NS_UNAVAILABLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
///
/// The class is a thin wrapper over `executorchcoreml::modelstructure::path`.
///
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelStructurePath : NSObject<NSCopying>
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLModelStructurePath : NSObject<NSCopying>

- (instancetype)init NS_UNAVAILABLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
NS_ASSUME_NONNULL_BEGIN

/// A class representing the profiling info of an operation.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLOperationProfilingInfo : NSObject<NSCopying>
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLOperationProfilingInfo : NSObject<NSCopying>

- (instancetype)init NS_UNAVAILABLE;

Expand Down
3 changes: 2 additions & 1 deletion backends/apple/coreml/runtime/sdk/ETCoreMLPair.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

NS_ASSUME_NONNULL_BEGIN
/// A class representing a pair with first and second objects.
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLPair<First, Second> : NSObject<NSCopying>
__attribute__((objc_subclassing_restricted))
@interface ETCoreMLPair<First, Second> : NSObject<NSCopying>

- (instancetype)init NS_UNAVAILABLE;

Expand Down

0 comments on commit 7c81155

Please sign in to comment.