[CORE] IsFinite, IsInf, IsNan reference implementation (#13621)

* Add reference implementation for Is ops

* FIx test

* Fix typo

* Remove deprecated

* Fix issues with API switch

* Force cast to float for float16/bfloat16 in ref

* Fix style

* Remove BWDCMP_RTTI

* Remove TensorVector helper check

* Remove evaluate functions

* Disable faling tests due to missing eval
This commit is contained in:
Mateusz Mikolajczyk authored and GitHub committed 2022-11-09 19:17:26 +03:00
1 parent 5a50266dd7
commit 1c03be58ff
15 files changed
+655 -28

No files matched your search

+5 -5
View File
@@ -5971,7 +5971,8 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_trilu_dynamic_shapes) {
}
NGRAPH_TEST(${BACKEND_NAME}, onnx_is_finite) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/is_finite.onnx"));
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/is_finite.onnx"));
auto test_case = test::TestCase(function, s_device);
@@ -5996,8 +5997,6 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_is_inf_default) {
// clang-format off
test_case.add_input<float>(Shape{1, 2, 3}, {std::nanf(""), std::numeric_limits<float>::infinity(), -0.6000f, -1.0000f, std::nanf(""), -1.0000f});
test_case.add_input<float>(
Shape{2, 2, 2},
std::vector<float>{ std::numeric_limits<float>::infinity(), 0.0000f,
@@ -6091,7 +6090,8 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_is_inf_detect_none) {
}
NGRAPH_TEST(${BACKEND_NAME}, onnx_is_nan) {
const auto function = onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/is_nan.onnx"));
const auto function = onnx_import::import_onnx_model(
file_util::path_join(CommonTestUtils::getExecutableDirectory(), SERIALIZED_ZOO, "onnx/is_nan.onnx"));
auto test_case = test::TestCase(function, s_device);
@@ -6099,7 +6099,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_is_nan) {
test_case.add_input<float>(Shape{1, 2, 3}, {std::nanf(""), std::nanf(""), -0.6000f, -1.0000f, std::nanf(""), -1.0000f});
test_case.add_expected_output<float>(
test_case.add_expected_output<bool>(
Shape{1, 2, 3},
{true, true, false, false, true, false});
@@ -426,11 +426,9 @@ IE_CPU.onnx_softmax_crossentropy_loss_mean
# Cannot find blob with name: Y
IE_CPU.onnx_bool_init_and
onnx_is_finite
onnx_is_inf_default
onnx_is_inf_positive_only
onnx_is_inf_negative_only
onnx_is_inf_detect_none
onnx_is_nan
IE_CPU.onnx_is_finite
IE_CPU.onnx_is_inf_default
IE_CPU.onnx_is_inf_negative_only
IE_CPU.onnx_is_inf_positive_only
IE_CPU.onnx_is_inf_detect_none
IE_CPU.onnx_is_nan
@@ -82,12 +82,3 @@ onnx_clip_no_min_no_max_int64
# z node not found in graph cache - ticket: 81976
INTERPRETER.onnx_expand_context_dependent_function
INTERPRETER.onnx_softmax_crossentropy_loss_mean
onnx_is_finite
onnx_is_inf_default
onnx_is_inf_positive_only
onnx_is_inf_negative_only
onnx_is_inf_detect_none
onnx_is_nan