Acosh ref impl (#6664)

* minor changes in Op class and add ref impl for acosh

* acosh in new test framework

* add Acosh type test

* add SLT for Acosh

* run more test

* new acosh plugin test

* add visitor test

* fix test utils

* add template test for all supported types in Acosh

* add builder to template tests

* update grn template_plugin test

* update maste to feature branch
This commit is contained in:
Patryk Elszkowski
2021-07-22 11:59:59 +02:00
committed by GitHub
parent 55d9e85dc6
commit 35fb3f3d7d
23 changed files with 230 additions and 91 deletions

View File

@@ -12,19 +12,20 @@
#include "base_reference_test.hpp"
using namespace reference_tests;
using namespace ngraph;
using namespace InferenceEngine;
struct SignParams {
template <class IT, class OT>
SignParams(const ngraph::PartialShape& shape, const ngraph::element::Type& iType, const ngraph::element::Type& oType, const std::vector<IT>& iValues,
SignParams(const PartialShape& shape, const element::Type& iType, const element::Type& oType, const std::vector<IT>& iValues,
const std::vector<OT>& oValues)
: pshape(shape), inType(iType), outType(oType), inputData(CreateBlob(iType, iValues)), refData(CreateBlob(oType, oValues)) {}
ngraph::PartialShape pshape;
ngraph::element::Type inType;
ngraph::element::Type outType;
InferenceEngine::Blob::Ptr inputData;
InferenceEngine::Blob::Ptr refData;
PartialShape pshape;
element::Type inType;
element::Type outType;
Blob::Ptr inputData;
Blob::Ptr refData;
};
class ReferenceSignLayerTest : public testing::TestWithParam<SignParams>, public CommonReferenceTest {
@@ -59,22 +60,22 @@ TEST_P(ReferenceSignLayerTest, CompareWithHardcodedRefs) {
INSTANTIATE_TEST_SUITE_P(
smoke_Sign_With_Hardcoded_Refs, ReferenceSignLayerTest,
::testing::Values(
SignParams(ngraph::PartialShape {6}, ngraph::element::f32, ngraph::element::f32,
SignParams(PartialShape {6}, element::f32, element::f32,
std::vector<float> {1, -2, 0, -4.8f, 4.8f, -0.0f},
std::vector<float> {1, -1, 0, -1, 1, 0}),
SignParams(ngraph::PartialShape {6}, ngraph::element::f16, ngraph::element::f16,
SignParams(PartialShape {6}, element::f16, element::f16,
std::vector<float16> {1, -2, 0, -4.8f, 4.8f, -0.0f},
std::vector<float16> {1, -1, 0, -1, 1, 0}),
SignParams(ngraph::PartialShape {6}, ngraph::element::u64, ngraph::element::u64,
SignParams(PartialShape {6}, element::u64, element::u64,
std::vector<uint64_t> {1, 2, 0, 4, 4, 0},
std::vector<uint64_t> {1, 1, 0, 1, 1, 0}),
SignParams(ngraph::PartialShape {6}, ngraph::element::u32, ngraph::element::u32,
SignParams(PartialShape {6}, element::u32, element::u32,
std::vector<uint32_t> {1, 2, 0, 4, 4, 0},
std::vector<uint32_t> {1, 1, 0, 1, 1, 0}),
SignParams(ngraph::PartialShape {6}, ngraph::element::i32, ngraph::element::i32,
SignParams(PartialShape {6}, element::i32, element::i32,
std::vector<int32_t> {1, -2, 0, -4, 4, -0},
std::vector<int32_t> {1, -1, 0, -1, 1, 0}),
SignParams(ngraph::PartialShape {6}, ngraph::element::i64, ngraph::element::i64,
SignParams(PartialShape {6}, element::i64, element::i64,
std::vector<int64_t> {1, -2, 0, -4, 4, -0},
std::vector<int64_t> {1, -1, 0, -1, 1, 0})),
ReferenceSignLayerTest::getTestCaseName);