Enable nop elimination for f16 type (#16749)

This commit is contained in:
Vladimir Paramuzov
2023-04-07 09:18:27 +04:00
committed by GitHub
parent 3be946371d
commit 6d82f36050
2 changed files with 4 additions and 0 deletions

View File

@@ -271,6 +271,9 @@ bool can_eliminate_eltwise_node(const std::shared_ptr<Node>& eltwise,
case element::f32:
actual_const = reinterpret_cast<const float*>(data_ptr)[0];
break;
case element::f16:
actual_const = reinterpret_cast<const ov::float16*>(data_ptr)[0];
break;
case element::i32:
actual_const = static_cast<float>(reinterpret_cast<const int32_t*>(data_ptr)[0]);
break;

View File

@@ -971,6 +971,7 @@ public:
std::vector<element::Type> types{
element::f32,
element::f16,
element::f64,
element::i32,
element::u32,