[Mlir-commits] [mlir] [MLIR] Preserve Encoding During TensorOp Creation (PR #80871)
Mehdi Amini
llvmlistbot at llvm.org
Thu Feb 8 22:19:59 PST 2024
================
@@ -1622,7 +1623,20 @@ CollapseShapeOp::inferCollapsedType(RankedTensorType type,
currentDim += dim;
}
- return RankedTensorType::get(newShape, type.getElementType());
+ auto encoding = type.getEncoding();
+ if (auto v = encoding.dyn_cast_or_null<VerifiableTensorEncoding>()) {
----------------
joker-eph wrote:
Seems to me that the conservative option is that if the interface isn't implemented, the encoding should no be propagated.
https://github.com/llvm/llvm-project/pull/80871
More information about the Mlir-commits
mailing list