Ops from the Math dialect use fastmath attributes defined in Arith.
Therefore Math dialect must declare a dependency on Arith for proper
construction and parsing.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/Dialect/Math/dependent-dialect.mlir | ||
---|---|---|
2 | Can you name this depends-on-arith.mlir or similar? It could be easy for someone to add additional checks on other dialects that might then mask testing that math depends on arith by one of the other dialects loading the dependency |
I wonder if fast math shouldn't be a builtin (or its own dialect): seems like arith went as far as redefining it to avoid using the one from the llvm dialect?
I wonder if fast math shouldn't be a builtin (or its own dialect): seems like arith went as far as redefining it to avoid using the one from the llvm dialect?
On one hand, this doesn't sound sufficiently "fundamental IR" like bulitin.module to be a builtin. On the other hand, floating point types are builtin, and one can argue fastmath relates to them. Let me surface this.
Thank you for the changes, @ftynse.
There was previous discussion about the dependency: https://discourse.llvm.org/t/rfc-fastmath-flags-support-in-mlir-arith-dialect/6049/22 and https://discourse.llvm.org/t/rfc-fastmath-flags-support-in-mlir-arith-dialect/6049/24
@vzakhari do you mind citing this in the new thread https://discourse.llvm.org/t/place-for-fastmath-attributes/69933 ?
Can you name this depends-on-arith.mlir or similar? It could be easy for someone to add additional checks on other dialects that might then mask testing that math depends on arith by one of the other dialects loading the dependency