aboutsummaryrefslogtreecommitdiff
path: root/ArmnnPreparedModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ArmnnPreparedModel.cpp')
-rw-r--r--ArmnnPreparedModel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ArmnnPreparedModel.cpp b/ArmnnPreparedModel.cpp
index d338fdc8..1395377e 100644
--- a/ArmnnPreparedModel.cpp
+++ b/ArmnnPreparedModel.cpp
@@ -227,6 +227,11 @@ void ArmnnPreparedModel::ExecuteGraph(std::shared_ptr<std::vector<::android::nn:
{
ALOGV("ArmnnPreparedModel::ExecuteGraph(...)");
+ if (m_GpuProfilingEnabled)
+ {
+ m_Runtime->GetProfiler(m_NetworkId)->EnableProfiling(true);
+ }
+
DumpTensorsIfRequired("Input", *pInputTensors);
// run it
@@ -243,6 +248,11 @@ void ArmnnPreparedModel::ExecuteGraph(std::shared_ptr<std::vector<::android::nn:
DumpTensorsIfRequired("Output", *pOutputTensors);
+ if (m_GpuProfilingEnabled && !m_RequestInputsAndOutputsDumpDir.empty())
+ {
+ DumpJsonProfiling(m_RequestInputsAndOutputsDumpDir, m_Runtime, m_NetworkId);
+ }
+
// Commit output buffers.
// Note that we update *all* pools, even if they aren't actually used as outputs -
// this is simpler and is what the CpuExecutor does.