Enable low precision types in ConvertLike operation reference implementation (#6890)

* Enable low precision types for ConvertLike operation

* Migrate backend unit test suite to template plugin reference tests

* Fix typo in naming convention

* Avoid duplication of template plugin tests execution

* Add file to instantiate TEST_P and avoid test execution duplication
This commit is contained in:
Gabriele Galiero Casay 2021-08-06 10:19:16 +02:00 committed by GitHub
parent 43f18da413
commit 371fc7aee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 815 additions and 474 deletions

View File

@ -0,0 +1,15 @@
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "conversion.hpp"
namespace reference_tests {
namespace ConversionOpsRefTestDefinitions {
namespace {
TEST_P(ReferenceConversionLayerTest, CompareWithHardcodedRefs) {
Exec();
}
} // namespace
} // namespace ConversionOpsRefTestDefinitions
} // namespace reference_tests

View File

@ -0,0 +1,67 @@
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include <ie_core.hpp>
#include <ie_ngraph_utils.hpp>
#include <ngraph/ngraph.hpp>
#include <shared_test_classes/base/layer_test_utils.hpp>
#include <vector>
#include "base_reference_test.hpp"
#include "ngraph_functions/builders.hpp"
namespace reference_tests {
namespace ConversionOpsRefTestDefinitions {
static std::map<ngraph::helpers::ConversionTypes, std::string> conversionNames = {
{ngraph::helpers::ConversionTypes::CONVERT, "Convert"},
{ngraph::helpers::ConversionTypes::CONVERT_LIKE, "ConvertLike"}
};
struct ConvertParams {
template <class IT, class OT>
ConvertParams(ngraph::helpers::ConversionTypes convType, const ngraph::PartialShape& shape, const ngraph::element::Type& iType,
const ngraph::element::Type& oType, const std::vector<IT>& iValues, const std::vector<OT>& oValues, size_t iSize = 0, size_t oSize = 0)
: conversionType(convType), pshape(shape), inType(iType), outType(oType), inputData(CreateBlob(iType, iValues, iSize)),
refData(CreateBlob(oType, oValues, oSize)) {}
ngraph::helpers::ConversionTypes conversionType;
ngraph::PartialShape pshape;
ngraph::element::Type inType;
ngraph::element::Type outType;
InferenceEngine::Blob::Ptr inputData;
InferenceEngine::Blob::Ptr refData;
};
class ReferenceConversionLayerTest : public testing::TestWithParam<ConvertParams>, public CommonReferenceTest {
public:
void SetUp() override {
const auto& params = GetParam();
function = CreateFunction(params.pshape, params.inType, params.outType, params.conversionType);
inputData = {params.inputData};
refOutData = {params.refData};
}
static std::string getTestCaseName(const testing::TestParamInfo<ConvertParams>& obj) {
const auto& param = obj.param;
std::ostringstream result;
result << "convertionType=" << conversionNames[param.conversionType] << "_";
result << "shape=" << param.pshape << "_";
result << "iType=" << param.inType << "_";
result << "oType=" << param.outType;
return result.str();
}
private:
static std::shared_ptr<ngraph::Function> CreateFunction(const ngraph::PartialShape& input_shape, const ngraph::element::Type& input_type,
const ngraph::element::Type& expected_output_type,
const ngraph::helpers::ConversionTypes& conversion_type) {
const auto in = std::make_shared<ngraph::op::Parameter>(input_type, input_shape);
const auto convert = ngraph::builder::makeConversion(in, expected_output_type, conversion_type);
return std::make_shared<ngraph::Function>(ngraph::NodeVector {convert}, ngraph::ParameterVector {in});
}
};
} // namespace ConversionOpsRefTestDefinitions
} // namespace reference_tests

View File

@ -10,433 +10,403 @@
#include <shared_test_classes/base/layer_test_utils.hpp>
#include <tuple>
#include "base_reference_test.hpp"
#include "conversion.hpp"
using namespace reference_tests;
using namespace ngraph;
using namespace InferenceEngine;
using ConversionTypes = ngraph::helpers::ConversionTypes;
struct ConvertParams {
template <class IT, class OT>
ConvertParams(const ngraph::PartialShape& shape, const ngraph::element::Type& iType, const ngraph::element::Type& oType, const std::vector<IT>& iValues,
const std::vector<OT>& oValues, size_t iSize = 0, size_t oSize = 0)
: pshape(shape), inType(iType), outType(oType), inputData(CreateBlob(iType, iValues, iSize)), refData(CreateBlob(oType, oValues, oSize)) {}
ngraph::PartialShape pshape;
ngraph::element::Type inType;
ngraph::element::Type outType;
InferenceEngine::Blob::Ptr inputData;
InferenceEngine::Blob::Ptr refData;
};
class ReferenceConvertLayerTest : public testing::TestWithParam<ConvertParams>, public CommonReferenceTest {
public:
void SetUp() override {
auto params = GetParam();
function = CreateFunction(params.pshape, params.inType, params.outType);
inputData = {params.inputData};
refOutData = {params.refData};
}
static std::string getTestCaseName(const testing::TestParamInfo<ConvertParams>& obj) {
auto param = obj.param;
std::ostringstream result;
result << "shape=" << param.pshape << "_";
result << "iType=" << param.inType << "_";
result << "oType=" << param.outType;
return result.str();
}
private:
static std::shared_ptr<Function> CreateFunction(const PartialShape& input_shape, const element::Type& input_type,
const element::Type& expected_output_type) {
const auto in = std::make_shared<op::Parameter>(input_type, input_shape);
const auto convert = std::make_shared<op::Convert>(in, expected_output_type);
return std::make_shared<Function>(NodeVector {convert}, ParameterVector {in});
}
};
TEST_P(ReferenceConvertLayerTest, CompareWithHardcodedRefs) {
Exec();
}
namespace reference_tests {
namespace ConversionOpsRefTestDefinitions {
namespace {
INSTANTIATE_TEST_SUITE_P(
smoke_Convert_With_Hardcoded_Refs, ReferenceConvertLayerTest,
smoke_Conversion_With_Hardcoded_Refs, ReferenceConversionLayerTest,
::testing::Values(
// destination boolean
ConvertParams(ngraph::PartialShape {2, 3}, ngraph::element::u8, ngraph::element::boolean,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 3}, ngraph::element::u8, ngraph::element::boolean,
std::vector<uint8_t> {0, 12, 23, 0, std::numeric_limits<uint8_t>::lowest(), std::numeric_limits<uint8_t>::max()},
std::vector<char> {0, 1, 1, 0, 0, 1}),
ConvertParams(ngraph::PartialShape {2, 3}, ngraph::element::i32, ngraph::element::boolean,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 3}, ngraph::element::i32, ngraph::element::boolean,
std::vector<int32_t> {0, -12, 23, 0, std::numeric_limits<int32_t>::lowest(), std::numeric_limits<int32_t>::max()},
std::vector<char> {0, 1, 1, 0, 1, 1}),
ConvertParams(ngraph::PartialShape {3, 3}, ngraph::element::f32, ngraph::element::boolean,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {3, 3}, ngraph::element::f32, ngraph::element::boolean,
std::vector<float> {0.f, 1.5745f, 0.12352f, 0.f, std::numeric_limits<float>::lowest(), std::numeric_limits<float>::max(),
std::numeric_limits<float>::min(), std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()},
std::vector<char> {0, 1, 1, 0, 1, 1, 1, 1, 1}),
// destination bf16
ConvertParams(ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::bf16,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::bf16,
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<bfloat16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ngraph::PartialShape {11}, ngraph::element::u8, ngraph::element::bf16,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {11}, ngraph::element::u8, ngraph::element::bf16,
std::vector<uint8_t> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142},
std::vector<bfloat16> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142}),
// destination f16
ConvertParams(ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::f16,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::f16,
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ngraph::PartialShape {11}, ngraph::element::u8, ngraph::element::f16, std::vector<uint8_t> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142},
std::vector<float16> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {11}, ngraph::element::u8, ngraph::element::f16,
std::vector<uint8_t> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142}, std::vector<float16> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142}),
// destination f32
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::u1, ngraph::element::f32, std::vector<uint8_t> {0xA0},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::u1, ngraph::element::f32, std::vector<uint8_t> {0xA0},
std::vector<float> {1.0f, 0.0f, 1.0f, 0.0f}, 4),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::u4, ngraph::element::f32, std::vector<uint8_t> {0xFB, 0x0A},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::u4, ngraph::element::f32, std::vector<uint8_t> {0xFB, 0x0A},
std::vector<float> {15.0f, 11.0f, 0.0f, 10.0f}, 4),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::u8, ngraph::element::f32, std::vector<uint8_t> {255, 128, 32, 0},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::u8, ngraph::element::f32, std::vector<uint8_t> {255, 128, 32, 0},
std::vector<float> {255.0f, 128.0f, 32.0f, 0.0f}),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::u16, ngraph::element::f32, std::vector<uint16_t> {64000, 32000, 128, 0},
std::vector<float> {64000.0f, 32000.0f, 128.0f, 0.0f}),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::u32, ngraph::element::f32, std::vector<uint32_t> {4000000, 2000000, 128, 0},
std::vector<float> {4000000.0f, 2000000.0f, 128.0f, 0.0f}),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::u64, ngraph::element::f32, std::vector<uint64_t> {4000000, 2000000, 128, 0},
std::vector<float> {4000000.0f, 2000000.0f, 128.0f, 0.0f}),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::i4, ngraph::element::f32, std::vector<uint8_t> {0xFE, 0xF2},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::u16, ngraph::element::f32,
std::vector<uint16_t> {64000, 32000, 128, 0}, std::vector<float> {64000.0f, 32000.0f, 128.0f, 0.0f}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::u32, ngraph::element::f32,
std::vector<uint32_t> {4000000, 2000000, 128, 0}, std::vector<float> {4000000.0f, 2000000.0f, 128.0f, 0.0f}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::u64, ngraph::element::f32,
std::vector<uint64_t> {4000000, 2000000, 128, 0}, std::vector<float> {4000000.0f, 2000000.0f, 128.0f, 0.0f}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::i4, ngraph::element::f32, std::vector<uint8_t> {0xFE, 0xF2},
std::vector<float> {-1.0f, -2.0f, -1.0f, 2.0f}, 4),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::i8, ngraph::element::f32, std::vector<int8_t> {-127, -0, 0, 127},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::i8, ngraph::element::f32, std::vector<int8_t> {-127, -0, 0, 127},
std::vector<float> {-127.0f, -0.0f, 0.0f, 127.0f}),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::i16, ngraph::element::f32, std::vector<int16_t> {-32000, -0, 0, 32000},
std::vector<float> {-32000.0f, -0.0f, 0.0f, 32000.0f}),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::i32, ngraph::element::f32, std::vector<int32_t> {-64000, -0, 0, 64000},
std::vector<float> {-64000.0f, -0.0f, 0.0f, 64000.0f}),
ConvertParams(ngraph::PartialShape {2, 2}, ngraph::element::i64, ngraph::element::f32, std::vector<int64_t> {-64000, -0, 0, 64000},
std::vector<float> {-64000.0f, -0.0f, 0.0f, 64000.0f}),
ConvertParams(ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::bf16, ngraph::element::f32,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::i16, ngraph::element::f32,
std::vector<int16_t> {-32000, -0, 0, 32000}, std::vector<float> {-32000.0f, -0.0f, 0.0f, 32000.0f}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::i32, ngraph::element::f32,
std::vector<int32_t> {-64000, -0, 0, 64000}, std::vector<float> {-64000.0f, -0.0f, 0.0f, 64000.0f}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {2, 2}, ngraph::element::i64, ngraph::element::f32,
std::vector<int64_t> {-64000, -0, 0, 64000}, std::vector<float> {-64000.0f, -0.0f, 0.0f, 64000.0f}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::bf16, ngraph::element::f32,
std::vector<bfloat16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f16, ngraph::element::f32,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f16, ngraph::element::f32,
std::vector<float16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::f32,
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::f32,
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
// destination i4
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u1, ngraph::element::i4, std::vector<uint8_t> {0xA0}, std::vector<uint8_t> {0x10, 0x10}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i4, std::vector<uint8_t> {0x12, 0x03}, std::vector<uint8_t> {0x12, 0x03},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i4, std::vector<uint8_t> {1, 2, 0, 3}, std::vector<uint8_t> {0x12, 0x03},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i4, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u1, ngraph::element::i4, std::vector<uint8_t> {0xA0},
std::vector<uint8_t> {0x10, 0x10}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i4, std::vector<uint8_t> {0x12, 0x03},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i4, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i4, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i4, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i4, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i4, std::vector<uint8_t> {0xFE, 0x03}, std::vector<uint8_t> {0xFE, 0x03},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i4, std::vector<int8_t> {-1, -2, 2, 3}, std::vector<uint8_t> {0xFE, 0x23},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i4, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i4, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i4, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i4, std::vector<ngraph::float16> {-1, -2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i4, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i4, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i4, std::vector<uint8_t> {0xFE, 0x03},
std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i4, std::vector<ngraph::bfloat16> {-1, -2, 0, 3},
std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i4, std::vector<float> {-1, -2, 2, 3}, std::vector<uint8_t> {0xFE, 0x23},
4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i4, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i4, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i4, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i4, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i4,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i4,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i4, std::vector<float> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
// destination i8
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i8, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i8, std::vector<uint8_t> {0x81},
std::vector<int8_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i8, std::vector<uint8_t> {0x21, 0x43}, std::vector<int8_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i8, std::vector<uint8_t> {1, 2, 0, 3}, std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i8, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i8, std::vector<uint8_t> {0x21, 0x43},
std::vector<int8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i8, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i8, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i8, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i8, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i8, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i8, std::vector<uint8_t> {0x21, 0x43}, std::vector<int8_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i8, std::vector<int8_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i8, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i8, std::vector<uint8_t> {0x21, 0x43},
std::vector<int8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i8, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i8, std::vector<int16_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i8, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i8, std::vector<int32_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i8, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i8, std::vector<int64_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i8, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i8, std::vector<ngraph::float16> {-1, -2, 0, 3},
std::vector<int8_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i8, std::vector<ngraph::bfloat16> {-1, -2, 0, 3},
std::vector<int8_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i8, std::vector<float> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i8,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int8_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i8,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int8_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i8, std::vector<float> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
// destination i16
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i16, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i16, std::vector<uint8_t> {0x81},
std::vector<int16_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i16, std::vector<uint8_t> {0x21, 0x43}, std::vector<int16_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i16, std::vector<uint8_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i16, std::vector<uint8_t> {0x21, 0x43},
std::vector<int16_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i16, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i16, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i16, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i16, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i16, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i16, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i16, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i16, std::vector<uint8_t> {0x21, 0x43}, std::vector<int16_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i16, std::vector<int8_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i16, std::vector<uint8_t> {0x21, 0x43},
std::vector<int16_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i16, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i16, std::vector<int16_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i16, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i16, std::vector<int32_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i16, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i16, std::vector<int64_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i16, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i16, std::vector<ngraph::float16> {-1, -2, 0, 3},
std::vector<int16_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i16, std::vector<ngraph::bfloat16> {-1, -2, 0, 3},
std::vector<int16_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i16, std::vector<float> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i16,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int16_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i16,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int16_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i16, std::vector<float> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
// destination i32
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i32, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i32, std::vector<uint8_t> {0x81},
std::vector<int32_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i32, std::vector<uint8_t> {0x21, 0x43}, std::vector<int32_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i32, std::vector<uint8_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i32, std::vector<uint8_t> {0x21, 0x43},
std::vector<int32_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i32, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i32, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i32, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i32, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i32, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i32, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i32, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i32, std::vector<uint8_t> {0x21, 0x43}, std::vector<int32_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i32, std::vector<int8_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i32, std::vector<uint8_t> {0x21, 0x43},
std::vector<int32_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i32, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i32, std::vector<int16_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i32, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i32, std::vector<int32_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i32, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i32, std::vector<int64_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i32, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i32, std::vector<ngraph::float16> {-1, -2, 0, 3},
std::vector<int32_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i32, std::vector<ngraph::bfloat16> {-1, -2, 0, 3},
std::vector<int32_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i32, std::vector<float> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i32,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int32_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i32,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int32_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i32, std::vector<float> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
// destination i64
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i64, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i64, std::vector<uint8_t> {0x81},
std::vector<int64_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i64, std::vector<uint8_t> {0x21, 0x43}, std::vector<int64_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i64, std::vector<uint8_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i64, std::vector<uint8_t> {0x21, 0x43},
std::vector<int64_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i64, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i64, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i64, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i64, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i64, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i64, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i64, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i64, std::vector<uint8_t> {0x21, 0x43}, std::vector<int64_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i64, std::vector<int8_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i64, std::vector<uint8_t> {0x21, 0x43},
std::vector<int64_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i64, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i64, std::vector<int16_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i64, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i64, std::vector<int32_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i64, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i64, std::vector<int64_t> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i64, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i64, std::vector<ngraph::float16> {-1, -2, 0, 3},
std::vector<int64_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i64, std::vector<ngraph::bfloat16> {-1, -2, 0, 3},
std::vector<int64_t> {-1, -2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i64, std::vector<float> {-1, -2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i64,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int64_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i64,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int64_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i64, std::vector<float> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
// destination u1
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u1, std::vector<uint8_t> {0xA0}, std::vector<uint8_t> {0xA0}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u4, ngraph::element::u1, std::vector<uint8_t> {0x10, 0x01, 0x00, 0x00},
std::vector<uint8_t> {0x90}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u8, ngraph::element::u1, std::vector<uint8_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u16, ngraph::element::u1, std::vector<uint16_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u32, ngraph::element::u1, std::vector<uint32_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u64, ngraph::element::u1, std::vector<uint64_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::i4, ngraph::element::u1, std::vector<uint8_t> {0x10, 0x01, 0x00, 0x00},
std::vector<uint8_t> {0x90}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::i8, ngraph::element::u1, std::vector<int8_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::i16, ngraph::element::u1, std::vector<int16_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::i32, ngraph::element::u1, std::vector<int32_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::i64, ngraph::element::u1, std::vector<int64_t> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::f16, ngraph::element::u1, std::vector<ngraph::float16> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::bf16, ngraph::element::u1, std::vector<ngraph::bfloat16> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ngraph::PartialShape {8}, ngraph::element::f32, ngraph::element::u1, std::vector<float> {1, 0, 1, 0, 0, 0, 0, 1},
std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u1, std::vector<uint8_t> {0xA0},
std::vector<uint8_t> {0xA0}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u4, ngraph::element::u1,
std::vector<uint8_t> {0x10, 0x01, 0x00, 0x00}, std::vector<uint8_t> {0x90}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u8, ngraph::element::u1,
std::vector<uint8_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u16, ngraph::element::u1,
std::vector<uint16_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u32, ngraph::element::u1,
std::vector<uint32_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u64, ngraph::element::u1,
std::vector<uint64_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::i4, ngraph::element::u1,
std::vector<uint8_t> {0x10, 0x01, 0x00, 0x00}, std::vector<uint8_t> {0x90}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::i8, ngraph::element::u1,
std::vector<int8_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::i16, ngraph::element::u1,
std::vector<int16_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::i32, ngraph::element::u1,
std::vector<int32_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::i64, ngraph::element::u1,
std::vector<int64_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::f16, ngraph::element::u1,
std::vector<ngraph::float16> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::bf16, ngraph::element::u1,
std::vector<ngraph::bfloat16> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::f32, ngraph::element::u1,
std::vector<float> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
// destination u4
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u1, ngraph::element::u4, std::vector<uint8_t> {0xA0}, std::vector<uint8_t> {0x10, 0x10}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u4, std::vector<uint8_t> {0x12, 0x03}, std::vector<uint8_t> {0x12, 0x03},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u4, std::vector<uint8_t> {1, 2, 0, 3}, std::vector<uint8_t> {0x12, 0x03},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u4, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u1, ngraph::element::u4, std::vector<uint8_t> {0xA0},
std::vector<uint8_t> {0x10, 0x10}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u4, std::vector<uint8_t> {0x12, 0x03},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u4, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u4, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u4, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u4, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u4, std::vector<uint8_t> {0xFE, 0x03}, std::vector<uint8_t> {0xFE, 0x03},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u4, std::vector<int8_t> {-1, -2, 2, 3}, std::vector<uint8_t> {0xFE, 0x23},
4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u4, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u4, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u4, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u4, std::vector<ngraph::float16> {-1, -2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u4, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u4, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u4, std::vector<uint8_t> {0xFE, 0x03},
std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u4, std::vector<ngraph::bfloat16> {-1, -2, 0, 3},
std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u4, std::vector<float> {-1, -2, 2, 3}, std::vector<uint8_t> {0xFE, 0x23},
4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u4, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u4, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u4, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u4, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u4,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u4,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u4, std::vector<float> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
// destination u8
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u8, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u8, std::vector<uint8_t> {0x81},
std::vector<uint8_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u8, std::vector<uint8_t> {0x21, 0x43}, std::vector<uint8_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u8, std::vector<uint8_t> {1, 2, 0, 3}, std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u8, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u8, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u8, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u8, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u8, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u8, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u8, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u8, std::vector<uint8_t> {0x21, 0x43}, std::vector<uint8_t> {2, 1, 4, 3},
4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u8, std::vector<int8_t> {1, 2, 2, 3}, std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u8, std::vector<int16_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u8, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u8, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u8, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u8, std::vector<int32_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u8, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u8, std::vector<int64_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u8, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u8, std::vector<ngraph::float16> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u8, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u8, std::vector<ngraph::float16> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u8, std::vector<ngraph::bfloat16> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u8, std::vector<float> {1, 2, 2, 3}, std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u8,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u8, std::vector<float> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
// destination u16
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u16, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u16, std::vector<uint8_t> {0x81},
std::vector<uint16_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u16, std::vector<uint8_t> {0x21, 0x43},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u16, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint16_t> {2, 1, 4, 3}, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u16, std::vector<uint8_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u16, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u16, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u16, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u16, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u16, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u16, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u16, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u16, std::vector<uint8_t> {0x21, 0x43},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u16, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint16_t> {2, 1, 4, 3}, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u16, std::vector<int8_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u16, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u16, std::vector<int16_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u16, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u16, std::vector<int32_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u16, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u16, std::vector<int64_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u16, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u16, std::vector<ngraph::float16> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u16, std::vector<ngraph::float16> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u16, std::vector<ngraph::bfloat16> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u16, std::vector<float> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u16,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u16, std::vector<float> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
// destination u32
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u32, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u32, std::vector<uint8_t> {0x81},
std::vector<uint32_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u32, std::vector<uint8_t> {0x21, 0x43},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u32, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint32_t> {2, 1, 4, 3}, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u32, std::vector<uint8_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u32, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u32, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u32, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u32, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u32, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u32, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u32, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u32, std::vector<uint8_t> {0x21, 0x43},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u32, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint32_t> {2, 1, 4, 3}, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u32, std::vector<int8_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u32, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u32, std::vector<int16_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u32, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u32, std::vector<int32_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u32, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u32, std::vector<int64_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u32, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u32, std::vector<ngraph::float16> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u32, std::vector<ngraph::float16> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u32, std::vector<ngraph::bfloat16> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u32, std::vector<float> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u32,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u32, std::vector<float> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
// destination u64
ConvertParams(ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u64, std::vector<uint8_t> {0x81},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u64, std::vector<uint8_t> {0x81},
std::vector<uint64_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u64, std::vector<uint8_t> {0x21, 0x43},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u64, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint64_t> {2, 1, 4, 3}, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u64, std::vector<uint8_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u64, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u64, std::vector<uint16_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u64, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u64, std::vector<uint32_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u64, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u64, std::vector<uint64_t> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u64, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u64, std::vector<uint8_t> {0x21, 0x43},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u64, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint64_t> {2, 1, 4, 3}, 4),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u64, std::vector<int8_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u64, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u64, std::vector<int16_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u64, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u64, std::vector<int32_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u64, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u64, std::vector<int64_t> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u64, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u64, std::vector<ngraph::float16> {1, 2, 0, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u64, std::vector<ngraph::float16> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u64, std::vector<ngraph::bfloat16> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u64, std::vector<float> {1, 2, 2, 3},
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u64,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u64, std::vector<float> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3})),
ReferenceConvertLayerTest::getTestCaseName);
ReferenceConversionLayerTest::getTestCaseName);
} // namespace
} // namespace ConversionOpsRefTestDefinitions
} // namespace reference_tests

