From 147248f7c1cbcec83e2b3abfc5994e92aba4a74e Mon Sep 17 00:00:00 2001 From: SaeHie Park Date: Wed, 22 Jan 2025 15:06:19 +0900 Subject: [PATCH] [luci/partition] Fix for staic analysis This will fix for static analysis to check null and throw. Signed-off-by: SaeHie Park --- compiler/luci/partition/src/PartitionPModules.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/luci/partition/src/PartitionPModules.cpp b/compiler/luci/partition/src/PartitionPModules.cpp index 9912305b347..a27a16640b5 100644 --- a/compiler/luci/partition/src/PartitionPModules.cpp +++ b/compiler/luci/partition/src/PartitionPModules.cpp @@ -96,7 +96,8 @@ std::unique_ptr clone_graph(loco::Graph *graph_org, luci::CloneCont // clone inputs auto inputs = graph_org->inputs(); - assert(inputs); + if (inputs == nullptr) + throw std::runtime_error("clone_graph: graph has no inputs"); for (uint32_t n = 0; n < inputs->size(); ++n) { auto input_org = luci::input_node(graph_org, n);