3 ms·
If you are a Python dev, why not just use Triton?
by nitrogen99 2y ago
If you are a Python dev, why not just use Triton?
- saagarjha 2y agoTriton is somewhat limited in what it supports, and it’s not really Python either.
- t55 2y agoTriton sits between CUDA and PyTorch and is built to work smoothly within the PyTorch ecosystem. In CUDA, on the other hand, you can directly manipulate warp-level primitives and fine-tune memory prefetching to reduce latency in eg. attention algorithms, a level of control that Triton and PyTorch don't offer AFAIK.
- pjmlp 2y agoMLIR extensions for Python do though, as far as I could tell from LLVM developer meeting.
- 6gvONxR4sf7o 2y agoMLIR is one of those things everyone seems to use, but nobody seems to want to write solid introductory docs for :( I've been curious for a few years now to get into MLIR, but I don't know compilers or LLVM, and all the docs I've found seem to assume knowledge of one or the other. (yes this is a plea for someone to write an 'intro to compilers' using MLIR)
- pjmlp 2y agoNot sure if you will be able to follow along, but here it is what I was talking about, "PyDSL: A MLIR DSL for Python developers" https://www.youtube.com/watch?v=iYLxgTRe8TU https://www.youtube.com/watch?v=iYLxgTRe8TU "PyDSL, a subset of Python for constructing affine & transform dialects" https://www.youtube.com/watch?v=nmtHeRkl850 https://www.youtube.com/watch?v=nmtHeRkl850 And MLIR channel, https://www.youtube.com/@MLIRCompiler https://www.youtube.com/@MLIRCompiler
- pavelstoev 2y agoor use Hidet compiler (open source)
- t55 2y agonever heard of Hidet before; for when/what would I use it over CUDA/Triton/Pytorch?
- pavelstoev 2y agoIt is written in Python itself and emits efficient CUDA code. This way, you can understand what is going on. The current focus is on inference, but hopefully, training workloads will be supported soon. https://github.com/hidet-org/hidet https://github.com/hidet-org/hidet