View File

@ -0,0 +1,413 @@
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include <ie_core.hpp>
#include <ie_ngraph_utils.hpp>
#include <ngraph/ngraph.hpp>
#include <shared_test_classes/base/layer_test_utils.hpp>
#include <vector>
#include "conversion.hpp"
using namespace ngraph;
using namespace InferenceEngine;
using ConversionTypes = ngraph::helpers::ConversionTypes;
namespace reference_tests {
namespace ConversionOpsRefTestDefinitions {
namespace {
INSTANTIATE_TEST_SUITE_P(
smoke_Conversion_With_Hardcoded_Refs, ReferenceConversionLayerTest,
::testing::Values(
// destination boolean
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 3}, ngraph::element::u8, ngraph::element::boolean,
std::vector<uint8_t> {0, 12, 23, 0, std::numeric_limits<uint8_t>::lowest(), std::numeric_limits<uint8_t>::max()},
std::vector<char> {0, 1, 1, 0, 0, 1}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 3}, ngraph::element::i32, ngraph::element::boolean,
std::vector<int32_t> {0, -12, 23, 0, std::numeric_limits<int32_t>::lowest(), std::numeric_limits<int32_t>::max()},
std::vector<char> {0, 1, 1, 0, 1, 1}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {3, 3}, ngraph::element::f32, ngraph::element::boolean,
std::vector<float> {0.f, 1.5745f, 0.12352f, 0.f, std::numeric_limits<float>::lowest(), std::numeric_limits<float>::max(),
std::numeric_limits<float>::min(), std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()},
std::vector<char> {0, 1, 1, 0, 1, 1, 1, 1, 1}),
// destination bf16
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::bf16,
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<bfloat16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {11}, ngraph::element::u8, ngraph::element::bf16,
std::vector<uint8_t> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142},
std::vector<bfloat16> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142}),
// destination f16
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::f16,
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {11}, ngraph::element::u8, ngraph::element::f16,
std::vector<uint8_t> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142},
std::vector<float16> {0, 10, 15, 20, 43, 56, 78, 99, 102, 130, 142}),
// destination f32
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::u1, ngraph::element::f32,
std::vector<uint8_t> {0xA0}, std::vector<float> {1.0f, 0.0f, 1.0f, 0.0f}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::u4, ngraph::element::f32,
std::vector<uint8_t> {0xFB, 0x0A}, std::vector<float> {15.0f, 11.0f, 0.0f, 10.0f}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::u8, ngraph::element::f32,
std::vector<uint8_t> {255, 128, 32, 0}, std::vector<float> {255.0f, 128.0f, 32.0f, 0.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::u16, ngraph::element::f32,
std::vector<uint16_t> {64000, 32000, 128, 0}, std::vector<float> {64000.0f, 32000.0f, 128.0f, 0.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::u32, ngraph::element::f32,
std::vector<uint32_t> {4000000, 2000000, 128, 0}, std::vector<float> {4000000.0f, 2000000.0f, 128.0f, 0.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::u64, ngraph::element::f32,
std::vector<uint64_t> {4000000, 2000000, 128, 0}, std::vector<float> {4000000.0f, 2000000.0f, 128.0f, 0.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::i4, ngraph::element::f32,
std::vector<uint8_t> {0xFE, 0xF2}, std::vector<float> {-1.0f, -2.0f, -1.0f, 2.0f}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::i8, ngraph::element::f32,
std::vector<int8_t> {-127, -0, 0, 127}, std::vector<float> {-127.0f, -0.0f, 0.0f, 127.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::i16, ngraph::element::f32,
std::vector<int16_t> {-32000, -0, 0, 32000}, std::vector<float> {-32000.0f, -0.0f, 0.0f, 32000.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::i32, ngraph::element::f32,
std::vector<int32_t> {-64000, -0, 0, 64000}, std::vector<float> {-64000.0f, -0.0f, 0.0f, 64000.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {2, 2}, ngraph::element::i64, ngraph::element::f32,
std::vector<int64_t> {-64000, -0, 0, 64000}, std::vector<float> {-64000.0f, -0.0f, 0.0f, 64000.0f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::bf16, ngraph::element::f32,
std::vector<bfloat16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f16, ngraph::element::f32,
std::vector<float16> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {1, 1, 3, 5}, ngraph::element::f32, ngraph::element::f32,
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f},
std::vector<float> {0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}),
// destination i4
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u1, ngraph::element::i4, std::vector<uint8_t> {0xA0},
std::vector<uint8_t> {0x10, 0x10}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i4, std::vector<uint8_t> {0x12, 0x03},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i4, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i4, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i4, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i4, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i4, std::vector<uint8_t> {0xFE, 0x03},
std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i4, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i4, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i4, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i4, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i4,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i4,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i4, std::vector<float> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
// destination i8
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i8, std::vector<uint8_t> {0x81},
std::vector<int8_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i8, std::vector<uint8_t> {0x21, 0x43},
std::vector<int8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i8, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i8, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i8, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i8, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i8, std::vector<uint8_t> {0x21, 0x43},
std::vector<int8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i8, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i8, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i8, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i8, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i8,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int8_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i8,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int8_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i8, std::vector<float> {-1, -2, 2, 3},
std::vector<int8_t> {-1, -2, 2, 3}),
// destination i16
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i16, std::vector<uint8_t> {0x81},
std::vector<int16_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i16, std::vector<uint8_t> {0x21, 0x43},
std::vector<int16_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i16, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i16, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i16, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i16, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i16, std::vector<uint8_t> {0x21, 0x43},
std::vector<int16_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i16, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i16, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i16, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i16, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i16,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int16_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i16,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int16_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i16, std::vector<float> {-1, -2, 2, 3},
std::vector<int16_t> {-1, -2, 2, 3}),
// destination i32
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i32, std::vector<uint8_t> {0x81},
std::vector<int32_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i32, std::vector<uint8_t> {0x21, 0x43},
std::vector<int32_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i32, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i32, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i32, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i32, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i32, std::vector<uint8_t> {0x21, 0x43},
std::vector<int32_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i32, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i32, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i32, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i32, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i32,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int32_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i32,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int32_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i32, std::vector<float> {-1, -2, 2, 3},
std::vector<int32_t> {-1, -2, 2, 3}),
// destination i64
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::i64, std::vector<uint8_t> {0x81},
std::vector<int64_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::i64, std::vector<uint8_t> {0x21, 0x43},
std::vector<int64_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::i64, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::i64, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::i64, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::i64, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<int64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::i64, std::vector<uint8_t> {0x21, 0x43},
std::vector<int64_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::i64, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::i64, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::i64, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::i64, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::i64,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<int64_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::i64,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<int64_t> {-1, -2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::i64, std::vector<float> {-1, -2, 2, 3},
std::vector<int64_t> {-1, -2, 2, 3}),
// destination u1
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u1, std::vector<uint8_t> {0xA0},
std::vector<uint8_t> {0xA0}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u4, ngraph::element::u1,
std::vector<uint8_t> {0x10, 0x01, 0x00, 0x00}, std::vector<uint8_t> {0x90}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u8, ngraph::element::u1,
std::vector<uint8_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u16, ngraph::element::u1,
std::vector<uint16_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u32, ngraph::element::u1,
std::vector<uint32_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u64, ngraph::element::u1,
std::vector<uint64_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::i4, ngraph::element::u1,
std::vector<uint8_t> {0x10, 0x01, 0x00, 0x00}, std::vector<uint8_t> {0x90}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::i8, ngraph::element::u1,
std::vector<int8_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::i16, ngraph::element::u1,
std::vector<int16_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::i32, ngraph::element::u1,
std::vector<int32_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::i64, ngraph::element::u1,
std::vector<int64_t> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::f16, ngraph::element::u1,
std::vector<ngraph::float16> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::bf16, ngraph::element::u1,
std::vector<ngraph::bfloat16> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::f32, ngraph::element::u1,
std::vector<float> {1, 0, 1, 0, 0, 0, 0, 1}, std::vector<uint8_t> {0xA1}, 8, 8),
// destination u4
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u1, ngraph::element::u4, std::vector<uint8_t> {0xA0},
std::vector<uint8_t> {0x10, 0x10}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u4, std::vector<uint8_t> {0x12, 0x03},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u4, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u4, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u4, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u4, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint8_t> {0x12, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u4, std::vector<uint8_t> {0xFE, 0x03},
std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u4, std::vector<int8_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u4, std::vector<int16_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u4, std::vector<int32_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u4, std::vector<int64_t> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u4,
std::vector<ngraph::float16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u4,
std::vector<ngraph::bfloat16> {-1, -2, 0, 3}, std::vector<uint8_t> {0xFE, 0x03}, 4, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u4, std::vector<float> {-1, -2, 2, 3},
std::vector<uint8_t> {0xFE, 0x23}, 4, 4),
// destination u8
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u8, std::vector<uint8_t> {0x81},
std::vector<uint8_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u8, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u8, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u8, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u8, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u8, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u8, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint8_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u8, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u8, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u8, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u8, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u8,
std::vector<ngraph::float16> {1, 2, 0, 3}, std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u8,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint8_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u8, std::vector<float> {1, 2, 2, 3},
std::vector<uint8_t> {1, 2, 2, 3}),
// destination u16
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u16, std::vector<uint8_t> {0x81},
std::vector<uint16_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u16, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint16_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u16, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u16, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u16, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u16, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u16, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint16_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u16, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u16, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u16, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u16, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u16,
std::vector<ngraph::float16> {1, 2, 0, 3}, std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u16,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint16_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u16, std::vector<float> {1, 2, 2, 3},
std::vector<uint16_t> {1, 2, 2, 3}),
// destination u32
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u32, std::vector<uint8_t> {0x81},
std::vector<uint32_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u32, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint32_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u32, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u32, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u32, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u32, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u32, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint32_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u32, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u32, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u32, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u32, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u32,
std::vector<ngraph::float16> {1, 2, 0, 3}, std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u32,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint32_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u32, std::vector<float> {1, 2, 2, 3},
std::vector<uint32_t> {1, 2, 2, 3}),
// destination u64
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {8}, ngraph::element::u1, ngraph::element::u64, std::vector<uint8_t> {0x81},
std::vector<uint64_t> {1, 0, 0, 0, 0, 0, 0, 1}, 8),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u4, ngraph::element::u64, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint64_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u8, ngraph::element::u64, std::vector<uint8_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u16, ngraph::element::u64, std::vector<uint16_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u32, ngraph::element::u64, std::vector<uint32_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::u64, ngraph::element::u64, std::vector<uint64_t> {1, 2, 0, 3},
std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i4, ngraph::element::u64, std::vector<uint8_t> {0x21, 0x43},
std::vector<uint64_t> {2, 1, 4, 3}, 4),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i8, ngraph::element::u64, std::vector<int8_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i16, ngraph::element::u64, std::vector<int16_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i32, ngraph::element::u64, std::vector<int32_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::i64, ngraph::element::u64, std::vector<int64_t> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f16, ngraph::element::u64,
std::vector<ngraph::float16> {1, 2, 0, 3}, std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::bf16, ngraph::element::u64,
std::vector<ngraph::bfloat16> {1, 2, 0, 3}, std::vector<uint64_t> {1, 2, 0, 3}),
ConvertParams(ConversionTypes::CONVERT_LIKE, ngraph::PartialShape {4}, ngraph::element::f32, ngraph::element::u64, std::vector<float> {1, 2, 2, 3},
std::vector<uint64_t> {1, 2, 2, 3})),
ReferenceConversionLayerTest::getTestCaseName);
} // namespace
} // namespace ConversionOpsRefTestDefinitions
} // namespace reference_tests

View File

@ -443,6 +443,10 @@ std::shared_ptr<ngraph::Node> makeComparison(const ngraph::Output<Node> &in0,
const ngraph::Output<Node> &in1,
ngraph::helpers::ComparisonTypes comparisonType);
std::shared_ptr<ngraph::Node> makeConversion(const ngraph::Output<Node>& in,
const element::Type& type,
const ngraph::helpers::ConversionTypes& conversionType);
std::shared_ptr<ngraph::Node> makeLogical(const ngraph::Output<Node> &in0,
const ngraph::Output<Node> &in1,
ngraph::helpers::LogicalTypes logicalType);

View File

@ -148,6 +148,11 @@ enum ComparisonTypes {
GREATER_EQUAL
};
enum ConversionTypes {
CONVERT,
CONVERT_LIKE
};
enum LogicalTypes {
LOGICAL_AND,
LOGICAL_OR,

View File

@ -0,0 +1,26 @@
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <memory>
#include <ngraph/opsets/opset1.hpp>
#include "ngraph_functions/utils/ngraph_helpers.hpp"
namespace ngraph {
namespace builder {
std::shared_ptr<ngraph::Node> makeConversion(const ngraph::Output<Node>& in,
const element::Type& output_type,
const ngraph::helpers::ConversionTypes& conversionType) {
if (conversionType == ngraph::helpers::ConversionTypes::CONVERT) {
return std::make_shared<ngraph::opset1::Convert>(in, output_type);
} else if (conversionType == ngraph::helpers::ConversionTypes::CONVERT_LIKE) {
const auto like = std::make_shared<op::Constant>(output_type, ngraph::Shape{1});
return std::make_shared<ngraph::opset1::ConvertLike>(in, like);
} else {
throw std::runtime_error("Incorrect type of Conversion operation");
}
}
} // namespace builder
} // namespace ngraph

View File

@ -414,7 +414,6 @@ set(MULTI_TEST_SRC
backend/comparison.in.cpp
backend/concat.in.cpp
backend/constant.in.cpp
backend/convert_like.in.cpp
backend/convolution_backprop.in.cpp
backend/convolution.in.cpp
backend/binary_convolution.in.cpp

View File

@ -1,177 +0,0 @@
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"
#include "util/engine/test_engines.hpp"
#include "util/test_case.hpp"
#include "util/test_control.hpp"
NGRAPH_SUPPRESS_DEPRECATED_START
using namespace std;
using namespace ngraph;
static string s_manifest = "${MANIFEST}";
using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME});
NGRAPH_TEST(${BACKEND_NAME}, convert_like_float32_int32)
{
Shape input_shape{2, 3, 1};
const auto data = make_shared<op::Parameter>(element::f32, input_shape);
const auto like = make_shared<op::Parameter>(element::i32, input_shape);
const auto convert_like = make_shared<op::v1::ConvertLike>(data, like);
const auto f = make_shared<Function>(convert_like, ParameterVector{data, like});
vector<float> data_vect = {-1.8, 0.2f, 1.4f, 2.1f, 3.9f, 4.3f};
vector<int32_t> like_vect(shape_size(input_shape), 0);
auto test_case = test::TestCase<TestEngine>(f);
test_case.add_input<float>(input_shape, data_vect);
test_case.add_input<int32_t>(input_shape, like_vect);
test_case.add_expected_output<int>(input_shape, {-1, 0, 1, 2, 3, 4});
test_case.run();
}
NGRAPH_TEST(${BACKEND_NAME}, convert_like_int32_float32)
{
Shape shape{2, 2};
const auto data = make_shared<op::Parameter>(element::i32, shape);
const auto like = make_shared<op::Parameter>(element::f32, shape);
auto f = make_shared<Function>(make_shared<op::v1::ConvertLike>(data, like),
ParameterVector{data, like});
vector<int32_t> data_vect{281, 2, 3, 4};
vector<float> like_vect(shape_size(shape), 0);
auto test_case = test::TestCase<TestEngine>(f);
test_case.add_input<int32_t>(shape, data_vect);
test_case.add_input<float>(shape, like_vect);
test_case.add_expected_output<float>(shape, {281, 2, 3, 4});
test_case.run();
}
NGRAPH_TEST(${BACKEND_NAME}, convert_like_uint16_float32)
{
Shape shape{2, 2};
const auto data = make_shared<op::Parameter>(element::u16, shape);
const auto like = make_shared<op::Parameter>(element::f32, shape);
auto f = make_shared<Function>(make_shared<op::v1::ConvertLike>(data, like),
ParameterVector{data, like});
vector<uint16_t> data_vect{1, 2, 3, 4};
vector<float> like_vect(shape_size(shape), 0);
auto test_case = test::TestCase<TestEngine>(f);
test_case.add_input<uint16_t>(shape, data_vect);
test_case.add_input<float>(shape, like_vect);
test_case.add_expected_output<float>(shape, {1, 2, 3, 4});
test_case.run(MIN_FLOAT_TOLERANCE_BITS);
}
NGRAPH_TEST(${BACKEND_NAME}, convert_like_int32_bool)
{
Shape shape{2, 3};
const auto data = make_shared<op::Parameter>(element::i32, shape);
const auto like = make_shared<op::Parameter>(element::boolean, shape);
auto f = make_shared<Function>(make_shared<op::v1::ConvertLike>(data, like),
ParameterVector{data, like});
int32_t lowest = std::numeric_limits<int32_t>::lowest();
int32_t max = std::numeric_limits<int32_t>::max();
vector<int32_t> data_vect{0, 12, 23, 0, lowest, max};
vector<char> like_vect(shape_size(shape), 0);
auto test_case = test::TestCase<TestEngine>(f);
test_case.add_input<int32_t>(shape, data_vect);
test_case.add_input<char>(shape, like_vect);
test_case.add_expected_output<char>(shape, {0, 1, 1, 0, 1, 1});
test_case.run();
}
NGRAPH_TEST(${BACKEND_NAME}, convert_like_float32_bool)
{
Shape shape{3, 3};
const auto data = make_shared<op::Parameter>(element::f32, shape);
const auto like = make_shared<op::Parameter>(element::boolean, shape);
auto f = make_shared<Function>(make_shared<op::v1::ConvertLike>(data, like),
ParameterVector{data, like});
float lowest = std::numeric_limits<float>::lowest();
float max = std::numeric_limits<float>::max();
float min = std::numeric_limits<float>::min();
float pos_inf = std::numeric_limits<float>::infinity();
float neg_inf = -std::numeric_limits<float>::infinity();
vector<float> data_vect{0.f, 1.5745f, 0.12352f, 0.f, lowest, max, min, pos_inf, neg_inf};
vector<char> like_vect(shape_size(shape), 0);
auto test_case = test::TestCase<TestEngine>(f);
test_case.add_input<float>(shape, data_vect);
test_case.add_input<char>(shape, like_vect);
test_case.add_expected_output<char>(shape, {0, 1, 1, 0, 1, 1, 1, 1, 1});
test_case.run();
}
NGRAPH_TEST(${BACKEND_NAME}, convert_like_float32_bfloat16)
{
Shape shape{1, 1, 3, 5};
const auto data = make_shared<op::Parameter>(element::f32, shape);
const auto like = make_shared<op::Parameter>(element::bf16, shape);
auto f = make_shared<Function>(make_shared<op::v1::ConvertLike>(data, like),
ParameterVector{data, like});
vector<float> data_vect{
0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f};
vector<bfloat16> like_vect(shape_size(shape), 0);
auto test_case = test::TestCase<TestEngine>(f);
test_case.add_input<float>(shape, data_vect);
test_case.add_input<bfloat16>(shape, like_vect);
test_case.add_expected_output<bfloat16>(
shape,
vector<bfloat16>{
0.5, 1.5, 0.5, 2.5, 1.5, 0.5, 3.5, 2.5, 0.5, 0.5, 2.5, 0.5, 0.5, 0.5, 1.5});
test_case.run();
}
NGRAPH_TEST(${BACKEND_NAME}, convert_like_bfloat16_float32)
{
Shape shape_data{1, 1, 3, 5};
Shape shape_like{4};
const auto data = make_shared<op::Parameter>(element::bf16, shape_data);
const auto like = make_shared<op::Parameter>(element::f32, shape_like);
auto f = make_shared<Function>(make_shared<op::v1::ConvertLike>(data, like),
ParameterVector{data, like});
vector<bfloat16> data_vect{
0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f};
vector<float> like_vect(shape_size(shape_like), 0);
auto test_case = test::TestCase<TestEngine>(f);
test_case.add_input<bfloat16>(shape_data, data_vect);
test_case.add_input<float>(shape_like, like_vect);
test_case.add_expected_output<float>(
shape_data, {0.5, 1.5, 0.5, 2.5, 1.5, 0.5, 3.5, 2.5, 0.5, 0.5, 2.5, 0.5, 0.5, 0.5, 1.5});
test_case.run();
}
NGRAPH_TEST(${BACKEND_NAME}, convert_like_dyn_float16_to_int64)
{
PartialShape pshape_data{Dimension::dynamic(), 2, 2, Dimension::dynamic()};
Shape shape_like{};
const auto data = make_shared<op::Parameter>(element::f16, pshape_data);
const auto like = op::Constant::create(element::i64, Shape{}, {0});
auto f =
make_shared<Function>(make_shared<op::v1::ConvertLike>(data, like), ParameterVector{data});
vector<float16> data_vect = {-3.21f, 0.1f, 2.6f, 4.99f};
Shape shape_data{1, 2, 2, 1};
auto test_case = test::TestCase<TestEngine, ngraph::test::TestCaseType::DYNAMIC>(f);
test_case.add_input<float16>(shape_data, data_vect);
test_case.add_expected_output<int64_t>(shape_data, vector<int64_t>{-3, 0, 2, 4});
test_case.run();
}

View File

@ -1000,14 +1000,6 @@ IE_CPU.backwards_log
# Unsupported op detected
IE_CPU.backwards_batchmatmultranspose_tensor2_tensor2
IE_CPU.round_int64
IE_CPU.convert_like_float32_int32
IE_CPU.convert_like_int32_float32
IE_CPU.convert_like_uint16_float32
IE_CPU.convert_like_int32_bool
IE_CPU.convert_like_float32_bool
IE_CPU.convert_like_float32_bfloat16
IE_CPU.convert_like_bfloat16_float32
IE_CPU.convert_like_dyn_float16_to_int64
# Operations were removed from opset
IE_CPU.atanh

View File

@ -1969,13 +1969,25 @@ namespace
const HostTensorVector& outputs,
const HostTensorVector& inputs)
{
using TI = typename element_type_traits<ti>::value_type;
using TO = typename element_type_traits<to>::value_type;
runtime::reference::convert<TI, TO>(inputs[0]->get_data_ptr<TI>(),
outputs[0]->get_data_ptr<TO>(),
shape_size(inputs[0]->get_shape()));
}
outputs[0]->set_shape(inputs[0]->get_shape());
size_t element_count = shape_size(outputs[0]->get_shape());
if (((ti == element::u1) || (to == element::u1)) ||
((ti == element::u4) || (to == element::u4)) ||
((ti == element::i4) || (to == element::i4)))
{
runtime::reference::detail::lp_convert(inputs[0]->get_data_ptr<ti>(),
outputs[0]->get_data_ptr<to>(),
element_count,
ti,
to);
}
else
{
runtime::reference::convert(
inputs[0]->get_data_ptr<ti>(), outputs[0]->get_data_ptr<to>(), element_count);
}
}
} // namespace convert_like_v1
template <element::Type_t OUT_ET>
@ -1988,6 +2000,12 @@ namespace
case element::Type_t::boolean:
convert_like_v1::evaluate<element::Type_t::boolean, OUT_ET>(op, outputs, inputs);
break;
case element::Type_t::u1:
convert_like_v1::evaluate<element::Type_t::u1, OUT_ET>(op, outputs, inputs);
break;
case element::Type_t::u4:
convert_like_v1::evaluate<element::Type_t::u4, OUT_ET>(op, outputs, inputs);
break;
case element::Type_t::u8:
convert_like_v1::evaluate<element::Type_t::u8, OUT_ET>(op, outputs, inputs);
break;
@ -2000,6 +2018,9 @@ namespace
case element::Type_t::u64:
convert_like_v1::evaluate<element::Type_t::u64, OUT_ET>(op, outputs, inputs);
break;
case element::Type_t::i4:
convert_like_v1::evaluate<element::Type_t::i4, OUT_ET>(op, outputs, inputs);
break;
case element::Type_t::i8:
convert_like_v1::evaluate<element::Type_t::i8, OUT_ET>(op, outputs, inputs);
break;
@ -2932,6 +2953,8 @@ namespace
return evaluate<element::Type_t::f64>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::f32:
return evaluate<element::Type_t::f32>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::i4:
return evaluate<element::Type_t::i4>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::i8:
return evaluate<element::Type_t::i8>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::i16:
@ -2940,6 +2963,10 @@ namespace
return evaluate<element::Type_t::i32>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::i64:
return evaluate<element::Type_t::i64>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::u1:
return evaluate<element::Type_t::u1>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::u4:
return evaluate<element::Type_t::u4>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::u8:
return evaluate<element::Type_t::u8>(as_type_ptr<T>(node), outputs, inputs);
case element::Type_t::u16: