Skip to content

Commit

Permalink
[IE CLDNN] Fixed FC weights check (openvinotoolkit#5568)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-paramuzov authored May 13, 2021
1 parent 07a4918 commit c1b1e2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions inference-engine/src/cldnn_engine/ops/matmul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ void CreateMatMulOp(Program& p, const std::shared_ptr<ngraph::op::v0::MatMul>& o
auto shape_a = op->get_input_shape(0);
auto shape_b = op->get_input_shape(1);

bool is_fc = ngraph::is_type<ngraph::op::v0::Constant>(op->get_input_node_shared_ptr(1)) ||
ngraph::is_type<ngraph::op::v0::FakeQuantize>(op->get_input_node_shared_ptr(1));
bool is_fc = IsNodeOnConstPath(op->get_input_node_shared_ptr(1));
is_fc &= std::count_if(shape_b.begin(), shape_b.end(), [](size_t x) { return x != 1; }) <= 2;

if (is_fc) {
Expand Down

0 comments on commit c1b1e2e

Please sign in to comment.