Skip to content

Commit ca8a22e

Browse files
metascroyfacebook-github-bot
authored andcommitted
Re-introduce some logging after backout
Summary: Since D80715432 landed, we also landed D81256207 to add more logging. To prevent conflicts, we backout in 3 steps: * In diff 1/3, we backout D81256207, which added more logging * In diff 2/3, we backout D80715432, which is the problematic diff we're trying to revert * In diff 3/3, we introduce some of the logging we backed out in diff 1/3 Differential Revision: D82581441
1 parent b991271 commit ca8a22e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,13 @@ - (nullable NSURL *)compiledModelURLWithIdentifier:(NSString *)identifier
436436
switch (modelAssetType.value()) {
437437
case ModelAssetType::CompiledModel: {
438438
// Model is already compiled.
439+
ETCoreMLLogInfo("The model in the pte file is pre-compiled. Skipping compilation.");
439440
return modelURL;
440441
}
441442

442443
case ModelAssetType::Model: {
443444
// Compile the model.
445+
ETCoreMLLogInfo("The model in the pte file is not pre-compiled. Compiling with a 5 min timeout.");
444446
NSURL *compiledModelURL = [ETCoreMLModelCompiler compileModelAtURL:modelURL
445447
maxWaitTimeInSeconds:(5 * 60)
446448
error:error];

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ MLComputeUnits get_compute_units(const Buffer& buffer) {
8080
}
8181

8282
NSURL *database_url = [database_directory_url URLByAppendingPathComponent:database_name];
83+
84+
85+
ETCoreMLLogInfo("Creating ETCoreMLAssetManager with the following paths:");
86+
ETCoreMLLogInfo("databaseURL: %@", database_url);
87+
ETCoreMLLogInfo("assetsDirectoryURL: %@", assets_directory_url);
88+
ETCoreMLLogInfo("trashDirectoryURL: %@", trash_directory_url);
8389
ETCoreMLAssetManager *manager = [[ETCoreMLAssetManager alloc] initWithDatabaseURL:database_url
8490
assetsDirectoryURL:assets_directory_url
8591
trashDirectoryURL:trash_directory_url

0 commit comments

Comments
 (0)