Upload exec_time explicitely, not in destructor (#5511)
authorДилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 <d.poshshoev@samsung.com>
Tue, 2 Jul 2019 01:41:59 +0000 (04:41 +0300)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 2 Jul 2019 01:41:59 +0000 (10:41 +0900)
commitf932557ec1c685f32727433785a6e8fa29739954
treeb4e600c340591d5039fccc03adbeacffb829ff77
parent01e9bf2e390eca39682055b787da6cb7e053b085
Upload exec_time explicitely, not in destructor (#5511)

Since exec time is updated just in case of turned on profiler, no need
to upload it in a destructor. Moreover, since graph::Graph is reusable,
in its next usages BackendResolver will be recreated without destructing
JSON/ExecTime/Graph, so Backend, that is pointed by
JSON::_measurements.first in the first call is destructed and
JSON::uploadOperationsExecTime will cause a segmentation error in
`printString(backend.first->config()->id(), stream);`

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
runtimes/neurun/core/include/backend/ExecTime.h
runtimes/neurun/core/include/backend/JSONExecTime.h
runtimes/neurun/core/include/exec/ExecutionObservers.h
runtimes/neurun/core/src/exec/DataflowExecutor.cc
runtimes/neurun/test/core/backend/ExecTime.test.cc