Rewrite dilated convolutions by expanding the kernel#3041
Merged
copybara-service[bot] merged 1 commit intoJun 17, 2026
Conversation
j2kun
approved these changes
Jun 8, 2026
j2kun
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! I think with Asra's other fix you should be unblocked here, either by making the input values smaller or by increasing the mod bits.
a74b3c9 to
1de1c4b
Compare
Collaborator
Author
I changed the test parameters and added the 2d version, which was pretty straightforward. If you are happy with it, I'll squash down to 1 commit |
j2kun
approved these changes
Jun 12, 2026
j2kun
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! Let's squash and get it in
1de1c4b to
ee8ad4c
Compare
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
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.
The dilation argument adds 0 between the kernel values:
[1,2,3], dilation=3 -> [1,0,0,2,0,0,3], dilation=1
This pass rewrites a dilated convolution operator to a convolution operator with dilation=1 by explicitly inserting the 0s in the kernel.
If you agree with approach, I can also port it to the 2d convolution operator.
I am opening this as a draft PR because it is blocked by #3003 . The bug is unrelated to these changes, but it is making the integration test fail. Let me know if I can help you somehow with the resolution of #3003 @asraa . I am happy to sit down and try to figure this out together if you think that would be helpful.