diff options
Diffstat (limited to 'ArmnnPreparedModel_1_3.cpp')
-rw-r--r-- | ArmnnPreparedModel_1_3.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ArmnnPreparedModel_1_3.cpp b/ArmnnPreparedModel_1_3.cpp index abd135e8..36575b86 100644 --- a/ArmnnPreparedModel_1_3.cpp +++ b/ArmnnPreparedModel_1_3.cpp @@ -254,6 +254,12 @@ ArmnnPreparedModel_1_3<HalVersion>::~ArmnnPreparedModel_1_3() { // Get a hold of the profiler used by this model. std::shared_ptr<armnn::IProfiler> profiler = m_Runtime->GetProfiler(m_NetworkId); + if (profiler && m_GpuProfilingEnabled) + { + // Dump the profiling info to a file if required. + DumpJsonProfilingIfRequired(m_GpuProfilingEnabled, m_RequestInputsAndOutputsDumpDir, m_NetworkId, + profiler.get()); + } // Unload the network associated with this model. m_Runtime->UnloadNetwork(m_NetworkId); @@ -263,9 +269,6 @@ ArmnnPreparedModel_1_3<HalVersion>::~ArmnnPreparedModel_1_3() { m_Threadpool->UnloadMemHandles(m_NetworkId); } - - // Dump the profiling info to a file if required. - DumpJsonProfilingIfRequired(m_GpuProfilingEnabled, m_RequestInputsAndOutputsDumpDir, m_NetworkId, profiler.get()); } template<typename HalVersion> |