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

[GPU] Add condition for dynamic shape split_lengths for in place crop buffer fusing #25595

Conversation

wilson-seok
Copy link
Contributor

Details:

  • Add condition for dynamic shape split_lengths for in place crop buffer fusing

Tickets:

  • 146739

@wilson-seok wilson-seok requested review from a team as code owners July 17, 2024 03:26
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Jul 17, 2024
@wilson-seok wilson-seok force-pushed the fix_runtime_in_place_crop_for_dynamic_shape branch from 679a50a to 6f06699 Compare July 17, 2024 04:42
// The VariadicSplit shape infer requires executed value of input[2](split_lengths)
// So skip update_shape here when _node is input[2] of crop
auto crop_op_mode = u->_impl_params->typed_desc<crop>()->op_mode;
bool is_split_lengths = (crop_op_mode == cldnn::crop_ngraph_op_mode::variadic_split) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

crop has 3 inputs and do_runtime_in_place_crop is executed twice in previous 2 inputs before split_lenth node. but this condition only checks where current node is 3rd input or not.
Under this condition, isn't it possible that update_shape of crop is done before the split_length node is executed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually axis and split_lengths nodes are executed before input0. And axis should have valid number because it is mandatory to check crop buffer fusing in build time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it better to check user crop's 2nd input is non_constant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yeonbok do_runtime_in_place_crop() is not called when node is constant. So checking non_constant here is not feasible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yeonbok Updated as we discussed. Thanks!

@yeonbok yeonbok added this pull request to the merge queue Jul 26, 2024
Merged via the queue into openvinotoolkit:master with commit e110479 Jul 26, 2024
108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants