Iwasawa 🌟 (one hikari of too many)

god… 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

2 replies →
2 replies

Bas Nieuwenhuizen

(replying to Iwasawa 🌟 (one hikari of too many))

@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.

Bas Nieuwenhuizen

(replying to Bas Nieuwenhuizen)

@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?

Iwasawa 🌟 (one hikari of too many)

(replying to Bas Nieuwenhuizen)

@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

1 replies →
1 replies

Bas Nieuwenhuizen

(replying to Iwasawa 🌟 (one hikari of too many))

@hikari yeah, given it's primary usage seems to be machine learning, it is surprising to learn it stand for multi-level IR 🙃

Iwasawa 🌟 (one hikari of too many)

(replying to Bas Nieuwenhuizen)

@bas i appreciate that it doesn't stand for machine learning. it's actually a very fitting name

Iwasawa 🌟 (one hikari of too many)

(replying to Iwasawa 🌟 (one hikari of too many))

@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

Iwasawa 🌟 (one hikari of too many)

(replying to Iwasawa 🌟 (one hikari of too many))

@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


Saagar Jha

(replying to Iwasawa 🌟 (one hikari of too many))
@hikari Chris Lattner is that you

Iwasawa 🌟 (one hikari of too many)

(replying to Iwasawa 🌟 (one hikari of too many))

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

Iwasawa 🌟 (one hikari of too many)

(replying to Iwasawa 🌟 (one hikari of too many))

‪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‬

Iwasawa 🌟 (one hikari of too many)

(replying to Iwasawa 🌟 (one hikari of too many))

‪it's like XML for IRs. wait no why are you suddenly losing interest I promise it's good actually please—‬

Iwasawa 🌟 (one hikari of too many)

(replying to Iwasawa 🌟 (one hikari of too many))

‪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?)‬