Skip to content
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

[MLIR][TORCH] Add support for 1-d group convolution #3904

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

vivekkhandelwal1
Copy link
Collaborator

This commit adds the support for 1-d group convolution by transforming it into a 2-d group convolution which is already supported.

This commit also refactors the unsqueeze and squeeze tensor utility.

Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you used most of the logic from squeeze.dim and unsqueeze lowerings to linalg for these helper functions, should we use these util functions there as well?

lib/Conversion/TorchToLinalg/Linear.cpp Outdated Show resolved Hide resolved
lib/Conversion/Utils/Utils.cpp Outdated Show resolved Hide resolved
lib/Conversion/TorchToLinalg/Linear.cpp Show resolved Hide resolved
This commit adds the support for 1-d group convolution by transforming
it into a 2-d group convolution which is already supported.

This commit also refactors the unsqueeze and squeeze tensor utility.

Signed-off-by: Vivek Khandelwal <[email protected]>
@vivekkhandelwal1
Copy link
Collaborator Author

If you used most of the logic from squeeze.dim and unsqueeze lowerings to linalg for these helper functions, should we use these util functions there as well?

I have already made those changes and replaced the code. Could you please re-check? Or, let me know if I am missing something.

Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits, then LGTM.

lib/Conversion/TorchToLinalg/Linear.cpp Outdated Show resolved Hide resolved
lib/Conversion/TorchToLinalg/Linear.cpp Outdated Show resolved Hide resolved
@vivekkhandelwal1 vivekkhandelwal1 enabled auto-merge (squash) December 13, 2024 05:24
@vivekkhandelwal1 vivekkhandelwal1 merged commit 8e0eafd into llvm:main Dec 13, 2024
3 checks passed
@vivekkhandelwal1 vivekkhandelwal1 deleted the fix-conv branch December 13, 2024 05:55
rahuls-cerebras added a commit that referenced this pull request Jan 3, 2025
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.

2 participants