Thread with 13 posts
jump to expanded postgod… MLIR is so cool. i love this IR. it can do so much. it's like “yo dawg i heard u liked IRs so i put an IR in your IR so you can compile while you compile” and this is what makes it awesome
it's exciting enough as someone who's worked with non-meta IRs like LLVM and SPIR-V for half a decade that i'm super tempted to write a toy compiler for something silly just to have an excuse to play around with it more
there are so many problems when dealing with LLVM IR and SPIR-V and [similar IR] that eternally frustrated me in compiler work and that could probably be practically solved with MLIR dialects
it's like XML for IRs. wait no why are you suddenly losing interest I promise it's good actually please—
wait since i'm also a musician these days will there be some ambiguity of what IR means. haha. well, i'm not a guitar girl (yet?)
@hikari It has some very cool ideas. However, as someone who tried to use it without LLVM (StableHLO for model serialization), I think a lot of it is in practice seriously underspecified.
Especially the bitcode format which only has very incomplete and outdated documentation, but also some operations are not documented at all.
ONNX has its disadvantages and missing features, but I actually like how well documented and standardized the parsing is, while providing a similar programming model.
@hikari That of course assumes ML usecases. MLIR is more general though I'm not sure I've seen anybody use it for something else?
@bas i'd really like to try using it for non-ML stuff! i kinda dismissed it out of hand the first time i saw it because i wasn't interested in ML stuff at the time, but having learned a bit more about it now, i can appreciate how it might have general applications.
re: bitcode, i'm not surprised, the llvm bitcode is also allegedly a nightmare
@bas re: ONNX, i happen to know quite a bit about it now. the fact it's just protobufs does provide reliable serialisation and deserialisation, it is indeed a nice feature
@bas oh right the underspecified thing is another thing that applies to LLVM IR too. it's actually infuriating how badly documented that IR is. for MLIR, i don't know, i'm more optimistic about it because of its meta-IR status. i think it'll end up better-documented eventually out of necessity
@hikari yeah, given it's primary usage seems to be machine learning, it is surprising to learn it stand for multi-level IR 🙃
@bas i appreciate that it doesn't stand for machine learning. it's actually a very fitting name