-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[AMD] Add error message for invalid MFMA tile k-dimension size #8301
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
Conversation
…t MFMA intrinsics.
…and failure to map scaled dot operation to double-rated MFMA.
third_party/amd/lib/TritonAMDGPUTransforms/AccelerateAMDMatmul.cpp
Outdated
Show resolved
Hide resolved
third_party/amd/lib/TritonAMDGPUTransforms/AccelerateAMDMatmul.cpp
Outdated
Show resolved
Hide resolved
third_party/amd/lib/TritonAMDGPUTransforms/AccelerateAMDMatmul.cpp
Outdated
Show resolved
Hide resolved
I have finalized my changes to the pass. However, I have been struggling a lot debugging a lit test failure. In the current version pushed to my fork, when I run the lit tests, I get the following error:
But, if I remove the expected remarks from the failing test, I get the following error.
My initial thoughts are that there is something to do with the MFMA instruction width parameter that is affecting this, but I cannot figure out how to separate the tests (if my reasoning is correct) so that I only expect the remarks at the right place. |
The error messages were generated with matrix-instruction-size=0 as expected, but matrix-instruction-size=16 shouldn't emit error messages. You can split the tests into two files. |
Lit tests are all passing but getting random unit test failures now.
|
Nevermind. I think this is only happening on my local machine. I am not sure why the CI failed previously. Waiting for the CI to run again, and if there is a failure, I will try to replicate on my machine, but I am a bit confused. |
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.
LGTM. Thanks @christopherpriebe for the clean up.
…n-lang#8301) This PR adds additional remarks to help with debugging dot operation variant mapping to MFMA and FMA intrinsics. ## Added Remarks - Each failed call of `chooseMfmaInstruction` will emit a remark informing that MFMA intrinsic selection failed with argument info. In particular, there is a remark for both the initial selection failure case and the further failure case where the k-dimension of the tile is not a multiple of the k-dimension of the intrinsic. - Will emit a generic remark if unable to map the `tt::DotOp` to a `V_MFMA_*_F8F6F4` intrinsic. - Will emit a generic remark if unable to map the `tt::DotOp` to any MFMA intrinsic. - Will emit a generic remark that a `tt::DotScaledOp` is being decomposed into a `tt::DotOp` with explicit scaling. This occurs if `tt::DotScaledOp` cannot be mapped to a `V_MFMA_*_F8F6F4` intrinsic. - Will emit a generic remark that a `tt::DotOp` is being mapped to an FMA intrinsic, which appears to never fail unless the operation is already mapped.
This PR adds additional remarks to help with debugging dot operation variant mapping to MFMA and FMA intrinsics.
Added Remarks
chooseMfmaInstruction
will emit a remark informing that MFMA intrinsic selection failed with argument info. In particular, there is a remark for both the initial selection failure case and the further failure case where the k-dimension of the tile is not a multiple of the k-dimension of the intrinsic.tt::DotOp
to aV_MFMA_*_F8F6F4
intrinsic.tt::DotOp
to any MFMA intrinsic.tt::DotScaledOp
is being decomposed into att::DotOp
with explicit scaling. This occurs iftt::DotScaledOp
cannot be mapped to aV_MFMA_*_F8F6F4
intrinsic.tt::DotOp
is being mapped to an FMA intrinsic, which appears to never fail unless the operation is already mapped.TODOs
Questions
PS
Thank you to all who have provided feedback. I am new to contributions to Triton, and this is my first PR.