[flang-commits] [flang] [flang][cuda] Fix memory side effects on cuf.data_transfer op (PR #92928)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Tue May 21 08:55:36 PDT 2024
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/92928
The memory side effects on the `cuf.data_transfer` operation were swapped between the src and dst operands. We read from source and write to destination not the opposite.
>From 922834f681a9f17b08fc7b19beea85140034cb83 Mon Sep 17 00:00:00 2001
From: Valentin Clement <clementval at gmail.com>
Date: Tue, 21 May 2024 08:53:57 -0700
Subject: [PATCH] [flang][cuda] Fix side effects on cuf.data_transfer op
---
flang/include/flang/Optimizer/Dialect/CUF/CUFOps.td | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/flang/include/flang/Optimizer/Dialect/CUF/CUFOps.td b/flang/include/flang/Optimizer/Dialect/CUF/CUFOps.td
index 72157bce4f768..1c98b4131a139 100644
--- a/flang/include/flang/Optimizer/Dialect/CUF/CUFOps.td
+++ b/flang/include/flang/Optimizer/Dialect/CUF/CUFOps.td
@@ -154,8 +154,8 @@ def cuf_DataTransferOp : cuf_Op<"data_transfer", []> {
```
}];
- let arguments = (ins Arg<AnyReferenceLike, "", [MemWrite]>:$src,
- Arg<AnyReferenceLike, "", [MemRead]>:$dst,
+ let arguments = (ins Arg<AnyReferenceLike, "", [MemRead]>:$src,
+ Arg<AnyReferenceLike, "", [MemWrite]>:$dst,
cuf_DataTransferKindAttr:$transfer_kind);
let assemblyFormat = [{
More information about the flang-commits
mailing list