3 ms·
This is super cool! Thank you for sharing. I should probably try LLVM or some other IR like MLIR. I wanted to do MLIR originally but the Python bindings are a l
by tekknolagi 3y ago
This is super cool! Thank you for sharing. I should probably try LLVM or some other IR like MLIR. I wanted to do MLIR originally but the Python bindings are a little unstable right now. Any other IR (not C) might allow me to express the intended semantics better than C does.
- mathisfun123 3y ago> I wanted to do MLIR originally but the Python bindings are a little unstable right now. Hmmm why do you think so? There's been one (small) breaking change in the last 6 months (and it came with a simple upgrade recommendation). (If it's not obvious, I contributedl to the python bindings but I would prefer to remain anon).
- tekknolagi 3y agoThe docs say not to use them :) I didn't try it out
- mathisfun123 3y agoreally? where does it say that? https://mlir.llvm.org/docs/Bindings/Python/ https://mlir.llvm.org/docs/Bindings/Python/ is it the "not enabled by default" that scares you off? i honestly don't even know what that's supposed to mean since there's no default anything since there's no official binary build of mlir currently being released. anyway i'm not trying to be confrontational or adversarial - i was more asking in a "how can i help you accomplish what you want" kind of tone.
- tekknolagi 3y agoI am not reading it as confrontational, no worries. I just wanted to use something that was either already available or easily installable. If it says "off by default" I just wonder what that means or what hoops I will have to jump through. But if you say it is as simple as installing a PyPI package or something, great! I will give it a go.
- deleted 3y ago[deleted]
- boywitharupee 3y agoIf you could translate your computations to MLIR then you have the ability to lift your instructions to various dialects. For ex, you can lift to the 'metal' dialect or 'nvgpu' dialect. There's also an 'affine' dialect, which implements a small set of polyhedral transformations and works on memrefs like most compilers do. However, it seems that the 'affine' dialect is not as actively used these days. Most optimizations are now performed on tensors, but depending on your use case, it may still make sense.
- tekknolagi 3y agoI will probably look into it again in the future. It seems like a very useful IR