telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 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 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 11 | struct MultiInputsOutputsFixture : public armnnUtils::ParserPrototxtFixture<armnnCaffeParser::ICaffeParser> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 12 | { |
| 13 | 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 | |
| 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() |