99#import < XCTest/XCTest.h>
1010
1111#import < objc/runtime.h>
12+ #import < sys/utsname.h>
1213#import < UIKit/UIDevice.h>
1314
1415#import < executorch/extension/module/module.h>
@@ -27,7 +28,12 @@ @implementation DeviceInfo
2728
2829+(NSString *)getDeviceInfo {
2930 NSString *device = [[UIDevice currentDevice ] model ];
30- NSString *name = [[UIDevice currentDevice ] name ];
31+
32+ // i.e. iPhone15
33+ struct utsname systemInfo;
34+ uname (&systemInfo);
35+ NSString *name = [NSString stringWithCString: systemInfo.machine encoding: NSUTF8StringEncoding];
36+
3137 NSString *systemName = [[UIDevice currentDevice ] systemName ];
3238 NSString *systemVersion = [[UIDevice currentDevice ] systemVersion ];
3339 return [NSString stringWithFormat: @" %@ _%@ _%@ _%@ " , device, name, systemName, systemVersion];
@@ -90,7 +96,7 @@ + (void)initialize {
9096 [self class ], testLoadSelector, testLoadImplementation, " v@:" );
9197
9298 SEL testForwardSelector = NSSelectorFromString ([NSString
93- stringWithFormat: @" test_forward_%@ _%@ " , directoryName, modelName]);
99+ stringWithFormat: @" test_forward_%@ _%@ _ %@ " , directoryName, modelName, deviceInfo ]);
94100 IMP testForwardImplementation = imp_implementationWithBlock (^(
95101 id _self) {
96102 auto __block module = std::make_unique<Module>(modelPath.UTF8String );
0 commit comments