diff --git a/src/core/tests/ov_tensor_test.cpp b/src/core/tests/ov_tensor_test.cpp index 6a67c78136e..102b2ca2e09 100644 --- a/src/core/tests/ov_tensor_test.cpp +++ b/src/core/tests/ov_tensor_test.cpp @@ -71,7 +71,7 @@ TEST_F(OVTensorTest, canAccessF16Tensor) { EXPECT_NE(nullptr, t.data()); EXPECT_NO_THROW(t.data(ov::element::f16)); EXPECT_NO_THROW(t.data()); - EXPECT_THROW(t.data(), ov::Exception); + EXPECT_NO_THROW(t.data()); EXPECT_THROW(t.data(), ov::Exception); EXPECT_THROW(t.data(), ov::Exception); } diff --git a/src/inference/src/dev/make_tensor.cpp b/src/inference/src/dev/make_tensor.cpp index 137f1412e08..c72d7a2c3c1 100644 --- a/src/inference/src/dev/make_tensor.cpp +++ b/src/inference/src/dev/make_tensor.cpp @@ -36,7 +36,8 @@ public: void* data(const element::Type& element_type) const override { if (element_type != element::undefined && element_type != element::dynamic) { - OPENVINO_ASSERT(element_type == get_element_type(), + OPENVINO_ASSERT(element_type.bitwidth() == get_element_type().bitwidth() && + element_type.is_real() == get_element_type().is_real(), "Tensor data with element type ", get_element_type(), ", is not representable as pointer to ",