[TorchToLinalg] Support AtenReplicationPad1d with lowering to linalg backend#4217
Merged
Conversation
47089ef to
e2e701b
Compare
Contributor
Author
|
Would appreciate a review - @vivekkhandelwal1 | @stellaraccident | @penguin-wwy |
zjgarvey
approved these changes
Jun 13, 2025
zjgarvey
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the PR!
I'm not entirely sure about the original motivation for the 2d lowering, but 3 different concat ops seems like an expensive way to perform padding.
I'm not going to block this either way. The PR looks good in general, and it would make more sense to add a lowering consistent with the 2d op first, and follow up with a separate patch to improve the implementation if desired.
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
c8af8a9 to
4a9bc26
Compare
zjgarvey
reviewed
Jun 14, 2025
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
04aa077 to
691eb58
Compare
Collaborator
|
My approval still stands, do you want me to merge? |
Contributor
Author
Yes please @zjgarvey |
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.
This PR takes care of #4216.
AtenReplicationPad1dsupport intorchdialect.tensor.extract_sliceops for left & right slicestensor.concatops to expand each slice into right shape and join all slices in orderAtenPadOpdecomposition to make use of 1d replication pad instead of using 2d variant.xfailsets.