diff --git a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_cell.cpp b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_cell.cpp index f998d6c46..211cca71a 100644 --- a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_cell.cpp +++ b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_cell.cpp @@ -67,6 +67,7 @@ const std::vector linear_before_reset{true}; const std::vector net_precisions = {InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16}; +const std::vector WRBLayerTypes = {ngraph::helpers::InputLayerType::CONSTANT}; // ------------- Smoke shapes ------------- const std::vector smoke_batches_01{1, 2}; @@ -82,6 +83,9 @@ INSTANTIATE_TEST_CASE_P(smoke_GRUCellCommon_01, ::testing::Values(activations), ::testing::ValuesIn(clips), ::testing::ValuesIn(linear_before_reset), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(net_precisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), GRUCellTest::getTestCaseName); @@ -99,6 +103,9 @@ INSTANTIATE_TEST_CASE_P(smoke_GRUCellCommon_02_FP32, ::testing::Values(activations), ::testing::ValuesIn(clips), ::testing::ValuesIn(linear_before_reset), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::Values(InferenceEngine::Precision::FP32), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), GRUCellTest::getTestCaseName); @@ -112,6 +119,9 @@ INSTANTIATE_TEST_CASE_P(smoke_GRUCellCommon_02_FP16, ::testing::Values(activations), ::testing::ValuesIn(clips), ::testing::ValuesIn(linear_before_reset), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::Values(InferenceEngine::Precision::FP16), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), GRUCellTest::getTestCaseName); @@ -130,6 +140,9 @@ INSTANTIATE_TEST_CASE_P(GRUCell_LPCNet, ::testing::Values(activations), ::testing::ValuesIn(clips), ::testing::ValuesIn(linear_before_reset), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(net_precisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), GRUCellTest::getTestCaseName); @@ -144,6 +157,9 @@ const auto benchmark_params = ::testing::Combine(::testing::Values(should_decomp ::testing::Values(activations), ::testing::Values(clips[0]), ::testing::Values(linear_before_reset[0]), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::Values(net_precisions[0]), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)); diff --git a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_sequence.cpp b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_sequence.cpp index 665abeb64..89f601f04 100644 --- a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_sequence.cpp +++ b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/gru_sequence.cpp @@ -12,6 +12,8 @@ namespace LayerTestsDefinitions { +using ngraph::helpers::InputLayerType; + class CUDNNGRUSequenceTest : public UnsymmetricalComparer { public: void SetUp() override { @@ -74,6 +76,7 @@ class LPCNetCUDNNGRUSequenceTest : public UnsymmetricalComparer bool linear_before_reset; SequenceTestsMode mode; ov::op::RecurrentSequenceDirection direction; + InputLayerType WRBType; InferenceEngine::Precision netPrecision; std::tie(mode, seq_lengths, @@ -83,6 +86,7 @@ class LPCNetCUDNNGRUSequenceTest : public UnsymmetricalComparer clip, linear_before_reset, direction, + WRBType, netPrecision, targetDevice) = this->GetParam(); size_t num_directions = direction == ov::op::RecurrentSequenceDirection::BIDIRECTIONAL ? 2 : 1; @@ -98,6 +102,7 @@ class LPCNetCUDNNGRUSequenceTest : public UnsymmetricalComparer auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); auto params = ngraph::builder::makeParams(ngPrc, {inputShapes[0], inputShapes[1]}); + ASSERT_EQ(InputLayerType::CONSTANT, WRBType); std::vector WRB = {inputShapes[3], inputShapes[4], inputShapes[5], inputShapes[2]}; auto gru_sequence = ngraph::builder::makeGRU(ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(params)), @@ -168,6 +173,7 @@ INSTANTIATE_TEST_CASE_P( ::testing::ValuesIn(clip), ::testing::ValuesIn(linear_before_reset), ::testing::ValuesIn(direction), + ::testing::Values(InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), GRUSequenceTest::getTestCaseName); @@ -188,6 +194,7 @@ INSTANTIATE_TEST_CASE_P( ::testing::ValuesIn(clip), ::testing::ValuesIn(linear_before_reset), ::testing::ValuesIn(direction), + ::testing::Values(InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), GRUSequenceTest::getTestCaseName); @@ -207,6 +214,7 @@ INSTANTIATE_TEST_CASE_P(LPCNetCUDNNGRUSequenceShapeTest, ::testing::ValuesIn(clip), ::testing::ValuesIn(linear_before_reset), ::testing::ValuesIn(direction), + ::testing::Values(InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), GRUSequenceTest::getTestCaseName); diff --git a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_cell.cpp b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_cell.cpp index b8a1cb97b..9cd93d1a9 100644 --- a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_cell.cpp +++ b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_cell.cpp @@ -65,6 +65,7 @@ const bool should_decompose = false; const std::vector activations{"sigmoid", "tanh", "tanh"}; const std::vector netPrecisions = {InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16}; +const std::vector WRBLayerTypes = {ngraph::helpers::InputLayerType::CONSTANT}; // ------------- Smoke shapes ------------- const std::vector smoke_batch{1, 5}; @@ -84,6 +85,9 @@ INSTANTIATE_TEST_CASE_P(smoke_LSTMCell_01, ::testing::ValuesIn(smoke_input_sizes_01), ::testing::Values(activations), ::testing::ValuesIn(smoke_clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -99,6 +103,9 @@ INSTANTIATE_TEST_CASE_P(smoke_LSTMCell_02, ::testing::ValuesIn(smoke_input_sizes_02), ::testing::Values(activations), ::testing::ValuesIn(smoke_clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -122,6 +129,9 @@ INSTANTIATE_TEST_CASE_P(LSTMCell_Tacotron2_dec_01, ::testing::Values(tacotron2_dec_01.input_size), ::testing::Values(activations), ::testing::Values(tacotron2_dec_01.clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -136,6 +146,9 @@ INSTANTIATE_TEST_CASE_P(LSTMCell_Tacotron2_dec_02, ::testing::Values(tacotron2_dec_02.input_size), ::testing::Values(activations), ::testing::Values(tacotron2_dec_02.clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -150,6 +163,9 @@ INSTANTIATE_TEST_CASE_P(LSTMCell_Tacotron2_enc_01, ::testing::Values(tacotron2_enc_01.input_size), ::testing::Values(activations), ::testing::Values(tacotron2_enc_01.clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -165,6 +181,9 @@ INSTANTIATE_TEST_CASE_P(LSTMCell_OV_Doc_01, ::testing::Values(ov_doc_01.input_size), ::testing::Values(activations), ::testing::Values(ov_doc_01.clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -179,6 +198,9 @@ INSTANTIATE_TEST_CASE_P(LSTMCell_Big_01, ::testing::Values(big_01.input_size), ::testing::Values(activations), ::testing::Values(big_01.clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -193,6 +215,9 @@ INSTANTIATE_TEST_CASE_P(LSTMCell_Big_02, ::testing::Values(big_02.input_size), ::testing::Values(activations), ::testing::Values(big_02.clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); @@ -207,6 +232,9 @@ INSTANTIATE_TEST_CASE_P(LSTMCell_Big_03, ::testing::Values(big_03.input_size), ::testing::Values(activations), ::testing::Values(big_03.clip), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), + ::testing::ValuesIn(WRBLayerTypes), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDNNLSTMCellTest::getTestCaseName); diff --git a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_sequence.cpp b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_sequence.cpp index 7fc216867..51f09cf51 100644 --- a/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_sequence.cpp +++ b/modules/nvidia_plugin/tests/functional/shared_tests_instances/single_layer_tests/lstm_sequence.cpp @@ -74,6 +74,7 @@ INSTANTIATE_TEST_CASE_P(smoke_LSTMSequence_01, ::testing::Values(activations), ::testing::Values(no_clip), ::testing::ValuesIn(sequenceDirections), + ::testing::Values(ngraph::helpers::InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDALSTMSequenceTest::getTestCaseName); @@ -88,6 +89,7 @@ INSTANTIATE_TEST_CASE_P(smoke_LSTMSequence_02, ::testing::Values(activations), ::testing::Values(no_clip), ::testing::ValuesIn(sequenceDirections), + ::testing::Values(ngraph::helpers::InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDALSTMSequenceTest::getTestCaseName); @@ -104,6 +106,7 @@ INSTANTIATE_TEST_CASE_P(LSTMSequence_Tacotron2_decoder_01, ::testing::Values(activations), ::testing::Values(no_clip), // clip ::testing::Values(ov::op::RecurrentSequenceDirection::FORWARD), + ::testing::Values(ngraph::helpers::InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDALSTMSequenceTest::getTestCaseName); @@ -118,6 +121,7 @@ INSTANTIATE_TEST_CASE_P(LSTMSequence_Tacotron2_decoder_02, ::testing::Values(activations), ::testing::Values(no_clip), // clip ::testing::Values(ov::op::RecurrentSequenceDirection::FORWARD), + ::testing::Values(ngraph::helpers::InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDALSTMSequenceTest::getTestCaseName); @@ -132,6 +136,7 @@ INSTANTIATE_TEST_CASE_P(LSTMSequence_Tacotron2_encoder_01, ::testing::Values(activations), ::testing::Values(no_clip), // clip ::testing::Values(ov::op::RecurrentSequenceDirection::BIDIRECTIONAL), + ::testing::Values(ngraph::helpers::InputLayerType::CONSTANT), ::testing::ValuesIn(netPrecisions), ::testing::Values(CommonTestUtils::DEVICE_NVIDIA)), CUDALSTMSequenceTest::getTestCaseName);