Skip to content

Commit

Permalink
[apiConformance] Add test CheckInferIsNotChangeInput to io_tensor (op…
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalandi authored Oct 26, 2023
1 parent bec011c commit c482e5f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<OVInferRequestSetPrecisionParams>& obj) {
element::Type type;
std::string target_device;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c482e5f

Please sign in to comment.