When propagating tensor.unpack ops through elementwise generics, a new
output tensor is needed if the element type of the input differs from
that of the output in the elementwise op.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp | ||
---|---|---|
441 | It's not shorter but perhaps this looks a bit cleaner? Alternatively we can try to infer the element type from the body of the generic (not sure exactly how to write that so it would be better than this). |
Comment Actions
mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp | ||
---|---|---|
441 | Thanks! Just found getElementTypeOrSelf. You can pass to it the result Value. |
mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp | ||
---|---|---|
441 | Perfect, thanks for the tip! |
Do we have a shorter way to get the element type from a generic?