-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix AxisInfo rank mismatch for poison tensor pointers #8824
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
Signed-off-by: Witold Dziurdz <[email protected]>
|
That's something I'm not sure we still want to support cc @ThomasRaoux |
|
In the current flow pointer of tensor are deprecated and they get lowered early in the TTIR flow, so I don't think we support in this pass and we shouldn't add code related to it. |
|
@ThomasRaoux Could you clarify where exactly pointers “get lowered early in the TTIR flow”? I’m fixing the issue this way because UnrealizedConversionCastOpAxisInfoVisitor still handles pointers(ref to code below), and with this fix the same logic also appears in PoisonOpAxisInfoVisitor. This is mismatching. triton/lib/Analysis/AxisInfo.cpp Lines 193 to 211 in 1819e09
And this code handles pointers in the same way. triton/lib/Analysis/AxisInfo.cpp Lines 1168 to 1174 in 1819e09
|
I think some legacy code is just completely removed. Can you share with us the frontend code that leads to the IR you proposed to fix? |
this pass should remove all the pointer ot tensors: |
|
@ThomasRaoux thank you for your help. I’m closing this PR now. |
New contributor declaration
[x ] I am not making a trivial change, such as fixing a typo in a comment.
[x ] I have written a PR description following these
rules.
[ x] I have run
pre-commit run --from-ref origin/main --to-ref HEAD.Select one of the following.
/testforlittests/unittestfor C++ tests/python/testfor end-to-end testsFILL THIS IN.Select one of the following.
littests.littests 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.)
Description:
PoisonOpAxisInfoVisitor incorrectly returns rank = 1 for ub.poison operations that produce pointer-to-tensor types such as !tt.ptr<tensor<128x64xf16>>.
This incorrect rank then propagates through unrealized_conversion_cast operations generated during lowering, which leads to assertion failures in AxisInfo::join().
More details in issue #8823.
This PR also fixes #8823.