[Utils] Add Memory profile feature to Profiler
authorJiho Chu <jiho.chu@samsung.com>
Mon, 30 May 2022 04:56:38 +0000 (13:56 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Tue, 31 May 2022 04:39:01 +0000 (13:39 +0900)
commitb33ef665cd7dc4b12220048f705930a0a12047f8
treeecc58e21812090cd3fbdb7633960d8e1daecf58b
parenta14b579603238676ecfc0d27cb9cd4df0fe5221f
[Utils] Add Memory profile feature to Profiler

This patch implement memory profiling feature.

Profile is refactored to handle memory statics information.
Unnecessary dependency from ProfileListener to Profile
class is removed, and inner information is redesigned to handle
both time and memory profiling.

For the memory profile, below infomation is managed:

event: ALLOC | DEALLOC
current size: total allocated memory size
info: user friendly tag for the analysis
duration: time interval between alloc and dealloc

Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
Applications/MNIST/jni/main.cpp
nntrainer/graph/network_graph.cpp
nntrainer/layers/layer_node.cpp
nntrainer/models/neuralnet.cpp
nntrainer/tensor/memory_pool.cpp
nntrainer/utils/profiler.cpp
nntrainer/utils/profiler.h