[Mlir-commits] [mlir] [mlir][Linalg] Promote lhs/rhs when vectorizing conv1D as outerproduct (PR #179883)
Han-Chung Wang
llvmlistbot at llvm.org
Fri Feb 6 10:49:25 PST 2026
================
@@ -3848,8 +3848,12 @@ struct Conv1DGenerator
const int64_t srcWidth = srcElementType.getIntOrFloatBitWidth();
const int64_t dstWidth = dstElementType.getIntOrFloatBitWidth();
- const Type dstType =
- cast<ShapedType>(val.getType()).cloneWith(std::nullopt, dstElementType);
+ // Handle both shaped as well as scalar types.
+ Type dstType;
+ if (auto shapedType = dyn_cast<ShapedType>(val.getType()))
+ dstType = shapedType.cloneWith(std::nullopt, dstElementType);
+ else
+ dstType = dstElementType;
----------------
hanhanW wrote:
I see, thanks
https://github.com/llvm/llvm-project/pull/179883
More information about the Mlir-commits
mailing list