Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meiyang/fix cvs58539 #8217

Merged
merged 16 commits into from
Dec 2, 2021

Conversation

meiyang-intel
Copy link
Contributor

@meiyang-intel meiyang-intel commented Oct 26, 2021

Details:

  • Reshape conv filter with gather op in ngraph paddle front end
  • Broadcast with unsqueeze op in elementwise ops in ngraph paddle frontend

Tickets:

@meiyang-intel meiyang-intel requested review from nosovmik and a team October 26, 2021 07:08
@openvino-pushbot openvino-pushbot added the category: Core OpenVINO Core (aka ngraph) label Oct 26, 2021
@meiyang-intel meiyang-intel force-pushed the meiyang/fix_CVS58539 branch 2 times, most recently from 27e826b to ca8eaa0 Compare October 27, 2021 01:53
@zhangYiIntel
Copy link
Contributor

Also another concern is about the performance, do we have test this branch in benchmark app to see if the performance is effected ?

else {
auto axis = ngraph::opset6::Constant::create(ngraph::element::i64, ov::Shape{}, {axis_value});

auto x_shape = std::make_shared<ngraph::opset6::ShapeOf>(x);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd better to use the default_opset instead of opset6, the sample

@meiyang-intel
Copy link
Contributor Author

Hi @jane-intel , can you help review this PR

hw_end,
std::vector<int64_t>{0},
std::vector<int64_t>{0});
const std::vector<size_t> hw_indices{1, 2, 3};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2D conv has NCHW layout of data and OIHW on weight, right? Why do we state axes 1,2,3 as spatial? should we change naming and add a comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jane-intel , it is updated


auto indices_node =
default_opset::Constant::create(ngraph::element::i64, ngraph::Shape{indices.size()}, indices);
auto y_node = std::make_shared<default_opset::Unsqueeze>(y, indices_node);
return node.default_single_output_mapping({std::make_shared<T>(x, y_node)}, {"Out"});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we set auto broadcast to PDPD mode and skip this Unsqueeze? Will it be supported by plugins and further tools? I see this as proper way to read eltwise ops

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jane-intel , updated by using PDPD broadcast. also find some bugs in transforming while testing. please check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jane-intel , I also find a bug in transformer if we apply PDPD autobroadcast. There is a workaround to skip this issue. The workaround is in https://github.com/meiyang-intel/openvino/tree/meiyang/op_sequence_fusion_rm_pdpd_broadcast . But this WA will reduce the performance some paddle models. And the fix to apply broadcast to op sequence fusion is in progress.
But after second consideration, these fix for transformer may not only impact paddle. Also the 2022.1 is upcoming, so I don't want to import these changes to 2022.1 to prevent from unknown issues.
So can I revert the commit which is applied the PDPD broadcast and using 'unsqueeze' in 2022.1?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, proceed with unsqueeze. I was simply trying to understand if pdpd broadcast for eltwise ops could be a solution here.

@meiyang-intel meiyang-intel force-pushed the meiyang/fix_CVS58539 branch 2 times, most recently from 7f1647c to fc8d57e Compare November 29, 2021 01:46
@meiyang-intel meiyang-intel requested a review from a team November 29, 2021 01:46
@meiyang-intel meiyang-intel marked this pull request as draft November 30, 2021 11:19
@meiyang-intel meiyang-intel marked this pull request as ready for review December 2, 2021 01:32
@jane-intel jane-intel merged commit 0bede45 into openvinotoolkit:master Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Core OpenVINO Core (aka ngraph)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants