From c482e5f807c97d1e44a7e51f97e65a6d188cad1c Mon Sep 17 00:00:00 2001 From: Sofya Balandina Date: Thu, 26 Oct 2023 12:57:33 +0100 Subject: [PATCH] [apiConformance] Add test CheckInferIsNotChangeInput to io_tensor (#20159) --- .../behavior/ov_infer_request/io_tensor.cpp | 18 ++++++++++++++++++ .../skip_configs/CPU/expected_failures_API.csv | 1 + 2 files changed, 19 insertions(+) diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp index 344f0e57daf5d0..6d23a1f615d95f 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp @@ -219,6 +219,24 @@ TEST_P(OVInferRequestIOTensorTest, InferStaticNetworkSetChangedOutputTensorThrow ASSERT_ANY_THROW(req.infer()); } +TEST_P(OVInferRequestIOTensorTest, CheckInferIsNotChangeInput) { + ov::Tensor input_tensor = utils::create_and_fill_tensor(input.get_element_type(), input.get_shape()); + OV_ASSERT_NO_THROW(req.set_tensor(input, input_tensor)); + OV_ASSERT_NO_THROW(req.get_tensor(input)); + + OV_ASSERT_NO_THROW(req.infer()); + + ov::Tensor input_after_infer; + OV_ASSERT_NO_THROW(input_after_infer = req.get_tensor(input)); + ov::test::utils::compare(input_tensor, input_after_infer); + + OV_ASSERT_NO_THROW(req.infer()); + + ov::Tensor input_after_several_infer; + OV_ASSERT_NO_THROW(input_after_several_infer = req.get_tensor(input)); + ov::test::utils::compare(input_tensor, input_after_several_infer); +} + std::string OVInferRequestIOTensorSetPrecisionTest::getTestCaseName(const testing::TestParamInfo& obj) { element::Type type; std::string target_device; diff --git a/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_API.csv b/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_API.csv index 7e956981216699..db8f560869e79c 100644 --- a/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_API.csv +++ b/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_API.csv @@ -124,6 +124,7 @@ ov_infer_request_mandatory/OVInferRequestIOTensorTest.canInferWithGetIn/targetDe ov_infer_request_mandatory/OVInferRequestIOTensorTest.canInferAfterIOBlobReallocation/targetDevice=BATCH.CPU_,1.0 ov_infer_request_mandatory/OVInferRequestIOTensorTest.InferStaticNetworkSetChangedOutputTensorThrow/targetDevice=BATCH.CPU_,1.0 ov_infer_request_mandatory/OVInferRequestIOTensorTest.InferStaticNetworkSetChangedInputTensorThrow/targetDevice=BATCH.CPU_,1.0 +ov_infer_request_mandatory/OVInferRequestIOTensorTest.CheckInferIsNotChangeInput/targetDevice=BATCH.CPU_,1.0 ov_infer_request_mandatory/OVInferRequestIOTensorSetPrecisionTest.CanSetOutBlobWithDifferentPrecision/type=u8_target_device=BATCH.CPU_,1.0 ov_infer_request_mandatory/OVInferRequestIOTensorSetPrecisionTest.CanSetOutBlobWithDifferentPrecision/type=u64_target_device=BATCH.CPU_,1.0 ov_infer_request_mandatory/OVInferRequestIOTensorSetPrecisionTest.CanSetOutBlobWithDifferentPrecision/type=u32_target_device=BATCH.CPU_,1.0