[Mlir-commits] [mlir] Fix bug in gpu.memcpy lowering for dynamically shaped operands. (PR #128820)

Matthias Springer llvmlistbot at llvm.org
Wed Feb 26 00:00:10 PST 2025


================
@@ -17,3 +17,23 @@ module attributes {gpu.container_module} {
     return
   }
 }
+
+// -----
+
+module attributes {gpu.container_module} {
+
+  // CHECK: func @dynamic
+  func.func @dynamic(%dst : memref<?x?xf32, 1>, %src : memref<?x?xf32>) {
+    // CHECK: %[[T0:.*]] = llvm.call @mgpuStreamCreate
+    %t0 = gpu.wait async
+    %t1 = gpu.memcpy async [%t0] %dst, %src : memref<?x?xf32, 1>, memref<?x?xf32>
----------------
matthias-springer wrote:

Can you also improve the verifier to reject memrefs that do not have identity layout?

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


More information about the Mlir-commits mailing list