[Mlir-commits] [mlir] [mlir][bufferization] Introduce castBufferTypeFn hook and API (PR #205080)

Andrei Golubev llvmlistbot at llvm.org
Mon Jun 22 04:16:02 PDT 2026


================
@@ -100,6 +100,20 @@ LogicalResult mlir::bufferization::foldToBufferToTensorPair(
     return success();
   }
 
+  if (!llvm::isa<BaseMemRefType>(srcType) ||
----------------
andrey-golubev wrote:

i am a bit uncertain what to do here: both generally and when user types are involved.
in theory, if cast failed, we can fall back to alloc + copy? but in some sense this is something that the users can do via cast hook itself.

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


More information about the Mlir-commits mailing list