-
Notifications
You must be signed in to change notification settings - Fork 839
[DispatchCreation] Add split reduction for weight backward convs #22275
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
Merged
yzhang93
merged 2 commits into
iree-org:main
from
yzhang93:split_reduction_backward_conv
Oct 16, 2025
Merged
[DispatchCreation] Add split reduction for weight backward convs #22275
yzhang93
merged 2 commits into
iree-org:main
from
yzhang93:split_reduction_backward_conv
Oct 16, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: yzhang93 <[email protected]>
d447256 to
5cbe5df
Compare
MaheshRavishankar
requested changes
Oct 15, 2025
Collaborator
MaheshRavishankar
left a comment
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.
Mostly looks good. Juts a minor comment.
Signed-off-by: yzhang93 <[email protected]>
MaheshRavishankar
approved these changes
Oct 16, 2025
weidel-p
pushed a commit
to weidel-p/iree
that referenced
this pull request
Oct 21, 2025
…e-org#22275) Weight backward convolutions have a special CHWN layout, where the filter sizes (corresponding to output image sizes in forward convolutions) are typically large, while the output spatial dimensions are small. This makes the split reduction strategy particularly effective. This PR adds support to split these convs along the input channel dimension. Some experimental thresholds are applied to filter out cases that won't benefit from splitting reduction. Particular checks include: - When the batch and output channel sizes are large, the workload tends to distributed across many workgroups, making split reduction little to no effect. - When the input spatial sizes are small while the batch and output channel sizes are relatively larger (medium size), split reduction often has no effect or even degrades performance. --------- Signed-off-by: yzhang93 <[email protected]> Signed-off-by: Philipp <[email protected]>
yzhang93
added a commit
that referenced
this pull request
Nov 3, 2025
… weight backward convs (#22491) This PR is a follow-up for #22275. It removes the constraint that only splitting input channel dimension, and added support to split across multiple dimensions. The heuristics for setting multi-dimension tile sizes is similar to what is for GEMM #22357. More than half of the tracked weight backward shapes are benefiting from this change. Example runtime comparison for `convbfp16 -n 16 -c 16 -H 225 -W 225 -k 64 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 1 -F 4 -t 1 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --iter 100` - Without split reduction: 19352.8 ms - Split only the input channel dimension: 1445.1 ms - Split multiple reduction dimensions: 371.7 ms --------- Signed-off-by: yzhang93 <[email protected]>
bangtianliu
pushed a commit
to bangtianliu/iree
that referenced
this pull request
Nov 19, 2025
… weight backward convs (iree-org#22491) This PR is a follow-up for iree-org#22275. It removes the constraint that only splitting input channel dimension, and added support to split across multiple dimensions. The heuristics for setting multi-dimension tile sizes is similar to what is for GEMM iree-org#22357. More than half of the tracked weight backward shapes are benefiting from this change. Example runtime comparison for `convbfp16 -n 16 -c 16 -H 225 -W 225 -k 64 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 1 -F 4 -t 1 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --iter 100` - Without split reduction: 19352.8 ms - Split only the input channel dimension: 1445.1 ms - Split multiple reduction dimensions: 371.7 ms --------- Signed-off-by: yzhang93 <[email protected]>
pstarkcdpr
pushed a commit
to pstarkcdpr/iree
that referenced
this pull request
Nov 28, 2025
…e-org#22275) Weight backward convolutions have a special CHWN layout, where the filter sizes (corresponding to output image sizes in forward convolutions) are typically large, while the output spatial dimensions are small. This makes the split reduction strategy particularly effective. This PR adds support to split these convs along the input channel dimension. Some experimental thresholds are applied to filter out cases that won't benefit from splitting reduction. Particular checks include: - When the batch and output channel sizes are large, the workload tends to distributed across many workgroups, making split reduction little to no effect. - When the input spatial sizes are small while the batch and output channel sizes are relatively larger (medium size), split reduction often has no effect or even degrades performance. --------- Signed-off-by: yzhang93 <[email protected]>
pstarkcdpr
pushed a commit
to pstarkcdpr/iree
that referenced
this pull request
Nov 28, 2025
… weight backward convs (iree-org#22491) This PR is a follow-up for iree-org#22275. It removes the constraint that only splitting input channel dimension, and added support to split across multiple dimensions. The heuristics for setting multi-dimension tile sizes is similar to what is for GEMM iree-org#22357. More than half of the tracked weight backward shapes are benefiting from this change. Example runtime comparison for `convbfp16 -n 16 -c 16 -H 225 -W 225 -k 64 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 1 -F 4 -t 1 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --iter 100` - Without split reduction: 19352.8 ms - Split only the input channel dimension: 1445.1 ms - Split multiple reduction dimensions: 371.7 ms --------- Signed-off-by: yzhang93 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Weight backward convolutions have a special CHWN layout, where the filter sizes (corresponding to output image sizes in forward convolutions) are typically large, while the output spatial dimensions are small. This makes the split reduction strategy particularly effective. This PR adds support to split these convs along the input channel dimension.
Some experimental thresholds are applied to filter out cases that won't benefit from splitting reduction. Particular checks include: