[graph] Reduce metadata overhead of slice realizer
authorParichay Kapoor <pk.kapoor@samsung.com>
Mon, 15 Nov 2021 05:16:35 +0000 (14:16 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Thu, 25 Nov 2021 09:16:39 +0000 (18:16 +0900)
commit8f1b70b31c60c4678f04a51e53af7aa140b08fc9
tree216efd0e9e22ec5bb7039d7159c9ca8e912866e9
parent2a9c79571b6b70be1ab425e2cccdeb59df6495a6
[graph] Reduce metadata overhead of slice realizer

Slice realizer was storing the path for each node from the start nodes
to themselves. This can be big, and also comes with a overhead of
storing and copying these paths for each node.

This patch updates the implementation of the dfs to a recursive approach
which maintains the stack of the nodes in the memory which represents
the path till now.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
nntrainer/compiler/slice_realizer.cpp
test/unittest/compiler/unittest_realizer.cpp