summaryrefslogtreecommitdiff
path: root/runtimes/neurun/test/graph/verifier/Verifier.cc
diff options
context:
space:
mode:
authorChunseok Lee <chunseok.lee@samsung.com>2020-03-05 15:10:09 +0900
committerChunseok Lee <chunseok.lee@samsung.com>2020-03-05 15:22:53 +0900
commitd91a039e0eda6fd70dcd22672b8ce1817c1ca50e (patch)
tree62668ec548cf31fadbbf4e99522999ad13434a25 /runtimes/neurun/test/graph/verifier/Verifier.cc
parentbd11b24234d7d43dfe05a81c520aa01ffad06e42 (diff)
downloadnnfw-d91a039e0eda6fd70dcd22672b8ce1817c1ca50e.tar.gz
nnfw-d91a039e0eda6fd70dcd22672b8ce1817c1ca50e.tar.bz2
nnfw-d91a039e0eda6fd70dcd22672b8ce1817c1ca50e.zip
catch up to tizen_5.5 and remove unness dir
- update to tizen_5.5 - remove dirs
Diffstat (limited to 'runtimes/neurun/test/graph/verifier/Verifier.cc')
-rw-r--r--runtimes/neurun/test/graph/verifier/Verifier.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/runtimes/neurun/test/graph/verifier/Verifier.cc b/runtimes/neurun/test/graph/verifier/Verifier.cc
index a37b0ac1f..45e4d727b 100644
--- a/runtimes/neurun/test/graph/verifier/Verifier.cc
+++ b/runtimes/neurun/test/graph/verifier/Verifier.cc
@@ -16,36 +16,37 @@
#include <gtest/gtest.h>
-#include "model/operation/Node.h"
+#include "model/Operation.h"
#include "graph/Graph.h"
#include "graph/verifier/Verifier.h"
#include "cpp14/memory.h"
-#include "model/operand/Object.h"
+#include "model/Model.h"
+#include "model/Operand.h"
#include "../MockNode.h"
-using IndexSet = neurun::model::operand::IndexSet;
+using IndexSet = neurun::model::OperandIndexSequence;
using MockNode = neurun_test::graph::SimpleMockNode;
TEST(Verifier, dag_checker)
{
- neurun::graph::Graph graph;
- neurun::graph::verifier::DAGChecker verifier;
+ std::unique_ptr<neurun::model::Model> model = nnfw::cpp14::make_unique<neurun::model::Model>();
- ::neurun::model::operand::Shape shape{1u};
- ::neurun::model::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
- shape.dim(0) = 3;
+ ::neurun::model::Shape shape{3};
+ ::neurun::model::TypeInfo type{neurun::model::DataType::INT32};
- auto operand1 = graph.addOperand(shape, type);
- auto operand2 = graph.addOperand(shape, type);
+ auto operand1 = model->operands.emplace(shape, type);
+ auto operand2 = model->operands.emplace(shape, type);
- graph.addInput(operand1);
- graph.operands().at(operand1).setAsModelInput();
- graph.addOutput(operand2);
- graph.operands().at(operand2).setAsOperationOutput();
+ model->inputs.append(operand1);
+ model->outputs.append(operand2);
- graph.addOperation(nnfw::cpp14::make_unique<MockNode>(IndexSet{operand1}, IndexSet{operand2}));
+ model->operations.push(
+ nnfw::cpp14::make_unique<MockNode>(IndexSet{operand1}, IndexSet{operand2}));
+ neurun::graph::Graph graph{std::move(model)};
graph.finishBuilding();
+ neurun::graph::verifier::DAGChecker verifier;
+
ASSERT_EQ(verifier.verify(graph), true);
}