During elementwise fusion the fillOp's value was directly
referred without casting which can create mismatching dtypes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@mravishankar I have copied the cast funtion from https://github.com/llvm/llvm-project/blob/254bf678d49185026d1b17c6345106f9f3fe58b2/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp#L423 do let me know if there is a better way.
| mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp | ||
|---|---|---|
| 1730 | Do you mind moving this into include/mlir/Dialect/Arith/Utils/Utils.h and implementation into lib/Dialect/Arith/Utils/Utils.cpp? | |
| mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp | ||
|---|---|---|
| 1730 | Done, PTAL. | |
| mlir/lib/Dialect/Arith/Utils/Utils.cpp | ||
|---|---|---|
| 83 | Can you remove the cast function and use this helper instead: | |
| mlir/lib/Dialect/Arith/Utils/Utils.cpp | ||
|---|---|---|
| 90 | for linalg ops the type would be signless, therefore this is probably not the right way to decide between signed and unsigned cast | |
Can you remove the cast function and use this helper instead:
https://github.com/llvm/llvm-project/blob/254bf678d49185026d1b17c6345106f9f3fe58b2/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp#L423