MLIR Open Projects in GPU

Hello MLIR Community,
We are a group of 2/3 students interested to explore if there are any open projects in MLIR for a short duration of 1/2 months which create tooling, add support for GPU or use GPU and MLIR infrastructure.

I checked the open projects page, probably the project idea “GLSL to SPIR-V dialect frontend” seems more closer to what we are looking for, but it seems the scope of the project is too long, mentor(Lei Zhang) : @antiagainst correct me if wrong or if you can point more details.

We would be happy to discuss more if there are any possible ideas to work on in the space.

1 Like

Hi @Sameeranjoshi,

Thanks for the interest in the GPU side of things!

short duration of 1/2 months

To clarify, did you mean ‘1 or 2’ months or 0.5 months? If the answer is closer to 0.5 or 1 months, the GLSL to SPIR-V frontend seems almost certainly too large in scope to me. We have a number of outstanding mlir spir-v issues that are much more ‘self-contained’ and would be more suitable that are not listed in ‘Open Projects’, e.g.:

These are just a few I had saved in my queue, I suspect @antiagainst should be able to come up with more.

1 Like

Thank you for pointing.
0.5 to 1 month.

Probably something in GPU dialect, maybe ? Or possibly a small portion of an idea which could be a part of a bigger idea and could be later taken up for GSoC by someone to complete further.

Sorry for the late reply! Jakub introduced well in the above. Yeah, the GLSL frontend to SPIR-V dialect is much larger in scope; 0.5 to 1 month is unlikely to be sufficient.

Hi @Sameeranjoshi,

I talked with @antiagainst and have one more idea for a project that may interest you and suit 0.5-1 months of work for a couple of new MLIR contributors: improving folds and canonicalization patterns on the GPU codegen path.

Quite often we find code patterns that look complicated but could be simplified, making them more reliable and potentially improving performance. These are most noticeable in the SPIR-V codegen path, because we do not rely on LLVM’s instcombine to simplify the final code, but should also result in cleaner binaries for other GPU targets. Here are a few patches that I authored in this line of work:

The project would consist of identifying missing fold/canonicalizations based on existing SPIR-V tests and examples, deciding where to implement them (e.g., SPIR-V dialect, arith dialect, vector dialect), and implementing them. You would learn the following:

  • Running and debugging mlir-opt passes.
  • Finding simplification opportunities in SPIR-V code. This will also require some level of understanding of the generated GPU code.
  • MLIR pattern rewriting mechanisms (folds, RewritePattern, Declarative Rewrite Rules)
  • Testing with LIT and FileCheck.

This can be done by more than one person in parallel or in collaboration. If this sounds like something interesting to you, feel free to message me and I can set up a meeting to talk about this.

1 Like