[Mlir-commits] [mlir] [mlir][tosa] Add support for MXFP in SLICE (PR #220557)
Yuvaraj Venkatesh
llvmlistbot at llvm.org
Wed Sep 16 03:14:40 PDT 2026
================
@@ -2764,6 +2764,22 @@ LogicalResult tosa::SliceOp::verify() {
<< startValues << "]";
}
+ // ERROR_IF(is_block_scale<in_out_t>() && start[rank(shape1) - 1] %
+ // get_innermost_block_size<in_out_t>() != 0);
+ const auto tensorType = llvm::cast<ShapedType>(input.getType());
+ const BlockScaledType elemType = llvm::dyn_cast<BlockScaledType>(tensorType);
+ if (elemType) {
+ const auto startBlock = startValues.back();
+ const auto scaleBlock =
+ BlockShapeAttr::getBlockShapeValue(elemType.getBlockShape());
+ if (startBlock % scaleBlock != 0) {
+ return emitOpError(
+ "expected start innermost block size to match data type "
----------------
Yuvaraj-Venkatesh wrote:
Test added.
https://github.com/llvm/llvm-project/pull/220557
More information about the Mlir-commits
mailing list