Skip to content

Commit 1fef582

Browse files
authored
[GPU] add u8 support in evaluate of logical_not (openvinotoolkit#23795)
### Details: - Add u8 support in op evaluate of logical_not. It is called in cpu_impl of GPU plugin and GPU plugin is using u8 as boolean from transformed graph. ### Tickets: - 124503
1 parent 9e15d1b commit 1fef582

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/core/src/op/logical_not.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bool LogicalNot::evaluate(TensorVector& outputs, const TensorVector& inputs) con
5555
this,
5656
outputs,
5757
inputs,
58-
OV_PP_ET_LIST(boolean, i32, i64, u32, u64, f32),
58+
OV_PP_ET_LIST(boolean, u8, i32, i64, u32, u64, f32),
5959
logical_not::Evaluate,
6060
inputs[0].get_element_type(),
6161
inputs[0],
@@ -67,6 +67,7 @@ bool LogicalNot::has_evaluate() const {
6767
OV_OP_SCOPE(v1_LogicalNot_has_evaluate);
6868
switch (get_input_element_type(0)) {
6969
case element::boolean:
70+
case element::u8:
7071
case element::f16:
7172
case element::f32:
7273
case element::i32:

src/plugins/template/tests/functional/op_reference/logical_not.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ std::vector<RefLogicalParams> generateLogicalParams() {
1919
Builder{}
2020
.opType(LogicalTypes::LOGICAL_NOT)
2121
.inputs({{{2, 2}, element::boolean, std::vector<char>{true, false, true, false}}})
22-
.expected({{2, 2}, element::boolean, std::vector<char>{false, true, false, true}})};
22+
.expected({{2, 2}, element::boolean, std::vector<char>{false, true, false, true}}),
23+
Builder{}
24+
.opType(LogicalTypes::LOGICAL_NOT)
25+
.inputs({{{2, 2}, element::u8, std::vector<uint8_t>{1, 0, 1, 0}}})
26+
.expected({{2, 2}, element::u8, std::vector<uint8_t>{0, 1, 0, 1}})};
2327
return logicalParams;
2428
}
2529

0 commit comments

Comments
 (0)