From 5d8b423393d19ffacfb51b9d0a2954b23c629b0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EA=B9=80=EC=9A=A9=EC=84=AD/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Wed, 14 Nov 2018 17:21:56 +0900 Subject: [PATCH] [neurun] Remove NDEBUG in planTensors (#3579) * [neurun] Remove NDEBUG in planTensors Removes NDEBUG code in Linear::planTensors. Signed-off-by: Yongseop Kim * Fix format-checker failed --- runtimes/neurun/src/linear/Linear.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtimes/neurun/src/linear/Linear.cc b/runtimes/neurun/src/linear/Linear.cc index 2f97731..f1cbfe6 100644 --- a/runtimes/neurun/src/linear/Linear.cc +++ b/runtimes/neurun/src/linear/Linear.cc @@ -14,6 +14,8 @@ * limitations under the License. */ +#include + #include "Linear.h" #include "graph/Graph.h" @@ -173,11 +175,9 @@ backend::TensorBuilderSet Linear::planTensors() } } -#ifndef NDEBUG // Now, model outputs should be not deallocated - for (const auto &ind : _graph.getOutputs()) - assert(uses_map[ind] > 0); -#endif + assert(std::all_of(_graph.getOutputs().begin(), _graph.getOutputs().end(), + [&uses_map](const graph::operand::Index &ind) { return uses_map[ind] > 0; })); // Set subtensor information // Todo: move this phase outside as optimization phase -- 2.7.4