1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include <boost/test/unit_test.hpp>
6 #include "armnnCaffeParser/ICaffeParser.hpp"
7 #include "ParserPrototxtFixture.hpp"
8
9 BOOST_AUTO_TEST_SUITE(CaffeParser)
10
11 struct MultiInputsOutputsFixture : public armnnUtils::ParserPrototxtFixture<armnnCaffeParser::ICaffeParser>
12 {
MultiInputsOutputsFixtureMultiInputsOutputsFixture13 MultiInputsOutputsFixture()
14 {
15 m_Prototext = R"(
16 name: "MultiInputsOutputs"
17 layer {
18 name: "input1"
19 type: "Input"
20 top: "input1"
21 input_param { shape: { dim: 1 } }
22 }
23 layer {
24 name: "input2"
25 type: "Input"
26 top: "input2"
27 input_param { shape: { dim: 1 } }
28 }
29 layer {
30 bottom: "input1"
31 bottom: "input2"
32 top: "add1"
33 name: "add1"
34 type: "Eltwise"
35 }
36 layer {
37 bottom: "input2"
38 bottom: "input1"
39 top: "add2"
40 name: "add2"
41 type: "Eltwise"
42 }
43 )";
44 Setup({ }, { "add1", "add2" });
45 }
46 };
47
BOOST_FIXTURE_TEST_CASE(MultiInputsOutputs,MultiInputsOutputsFixture)48 BOOST_FIXTURE_TEST_CASE(MultiInputsOutputs, MultiInputsOutputsFixture)
49 {
50 RunTest<1>({ { "input1",{ 12.0f } },{ "input2",{ 13.0f } } },
51 { { "add1",{ 25.0f } },{ "add2",{ 25.0f } } });
52 }
53
54 BOOST_AUTO_TEST_SUITE_END()
55