Skip to content

Commit

Permalink
.convert_element_type(element::u8)
Browse files Browse the repository at this point in the history
             .convert_element_type(element::f32);

still need to call DisableEliminateUselessConvert

Signed-off-by: xipingya <[email protected]>
  • Loading branch information
xipingyan committed Dec 6, 2024
1 parent 2b758b3 commit aa4610b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "openvino/op/add.hpp"
#include "openvino/op/constant.hpp"
#include "openvino/op/slice.hpp"
#include "transformations/common_optimizations/nop_elimination.hpp"
#include "openvino/pass/manager.hpp"

using namespace ov;
using namespace ov::preprocess;
Expand Down Expand Up @@ -139,6 +141,9 @@ static RefPreprocessParams convert_only() {
.convert_element_type(element::u8)
.convert_element_type(element::f32);
p.build();
ov::pass::Manager manager;
manager.register_pass<ov::pass::DisableEliminateUselessConvert>();
manager.run_passes(f);
return f;
};
res.inputs.emplace_back(Shape{1, 1, 2, 2}, element::i16, std::vector<int16_t>{2, 3, 4, 5});
Expand Down

0 comments on commit aa4610b

Please sign in to comment.