-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[AMD] Improve shared layout for Wmma's operands #7319
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
[AMD] Improve shared layout for Wmma's operands #7319
Conversation
} else { | ||
// Do not swizzle in case k dimension is not innermost. | ||
// In this case accesses will go in different banks even without swizzling. | ||
int kDimIndex = dotOpEnc.getOpIdx() == 0 ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are here can we do something like MFMA layout in the above to use a helper function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean put the logic into some helper function like composeSharedLayoutForOperand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refractored, also add @zhanglx13 @joviliast to review
Swizzling is always disabled for Wmma's B operand, it should be disabled only when k dimension is not contiguous. Both vectorSize, perPhase and maxPhase are now determined using a heuristic approach.
Swizzling is always disabled for Wmma's B operand, it should be disabled only when k dimension is not contiguous.
Both vectorSize, perPhase and maxPhase are now determined using a heuristic approach.
New contributor declaration
I am not making a trivial change, such as fixing a typo in a comment.
I have written a PR description following these
rules.
I have run
pre-commit run --from-ref origin/main --to-ref HEAD
.Select one of the following.
/test
forlit
tests/unittest
for C++ tests/python/test
for end-to-end testsSelect one of the following.
lit
tests.lit
tests I have added follow these best practices,including the "tests should be minimal" section. (Usually running Python code
and using the instructions it generates is not minimal.)