-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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] Skip broadcast when input and output shapes are identical #23331
Conversation
3383951
to
7202a71
Compare
// In this case, broadcast can not be optimized due to different input and output shapes. | ||
if (node.have_user_with_type<reorder>() && node.get_users().size() == 1) | ||
return; | ||
node.can_be_optimized(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any more possibility to reduce the target scope? I am afraid this will let most of the broadcasts be marked as can_be_opt so that less chance of the memory reuse, though the ratio of the actual optimizable cases is considered as small.. For example could we exclude more of "apparently not optimizable cases" like [-1, 1, -1, -1] [-1, 16, -1, -1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... I'll try to reduce the target scope as you reviewed. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an additional condition not to skip broadcast. Thank you.
7202a71
to
c963ea2
Compare
…vinotoolkit#23331) ### Details: - This PR makes some `Broadcast` layers to be skipped if input and output shapes are same. ### Tickets: - 135100
…vinotoolkit#23331) ### Details: - This PR makes some `Broadcast` layers to be skipped if input and output shapes are same. ### Tickets: - 135100
…vinotoolkit#23331) ### Details: - This PR makes some `Broadcast` layers to be skipped if input and output shapes are same. ### Tickets: - 135100
Details:
Broadcast
layers to be skipped if input and output shapes are same.Tickets: