Add virtual inheritance to shared tests (#7649)

This commit is contained in:
Mikhail Kozlov
2021-09-28 17:20:04 +03:00
committed by GitHub
parent bd989cee67
commit e932a2eda5
16 changed files with 18 additions and 18 deletions
@@ -19,7 +19,7 @@ typedef std::tuple<
namespace FuncTestUtils {
class ImportNetworkTestBase : public testing::WithParamInterface<exportImportNetworkParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<exportImportNetworkParams> obj);
void Run() override;
@@ -26,7 +26,7 @@ using loadNetworkCacheParams = std::tuple<
namespace LayerTestsDefinitions {
class LoadNetworkCacheTestBase : public testing::WithParamInterface<loadNetworkCacheParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
std::string m_cacheFolderName;
std::string m_functionName;
ngraph::element::Type m_precision;
@@ -25,7 +25,7 @@ using PreprocessingPrecisionConvertParams = std::tuple<
struct PreprocessingPrecisionConvertTest :
public testing::WithParamInterface<PreprocessingPrecisionConvertParams>,
LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<PreprocessingPrecisionConvertParams> obj) {
InferenceEngine::Precision inPrc;
@@ -20,7 +20,7 @@ typedef std::tuple<
std::map<std::string, std::string> // Additional configuration
> dynamicBatchTestParams;
class DynamicBatchTest : public LayerTestsUtils::LayerTestsCommon,
class DynamicBatchTest : virtual public LayerTestsUtils::LayerTestsCommon,
public testing::WithParamInterface<dynamicBatchTestParams> {
private:
bool run_async = false;
@@ -20,7 +20,7 @@ typedef std::tuple<
> BatchNormLayerTestParams;
class BatchNormLayerTest : public testing::WithParamInterface<BatchNormLayerTestParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(const testing::TestParamInfo<BatchNormLayerTestParams>& obj);
@@ -27,7 +27,7 @@ typedef std::tuple<
> VariadicSplitParams;
class VariadicSplitLayerTest : public testing::WithParamInterface<VariadicSplitParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<VariadicSplitParams> obj);
@@ -24,7 +24,7 @@ typedef std::tuple<
> basicLstmParams;
class Basic_LSTM_S : public testing::WithParamInterface<basicLstmParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<basicLstmParams> obj);
@@ -25,7 +25,7 @@ typedef std::tuple<
class ConcatQuantDuringMemoryRequantTest
: public testing::WithParamInterface<ConcatQuantDuringMemoryRequantTuple>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
private:
void switchToNgraphFriendlyModel();
std::vector<float> memory_1_init;
@@ -27,7 +27,7 @@ typedef std::tuple<
> ConstStridedSliceConcatParams;
class ConstStridedSliceConcatTest : public testing::WithParamInterface<ConstStridedSliceConcatParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConstStridedSliceConcatParams> obj);
InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override;
@@ -23,7 +23,7 @@ typedef std::tuple<
class DelayedCopyTest
: public testing::WithParamInterface<ConcatSplitReluTuple>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
private:
void switchToNgraphFriendlyModel();
public:
@@ -31,7 +31,7 @@ typedef std::tuple<
> FcConvFcParams;
class FcAfterConvTest : public testing::WithParamInterface<FcConvFcParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<FcConvFcParams> obj);
InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override;
@@ -41,7 +41,7 @@ protected:
};
class FcBeforeConvTest : public testing::WithParamInterface<FcConvFcParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<FcConvFcParams> obj);
InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override;
@@ -51,7 +51,7 @@ protected:
};
class FcBetweenConvsTest : public testing::WithParamInterface<FcConvFcParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<FcConvFcParams> obj);
InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override;
@@ -17,7 +17,7 @@ typedef std::tuple<
std::map<std::string, std::string> // Configuration
> memoryEltwiseReshapeConcatParams;
class MemoryEltwiseReshapeConcatTest : public LayerTestsUtils::LayerTestsCommon,
class MemoryEltwiseReshapeConcatTest : virtual public LayerTestsUtils::LayerTestsCommon,
public testing::WithParamInterface<memoryEltwiseReshapeConcatParams> {
private:
void initTestModel();
@@ -18,7 +18,7 @@ typedef std::tuple<
std::map<std::string, std::string> // Configuration
> multipleLSTMCellParams;
class MultipleLSTMCellTest : public LayerTestsUtils::LayerTestsCommon,
class MultipleLSTMCellTest : virtual public LayerTestsUtils::LayerTestsCommon,
public testing::WithParamInterface<multipleLSTMCellParams> {
private:
// you have to Unroll TI manually and remove memory untill ngraph supports it
@@ -22,7 +22,7 @@ using MultiplyAddParamsTuple = typename std::tuple<
class MultiplyAddLayerTest:
public testing::WithParamInterface<MultiplyAddParamsTuple>,
public LayerTestsUtils::LayerTestsCommon{
virtual public LayerTestsUtils::LayerTestsCommon{
public:
std::shared_ptr<ngraph::Function> fn;
static std::string getTestCaseName(const testing::TestParamInfo<MultiplyAddParamsTuple> &obj);
@@ -25,7 +25,7 @@ typedef std::tuple<
class NegativeMemoryOffsetTest
: public testing::WithParamInterface<NegativeMemoryLayerOffsetTuple>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
private:
void switchToNgraphFriendlyModel();
std::vector<float> memory_init;
@@ -30,7 +30,7 @@ typedef std::tuple<
> SliceConvParams;
class SliceConvTest : public testing::WithParamInterface<SliceConvParams>,
public LayerTestsUtils::LayerTestsCommon {
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(testing::TestParamInfo<SliceConvParams> obj);
InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override;