[IE TESTS] Fix abs for FP16 comparation (#17414)

* [IE TESTS] Fix abs for FP16 comparation

* Update data_utils.hpp

* Skipps failed tests
This commit is contained in:
Irina Efode 2023-05-12 16:25:03 +04:00 committed by GitHub
parent dab190b988
commit 4303d10e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -114,6 +114,9 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*OVInferRequestCheckTensorPrecision.*get(Input|Output|Inputs|Outputs)From.*FunctionWith(Single|Several).*type=(u4|u1|i4|boolean).*)", R"(.*OVInferRequestCheckTensorPrecision.*get(Input|Output|Inputs|Outputs)From.*FunctionWith(Single|Several).*type=(u4|u1|i4|boolean).*)",
// AUTO does not support import / export // AUTO does not support import / export
R"(.*smoke_Auto_BehaviorTests/OVCompiledGraphImportExportTest.*(mportExport|readFromV10IR).*/targetDevice=(AUTO).*)", R"(.*smoke_Auto_BehaviorTests/OVCompiledGraphImportExportTest.*(mportExport|readFromV10IR).*/targetDevice=(AUTO).*)",
// CVS-110345
R"(.*ReferenceInterpolate_v11.*data_type=f16.*)",
R"(.*LSTMSequence_With_Hardcoded_Refs.*ReferenceLSTMSequenceTest.*iType=f16.*)",
}; };
#ifdef _WIN32 #ifdef _WIN32

View File

@ -504,7 +504,7 @@ inline ngraph::bfloat16 ie_abs(const ngraph::bfloat16 &val) {
} }
inline ngraph::float16 ie_abs(const ngraph::float16 &val) { inline ngraph::float16 ie_abs(const ngraph::float16 &val) {
return ngraph::float16::from_bits(val.to_bits() ^ 0x8000); return ngraph::float16::from_bits(val.to_bits() & 0x7FFF);
} }
} // namespace CommonTestUtils } // namespace CommonTestUtils