Skip to content

Commit

Permalink
Revert Bitwise ops in PyTorch FE (#20813)
Browse files Browse the repository at this point in the history
* revert bitwise op for PT FE

* revert coverity fixes
  • Loading branch information
andrei-kochin authored Nov 2, 2023
1 parent 3ebb8eb commit 663bf04
Show file tree
Hide file tree
Showing 28 changed files with 131 additions and 615 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
#include "transformations/init_node_info.hpp"
#include "transformations/op_conversions/batch_norm_decomposition.hpp"
#include "transformations/op_conversions/bidirectional_sequences_decomposition.hpp"
#include "transformations/op_conversions/convert_bitwise_to_logical_bool.hpp"
#include "transformations/op_conversions/convert_broadcast_to_tiles.hpp"
#include "transformations/op_conversions/convert_convertlike.hpp"
#include "transformations/op_conversions/convert_deformable_conv_v8_to_v1.hpp"
Expand Down Expand Up @@ -227,11 +226,6 @@ bool ov::pass::CommonOptimizations::run_on_model(const std::shared_ptr<ov::Model
ADD_MATCHER(fq_fusions, MulFakeQuantizeFusion)
fq_fusions->set_name("ov::pass::FakeQuantizeFusions");

// Temporary transformation to allow for PyTorch frontend to
// partially support bitwise operators with boolean inputs for plugins
// that didn't enabled BitwiseOps from opset13
REGISTER_PASS(manager, ConvertBitwiseToLogical)

// StridesOptimization should be at the very end
// because we cannot insert any MaxPools since they may prevent
// other optimizations
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion src/frontends/pytorch/src/input_model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Place;
class TorchDecoder;

struct PlaceDesc {
PlaceDesc(const std::shared_ptr<Node>& value) : m_value(value) {}
PlaceDesc(std::shared_ptr<Node> value) : m_value(value) {}
std::shared_ptr<Node> m_value;
};

Expand Down
3 changes: 1 addition & 2 deletions src/frontends/pytorch/src/op/avg_poolnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ OutputVector translate_avg_poolnd(const NodeContext& context) {
auto pads_len = context.mark_node(v0::Constant::create(element::i32, Shape{}, {pads.size()}));
auto pads_diff = context.mark_node(std::make_shared<v1::Subtract>(rank, pads_len));
auto pads_remaining = context.mark_node(std::make_shared<v3::Broadcast>(zero_i32, pads_diff));
auto padding = context.mark_node(
std::make_shared<v0::Concat>(OutputVector{std::move(pads_remaining), std::move(pad_values)}, 0));
auto padding = context.mark_node(std::make_shared<v0::Concat>(OutputVector{pads_remaining, pad_values}, 0));
input = context.mark_node(std::make_shared<v1::Pad>(input, padding, padding, zero, ov::op::PadMode::CONSTANT));
pads = Shape(pads.size(), 0);
}
Expand Down
Loading

0 comments on commit 663bf04

Please sign in to comment.