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

[Encoding][NFC] Move non attribute implementation to EncodingTypes.cpp #20045

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

hanhanW
Copy link
Contributor

@hanhanW hanhanW commented Feb 20, 2025

It follows the convention, which only put the attribute implementation and local functions to EncodingAttr.cpp. The implementation of other utilities is moved to EncodingTypes.cpp.

Additionally, it spells out the types for auto.

It follows the convention, which only put the attribute implementation
and local functions to EncodingAttr.cpp. The implementation of other
utilities are moved to EncodingTypes.cpp.

Signed-off-by: hanhanW <[email protected]>
@hanhanW hanhanW requested review from kuhar and jtuyls February 20, 2025 19:12
@hanhanW hanhanW requested a review from bjacob as a code owner February 20, 2025 19:12

FailureOr<linalg::ContractionDimensions>
getEncodingContractionDims(EncodingAttr encoding) {
auto indexingMapsAttr = encoding.getUserIndexingMaps();
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to replace this auto and a few below with concrete types, since the type is not obvious based on the context. But if you don't want to do that in this PR that's fine -- I realize it's mostly code motion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm happy to do so, since I touch the code. :)

Signed-off-by: hanhanW <[email protected]>
@hanhanW hanhanW enabled auto-merge (squash) February 20, 2025 20:23
@hanhanW hanhanW disabled auto-merge February 20, 2025 20:23
@hanhanW hanhanW enabled auto-merge (squash) February 20, 2025 20:24
@hanhanW hanhanW merged commit fb3523b into iree-org:main Feb 20, 2025
41 of 42 checks passed
@hanhanW hanhanW deleted the refactor-encoding-methods branch February 20, 2025 20:45
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