Skip to content

MultiScaleDeformableAttn implementation and optimization #31191

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

ceciliapeng2011
Copy link
Contributor

@ceciliapeng2011 ceciliapeng2011 commented Jul 3, 2025

Details:

  • implements MultiScaleDeformableAttnFusion
  • implements ov::op::internal::MSDA
  • optimize MSDA primitive in gpu plugin

It is based on #30587

Tickets:

@ceciliapeng2011 ceciliapeng2011 requested review from a team as code owners July 3, 2025 09:38
@ceciliapeng2011 ceciliapeng2011 requested review from itikhono and removed request for a team July 3, 2025 09:38
@ceciliapeng2011 ceciliapeng2011 marked this pull request as draft July 3, 2025 09:38
@github-actions github-actions bot added category: Core OpenVINO Core (aka ngraph) category: GPU OpenVINO GPU plugin category: Python API OpenVINO Python bindings category: transformations OpenVINO Runtime library - Transformations category: CPP API OpenVINO CPP API bindings labels Jul 3, 2025
//({flatten_Slice_1194, {-1}}, {{"axis", 0}});
// ({Unsqueeze_65524 | Unsqueeze_28998, Unsqueeze_65525 | Unsqueeze_28999},
// wrap_type<opset1::Concat>(pattern::consumers_count(1));
auto attn_Concat_17 = wrap_type<Concat>(grid_sampler_block, {{"axis", -2}});
Copy link
Contributor Author

@ceciliapeng2011 ceciliapeng2011 Jul 3, 2025

Choose a reason for hiding this comment

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

@itikhono any good way to describe the pattern of a flexible number of Concat branches?

I am trying this way by passing one grid_sampler_block to it only, but the pattern check at this place fails due to the number of inputs of Concat do not match.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

can we try to change patterns?

{ED1A3608-18BB-4DBB-A9A1-713FCC8A1880}

@github-actions github-actions bot added category: CPU OpenVINO CPU plugin category: build OpenVINO cmake script / infra category: IE Tests OpenVINO Test: plugins and common labels Jul 7, 2025
@zaixing-wang zaixing-wang marked this pull request as ready for review July 25, 2025 07:15
@zaixing-wang zaixing-wang requested review from a team as code owners July 25, 2025 07:15
@zaixing-wang zaixing-wang requested a review from a team as a code owner July 28, 2025 01:50
@github-actions github-actions bot added the category: dependency_changes Pull requests that update a dependency file label Jul 28, 2025
@github-actions github-actions bot removed category: CPU OpenVINO CPU plugin category: build OpenVINO cmake script / infra category: dependency_changes Pull requests that update a dependency file labels Jul 28, 2025
@zaixing-wang zaixing-wang force-pushed the wzx_dev_deform_att branch 2 times, most recently from 3969041 to 9b8e88d Compare July 28, 2025 11:54
@github-actions github-actions bot removed the category: Python API OpenVINO Python bindings label Aug 4, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be PR cleaned as it base other PRs some changes should not be visible as diff

* @brief The transformation to support multi_scale_deformable_attn
* \ingroup ov_pass_cpp_api
*/
class OPENVINO_API MultiScaleDeformableAttn : public ModelPass {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this class in public API not in transformation component?

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) category: CPP API OpenVINO CPP API bindings category: GPU OpenVINO GPU plugin category: IE Tests OpenVINO Test: plugins and common category: transformations OpenVINO Runtime library - Transformations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants