1 // 2 // ETCoreMLModelDebugInfo.h 3 // 4 // Copyright © 2024 Apple Inc. All rights reserved. 5 // 6 // Please refer to the license found in the LICENSE file in the root directory of the source tree. 7 8 #import <Foundation/Foundation.h> 9 10 @class ETCoreMLModelStructurePath; 11 12 NS_ASSUME_NONNULL_BEGIN 13 14 /// A class representing the profiling info of an operation. 15 __attribute__((objc_subclassing_restricted)) 16 @interface ETCoreMLModelDebugInfo : NSObject 17 18 - (instancetype)init NS_UNAVAILABLE; 19 20 + (instancetype)new NS_UNAVAILABLE; 21 22 23 /// Constructs an `ETCoreMLModelDebugInfo` instance. 24 /// 25 /// @param pathToDebugSymbolMap Operation path to debug symbol map. 26 /// @param pathToDebugHandlesMap Operation path to debug handles map. 27 - (instancetype)initWithPathToDebugSymbolMap:(NSDictionary<ETCoreMLModelStructurePath*, NSString*>*)pathToDebugSymbolMap 28 pathToDebugHandlesMap: 29 (NSDictionary<ETCoreMLModelStructurePath*, NSArray<NSString*>*>*)pathToDebugHandlesMap 30 NS_DESIGNATED_INITIALIZER; 31 32 /// Constructs an `ETCoreMLModelDebugInfo` instance. 33 /// 34 /// @param data The json data. 35 /// @param error On failure, error is filled with the failure information. 36 + (nullable instancetype)modelDebugInfoFromData:(NSData*)data error:(NSError* __autoreleasing*)error; 37 38 /// Operation path to debug symbol map. 39 @property (readonly, strong, nonatomic) NSDictionary<ETCoreMLModelStructurePath*, NSString*>* pathToDebugSymbolMap; 40 41 /// Operation path to debug handles map. 42 @property (readonly, strong, nonatomic) 43 NSDictionary<ETCoreMLModelStructurePath*, NSArray<NSString*>*>* pathToDebugHandlesMap; 44 45 @end 46 47 NS_ASSUME_NONNULL_END 48