Skip to content

[TorchToLinalg] Support AtenReplicationPad1d with lowering to linalg backend #4217

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

zahidwx
Copy link
Contributor

@zahidwx zahidwx commented Jun 1, 2025

This PR takes care of #4216.

  • Add AtenReplicationPad1d support in torch dialect.
  • Lower to linalg backend:
    • tensor.extract_slice ops for left & right slices
    • tensor.concat ops to expand each slice into right shape and join all slices in order
  • Update AtenPadOp decomposition to make use of 1d replication pad instead of using 2d variant.
  • Add tests & update failing cases in xfail sets.

@zahidwx zahidwx force-pushed the feature/ReplicationPad1D branch from 47089ef to e2e701b Compare June 1, 2025 20:11
zahidwx added 2 commits June 2, 2025 01:42
@zahidwx zahidwx marked this pull request as ready for review June 1, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant