triton-lang / triton

Development repository for the Triton language and compiler
https://triton-lang.org/
MIT License
13.09k stars 1.6k forks source link

Convert triton tutorial into LLVM IR and Documentations #2743

Open Jac1494 opened 10 months ago

Jac1494 commented 10 months ago

Hello Team,

  1. How to convert python implementation of triton code given at https://github.com/openai/triton/tree/main/python/tutorials to LLVM IR or other transformation.
  2. Do we have any language features document other than https://triton-lang.org/main/index.html ...?
  3. Do we have any documentation on how to add new ML operator in triton ...?

Thanks

huanglanzhiguan commented 10 months ago

Compilation of a kernel function consists of different stages, after the make_llir stage, you can dump the LLVM module, see https://github.com/openai/triton/blob/main/python/triton/compiler/backends/cuda.py#L173C15-L173C45