IVGCVSW-3283 Add test for converting CONV2D and DEPTHWISE_CONV2D operators with dilation params
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: I51a9c71d7a277ab530ac35faea2e8a069c134f45
diff --git a/test/1.1/Transpose.cpp b/test/1.1/Transpose.cpp
index e32a25f..f2c77b3 100644
--- a/test/1.1/Transpose.cpp
+++ b/test/1.1/Transpose.cpp
@@ -2,14 +2,19 @@
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
-#include "../DriverTestHelpers.hpp"
-#include <boost/test/unit_test.hpp>
-#include <boost/array.hpp>
-#include <log/log.h>
-#include "../TestTensor.hpp"
#include "OperationsUtils.h"
+
+#include "../DriverTestHelpers.hpp"
+#include "../TestTensor.hpp"
+
+#include "../1.1/HalPolicy.hpp"
+
+#include <boost/array.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/data/test_case.hpp>
+#include <log/log.h>
+
#include <cmath>
BOOST_AUTO_TEST_SUITE(TransposeTests)
@@ -18,6 +23,8 @@
using namespace driverTestHelpers;
using namespace armnn_driver;
+using HalPolicy = hal_1_1::HalPolicy;
+
namespace
{
@@ -31,14 +38,19 @@
const TestTensor & expectedOutputTensor, armnn::Compute computeDevice)
{
auto driver = std::make_unique<ArmnnDriver>(DriverOptions(computeDevice));
- V1_1::Model model = {};
+ HalPolicy::Model model = {};
- AddInputOperand(model,inputs.GetDimensions());
- AddTensorOperand(model, hidl_vec<uint32_t>{4}, perm, V1_0::OperandType::TENSOR_INT32);
- AddOutputOperand(model, expectedOutputTensor.GetDimensions());
+ AddInputOperand<HalPolicy>(model,inputs.GetDimensions());
+
+ AddTensorOperand<HalPolicy>(model,
+ hidl_vec<uint32_t>{4},
+ perm,
+ HalPolicy::OperandType::TENSOR_INT32);
+
+ AddOutputOperand<HalPolicy>(model, expectedOutputTensor.GetDimensions());
model.operations.resize(1);
- model.operations[0].type = V1_1::OperationType::TRANSPOSE;
+ model.operations[0].type = HalPolicy::OperationType::TRANSPOSE;
model.operations[0].inputs = hidl_vec<uint32_t>{0, 1};
model.operations[0].outputs = hidl_vec<uint32_t>{2};
@@ -84,8 +96,8 @@
{
BOOST_TEST(outdata[i] == expectedOutput[i]);
}
-
}
+
} // namespace
BOOST_DATA_TEST_CASE(Transpose , COMPUTE_DEVICES)