Skip to content

Commit

Permalink
[ONNX] Disabled constant folding for Subtract branch of DequantizeLin…
Browse files Browse the repository at this point in the history
…ear-21 (#27359)

### Details:
 - Disabled constant folding for Subtract branch of DequantizeLinear-21

### Tickets:
 - 156329
  • Loading branch information
gkrivor authored Nov 1, 2024
1 parent a488aec commit 5833781
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontends/onnx/frontend/src/op/dequantize_linear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "openvino/op/subtract.hpp"
#include "openvino/op/transpose.hpp"
#include "openvino/op/unsqueeze.hpp"
#include "transformations/rt_info/disable_constant_folding.hpp"
#include "utils/common.hpp"
#include "utils/reshape.hpp"
using namespace ov::op;
Expand Down Expand Up @@ -241,6 +242,7 @@ ov::OutputVector dequantize_linear(const ov::frontend::onnx::Node& node) {
zp = inputs[2];
if (zp.get_element_type() != scale.get_element_type()) {
zp = std::make_shared<v0::Convert>(zp, scale_type);
disable_constant_folding(zp.get_node_shared_ptr());
}
zp = std::make_shared<v0::Unsqueeze>(zp, unsqueezed_axes);
}
Expand Down

0 comments on commit 5833781

Please sign in to comment.