From ae84717d11bf89e69eb9fd74f3ddd32af51192d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Clement=20=28=E3=83=90=E3=83=AC=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=B3=20=E3=82=AF=E3=83=AC=E3=83=A1?= =?UTF-8?q?=E3=83=B3=29?= Date: Fri, 28 Feb 2025 14:52:33 -0800 Subject: [PATCH] [flang][cuda] Fix descriptor sync in data transfer (#129333) The destination descriptor on the device needs to be sync with the destination descriptor on the host, not the src one. --- flang-rt/lib/cuda/memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang-rt/lib/cuda/memory.cpp b/flang-rt/lib/cuda/memory.cpp index 7ead0dd35e1d..1ebe5059b941 100644 --- a/flang-rt/lib/cuda/memory.cpp +++ b/flang-rt/lib/cuda/memory.cpp @@ -147,7 +147,7 @@ void RTDECL(CUFDataTransferGlobalDescDesc)(Descriptor *dstDesc, void *deviceAddr{ RTNAME(CUFGetDeviceAddress)((void *)dstDesc, sourceFile, sourceLine)}; RTNAME(CUFDescriptorSync) - ((Descriptor *)deviceAddr, srcDesc, sourceFile, sourceLine); + ((Descriptor *)deviceAddr, dstDesc, sourceFile, sourceLine); } } }