[Mlir-commits] [mlir] [mlir][tosa] Change Transpose perms operand to attribute (PR #128115)

Tai Ly llvmlistbot at llvm.org
Mon Feb 24 13:08:37 PST 2025


================
@@ -1467,75 +1436,61 @@ LogicalResult tosa::TransposeOp::inferReturnTypeComponents(
 
 LogicalResult tosa::TransposeOp::verify() {
   TensorType inputType = getInput1().getType();
-  TensorType permType = getPerms().getType();
   TensorType outputType = getOutput().getType();
+  const llvm::ArrayRef<int32_t> constantPerms = getPerms();
 
-  if (permType.hasRank() && permType.getRank() != 1)
-    return emitOpError()
-           << "expected permutation tensor to be rank 1 but got rank "
-           << permType.getRank();
-  if (inputType.hasRank() && permType.hasRank())
-    if (!permType.isDynamicDim(0) &&
-        permType.getDimSize(0) != inputType.getRank())
-      return emitOpError() << "expected permutation tensor dim 0 to have size "
+  if (inputType.hasRank())
----------------
Tai78641 wrote:

done

https://github.com/llvm/llvm-project/pull/128115


More information about the Mlir-commits mailing list