Skip to content

Commit c20e8ab

Browse files
authored
Create intermediate directories in ETCoreMLModelManager (#9562)
ETCoreML crashes in FB app. During debugging, we traced issue down to this. cc @kimishpatel @YifanShenSZ @cymbalrush
1 parent 644b7dd commit c20e8ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void set_outputs(std::vector<executorchcoreml::MultiArray>& outputs,
208208
const inmemoryfs::InMemoryFileSystem *inmemory_fs,
209209
NSError * __autoreleasing *error) {
210210
NSError *local_error = nil;
211-
if (![fm createDirectoryAtURL:dst_url withIntermediateDirectories:NO attributes:@{} error:error]) {
211+
if (![fm createDirectoryAtURL:dst_url withIntermediateDirectories:YES attributes:@{} error:error]) {
212212
ETCoreMLLogUnderlyingErrorAndSetNSError(error,
213213
ETCoreMLErrorModelSaveFailed,
214214
local_error,

0 commit comments

Comments
 (0)