[Mlir-commits] [mlir] [mlir][vector] Extend vector.{insert|extract}_strided_slice (PR #79052)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Jan 24 01:17:37 PST 2024
================
@@ -2857,6 +2857,27 @@ LogicalResult InsertStridedSliceOp::verify() {
/*halfOpen=*/false, /*min=*/1)))
return failure();
+ unsigned idx = 0;
+ unsigned rankDiff = destShape.size() - sourceShape.size();
+ for (unsigned ub = sourceShape.size(); idx < ub; ++idx) {
+ if (sourceVectorType.getScalableDims()[idx] !=
+ destVectorType.getScalableDims()[idx + rankDiff]) {
+ return emitOpError("mismatching scalable flags (at source vector idx=")
----------------
banach-space wrote:
"scalable dim" is a bit ambiguous in this context though. One might read "4" as "scalable dim" in `vector<2x[4]x6xi32>`, but that's not what we want to check here.
Instead, we need to check the "base size" (i.e. "4" in "[4]") and "scalable flag" separately (i.e. whether it's a plain "4" or "[4]").
It is a bit of an implementation detail, but it's also intended for compiler devs rather than end users, so should be OK?
https://github.com/llvm/llvm-project/pull/79052
More information about the Mlir-commits
mailing list