[Mlir-commits] [mlir] [mlir][linalg] Add 'compute_element_type' to linalg.elementwise op. (PR #190566)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Apr 9 09:49:32 PDT 2026


MaheshRavishankar wrote:

> > ns". We have agreed last year that `output_type == compute_type`, now we just need to make that work.
> 
> OK let me interpret what you mean as 'we just need to make that work.' is bit cryptic. Itemizing so there is clarity in the answer and what we agree :
> 
> 1. I think you mean that if input is f16 and output is f32 then  'current implementation' is broken and I should fix that.
> 2. What if input is f32 and output is f16?
> 3. when input and output are f16 but compute needs to happen in f32 --> we dont care and not support that

For elementwise operations the situation is a bit different from operations that have reductions. So lets limit our discussions to elementwise operations for now. I am finding hard to place the usage expectations here. Some questions for me that might or might not be relevant
1. What happens with multiple results that might be of different element type. How does `compute_type` map to the result in those cases? (Answer might be not a relevant case)
2. How do we know what the semantics of the extension is? If you need to do signed extensions or unsigned extensions?


https://github.com/llvm/llvm-project/pull/190566


More information about the Mlir-commits mailing list