[Mlir-commits] [mlir] [MLIR][Arith] Add denormal attribute to binary/unary operations (PR #112700)
Mehdi Amini
llvmlistbot at llvm.org
Fri Dec 6 19:39:23 PST 2024
joker-eph wrote:
I have some concerns about the tradeoffs discussed here, it does not seem to me that this got explored and spelled out entirely.
In particular, we should start from thinking about the "charter" for arith: while it does not strictly limit itself to what LLVM supports, adding things that can't be expressed in LLVM likely deserve some sort of a higher bar (it can't be a "free for all" situation where we just append every possible thing that someone could imagine).
In the things that LLVM does not support, we have grandfathered the support for tensor type (which is now adopted and heavily used by OpenAI Triton for example) and we also support some MLIR-specific thing like multi-dimensional vector. But both of these can legalize to LLVM, it's not a divergence between arith and LLVM per-se.
I tend to see the situation a bit like it is handled when adding support for this kind of things into LLVM: there is a tradeoff between the added complexity (these need to be handled by transformations, canonicalizer, etc) and the added benefits (who are the users? Is it a widespread needed feature or something exotic? What are the lowering paths? What are the alternatives? Why not using target-specific intrinsics?). It is of course a case-by-case evaluation!
Discourse is likely a better place to discuss this, and this change likely deserved and RFC in the first place before landing (sorry I should have called this clearly initially, but I thought this would be discussed much more in practice).
Happy to book an Open Meeting slot to discuss this in a high-bandwidth setting if needed as well.
It may be more prudent to revert this in the meantime.
https://github.com/llvm/llvm-project/pull/112700
More information about the Mlir-commits
mailing list