[RFC] Op explosion in Linalg

Apologies, it was not my intention to imply that.

I was talking about the “disembodied problem”, not the people who created it, which for a big chunk of it, was myself. I know why we’re all adding to it, but there are enough voices calling stop right now, and this is what this RFC is about.

Not to lay blame, but to find a common solution and march towards it.

This is a curse more than a solution, because your partitioning will be specific to this one op, and the other op, and the other. Every pattern becomes a large switch/case statement.

If we’re lucky. Having done this before, it can take long to weed out the odd pattern that you missed because it was in the else branch, or worse, someone else adds another case and your else doesn’t apply anymore and you have silent code generation failures.

That’s a worthwhile goal, but here we’re cleaning up torch, hlo, onnx by just moving the “dirt” from those projects into linalg by adding all of their special variations.

1 Like