20.11
ProtoxtFixture.cpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017 Arm Ltd. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#include <boost/test/unit_test.hpp>
7
#include "
armnnOnnxParser/IOnnxParser.hpp
"
8
#include "
ParserPrototxtFixture.hpp
"
9
10
BOOST_AUTO_TEST_SUITE
(OnnxParser)
11
12
struct
ProtoxtTestFixture :
public
armnnUtils::ParserPrototxtFixture
<armnnOnnxParser::IOnnxParser>
13
{
14
ProtoxtTestFixture()
15
{
16
m_Prototext
= R
"(
17
ir_version: 3
18
producer_name: "CNTK "
19
producer_version: "2.5.1 "
20
domain: "ai.cntk "
21
model_version: 1
22
graph {
23
name: "CNTKGraph "
24
node {
25
input: "Input"
26
output: "Output"
27
name: "Plus112"
28
op_type: "Add "
29
}
30
input {
31
name: "Input"
32
type {
33
tensor_type {
34
elem_type: 1
35
shape {
36
dim {
37
dim_value: 2
38
}
39
}
40
}
41
}
42
}
43
output {
44
name: "Output"
45
type {
46
tensor_type {
47
elem_type: 1
48
shape {
49
dim {
50
dim_value: 1
51
}
52
dim {
53
dim_value: 10
54
}
55
}
56
}
57
}
58
}
59
}
60
opset_import {
61
version: 7
62
})";
63
// Setup();
64
}
65
};
66
67
68
BOOST_FIXTURE_TEST_CASE
(ProtoxtTest, ProtoxtTestFixture)
69
{
70
//TODO : add a test to check if the inputs and outputs are correctly inferred.
71
}
72
73
BOOST_FIXTURE_TEST_CASE
(ProtoxtTestWithBadInputs, ProtoxtTestFixture)
74
{
75
76
// BOOST_CHECK_THROW(RunTest<4>({{ "InexistantInput" , {0.0, 1.0, 2.0, 3.0}}},
77
// {{ "InexistantOutput" , {0.0, 1.0, 2.0, 3.0}}}),
78
// armnn::InvalidArgumentException );
79
}
80
81
BOOST_AUTO_TEST_SUITE_END
()
BOOST_AUTO_TEST_SUITE
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
armnnUtils::ParserPrototxtFixture< armnnOnnxParser::IOnnxParser >::m_Prototext
std::string m_Prototext
Definition:
ParserPrototxtFixture.hpp:67
BOOST_FIXTURE_TEST_CASE
BOOST_FIXTURE_TEST_CASE(ProtoxtTest, ProtoxtTestFixture)
Definition:
ProtoxtFixture.cpp:68
ParserPrototxtFixture.hpp
IOnnxParser.hpp
BOOST_AUTO_TEST_SUITE_END
BOOST_AUTO_TEST_SUITE_END()
armnnUtils::ParserPrototxtFixture
Definition:
ParserPrototxtFixture.hpp:23
src
armnnOnnxParser
test
ProtoxtFixture.cpp
Generated on Wed Nov 25 2020 09:59:11 for ArmNN by
1.8.13