diff options
Diffstat (limited to 'src/armnn/Network.cpp')
-rw-r--r-- | src/armnn/Network.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp index 42388bfbd7..e81b87b382 100644 --- a/src/armnn/Network.cpp +++ b/src/armnn/Network.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2017,2022,2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -1731,8 +1731,17 @@ IOptimizedNetworkPtr Optimize(const Graph& inGraph, else if (options.m_DebugToFile) { // Setup the output file path - armnnUtils::Filesystem::CreateDirectory("/ArmNNIntermediateLayerOutputs"); - Optimizer::Pass(optGraph, MakeOptimizations(InsertDebugToFileLayer())); + try + { + auto result = armnnUtils::Filesystem::CreateDirectory("/ArmNNIntermediateLayerOutputs"); + ARMNN_LOG(info) << "Intermediate tensors will be written to: " << result; + Optimizer::Pass(optGraph, MakeOptimizations(InsertDebugToFileLayer())); + } + catch (const armnn::RuntimeException& e) + { + // If we cannot create the output directory then we'll issue a warning and continue. + ARMNN_LOG(warning) << "Unable to print intermediate layer outputs : " << e.what(); + } } // Calculate the compatibility strategies for tensor handles |