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

Several errors in triton-to-linalg pass #7

Closed
yuanfz98 opened this issue Sep 28, 2023 · 4 comments
Closed

Several errors in triton-to-linalg pass #7

yuanfz98 opened this issue Sep 28, 2023 · 4 comments

Comments

@yuanfz98
Copy link
Contributor

yuanfz98 commented Sep 28, 2023

Hello,

We are trying to convert from ttirs to linalg in nanoGPT model and have encountered some edge cases that triton-to-linalg pass failed to lower.

https://drive.google.com/drive/folders/1oBIJFhdL8TQO2PIF_PsUaMJRPVMPJ6G7?usp=sharing

Thank you for your help.

@manbearian
Copy link
Collaborator

manbearian commented Oct 2, 2023

Thank you for the report. it looks like there are a number of unfinished/incomplete items you're running into with this collection of inputs.

here's a log of all the failures:
bugs.log

I'm seeing the following unique failures:

  1. bad cast: decltype(auto) llvm::cast(const From&) [with To = mlir::MemRefType; From = mlir::Type]
  2. "Only asserts on scalars are currently supported"
  3. "Only support lowering reduction with body containing 1 maxf or addf."
  4. "Scalar load is currently not supported"
  5. failed to legalize operation 'tt.load'
  6. "other value used in masked load produced by unsupported instruction"
  7. "UNREACHABLE executed at src/triton/third_party/triton_shared/lib/Analysis/PtrAnalysis.cpp:377!

These all indicated not yet supported cases.

  • Errors 2, 3, 4, and 7 are known issues i recognize.
  • Error 6 looks like a missing case in mask-analysis.
  • I'm not sure what exactly the errors 1 and 5 and pointing at and further investigation is required to understand.

Of the known issues (2,3,4,7): 3, 4, and 7 are likely to be addressed soon (next updated perhaps, not sure yet of our schedule on this) while item 2 is not on our planned set of features right now.

@makslevental
Copy link
Contributor

@manbearian if you create a tracking issue (or whatever) for these (and others), I'm sure some of us adoring fans would be glad to pitch in (including appropriate RFC and design discussion and etc. of course). At least I know I would.

@manbearian
Copy link
Collaborator

@manbearian if you create a tracking issue (or whatever) for these (and others), I'm sure some of us adoring fans would be glad to pitch in (including appropriate RFC and design discussion and etc. of course). At least I know I would.

done!

From the items i created supporting additional reductions seem the most straightforward if you're looking for a nice on ramp :)

@nhat-nguyen
Copy link
Collaborator

Hello,

We are trying to convert from ttirs to linalg in nanoGPT model and have encountered some edge cases that triton-to-linalg pass failed to lower.

https://drive.google.com/drive/folders/1oBIJFhdL8TQO2PIF_PsUaMJRPVMPJ6G7?usp=sharing

Thank you for your help.

@yuanfz98 Thanks for sharing these! Would you mind also sharing us the triton code that produces these IR? It would help us a lot in understanding the usage of certain triton language features.

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

No branches or pull requests

4 participants