Skip to content

Commit 6c03fa7

Browse files
committed
[TESTS] bool
1 parent 902cffe commit 6c03fa7

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/plugins/intel_cpu/tests/functional/shared_tests_instances/skip_tests_config.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,6 @@ std::vector<std::string> disabledTestPatterns() {
433433
retVector.emplace_back(R"(.*proposal_params/.*)");
434434
// Quantized models unsupported
435435
retVector.emplace_back(R"(.*Quantized.*)");
436-
// 176707: Accuracy issues
437-
retVector.emplace_back(R"(.*smoke_IsOp/ComparisonLayerTest.*)");
438436

439437
if (!ov::intel_cpu::riscv64::mayiuse(ov::intel_cpu::riscv64::gv)) {
440438
// Integer division is supported only by JIT Executor which is available on platforms with GV instruction sets.

src/tests/test_utils/common_test_utils/src/ov_tensor_utils.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "common_test_utils/ov_tensor_utils.hpp"
66

77
#include <iomanip>
8+
#include <type_traits>
89

910
#include "common_test_utils/data_utils.hpp"
1011
#include "openvino/core/type/element_iterator.hpp"
@@ -597,6 +598,25 @@ void compare(const ov::Tensor& expected,
597598
continue;
598599
}
599600

601+
if constexpr (std::is_same_v<ExpectedT, char> || std::is_same_v<ActualT, char>) {
602+
const bool is_boolean_tensor = expected.get_element_type() == ov::element::boolean ||
603+
actual.get_element_type() == ov::element::boolean;
604+
605+
if (is_boolean_tensor) {
606+
const auto expected_bool = expected_value != static_cast<ExpectedT>(0);
607+
const auto actual_bool = actual_value != static_cast<ActualT>(0);
608+
const double expected_d = expected_bool ? 1.0 : 0.0;
609+
const double actual_d = actual_bool ? 1.0 : 0.0;
610+
bool status = error.update(actual_d, expected_d, i);
611+
#ifdef NDEBUG
612+
if (!status && tensor_comparation::equal(topk_threshold, 1.f)) {
613+
break;
614+
}
615+
#endif
616+
continue;
617+
}
618+
}
619+
600620
bool status = error.update(actual_value, expected_value, i);
601621
#ifdef NDEBUG
602622
if (!status && tensor_comparation::equal(topk_threshold, 1.f)) {

0 commit comments

Comments
 (0)