-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Bug]: failed to legalize operation 'arith.cmpi' marked as erased #64
Comments
@nhat-nguyen
A bitcast of tt.ptr can be moved before addptr. In PtrAnalysis I propose to add a "Type srcElemType" in PtrState struct to represent type information. We then propagate the type Info during recursion, hoping that in the end we will get a "final consistant" type for AddPtrConverter. |
Have you solved this issue? |
@jingchangshi We're in the process of testing a rewrite for the Pointer Analysis pass. Most of the logic is kept the same, so you will probably also encounter the same issue. However, the passes are broken down into modular pieces which might make some of the suggestions here such as making a canonicalization pass easier. In the mean time you can test out with |
I'm still working on the unrefactored version to check if the fix works. Then I'll move to the latest version.
Just as @yuanfz98 said,
|
@nhat-nguyen, I wanted to follow up on this issue. I’m encountering multiple “failed to legalize operation tt.XYZ marked as erased” errors while lowering Triton kernels generated by Torch inductors to Linalg. I tried the |
@fhossein-quic More torch-inductor support is definitely on our radar as there have been lots of interest. A lot of these issues are because we couldn't analyze the pointer arithmetic sequence generated by torch-inductor. There are some work in torch from the Meta team to simplify these pointer arithmetic: pytorch/pytorch#125077, but in general, we need a fallback mode in our pointer analysis pass to support all cases. In any case, if you could share your step-by-step reproduce along with the torch programs that you want to compile, that would be great. Thank you! |
Thank you @nhat-nguyen for your response, You may reproduce the issue by running I also attached the triton kernel generated by the inductor JIC. TTIR: |
Triton python code
Triton IR
Crash log
Additional information
No response
The text was updated successfully, but these errors were encountered: