[flang-commits] [flang] [flang][cuda] Lower simple host to device data transfer (PR #85960)
via flang-commits
flang-commits at lists.llvm.org
Thu Mar 21 01:38:21 PDT 2024
================
@@ -3772,9 +3797,13 @@ class FirConverter : public Fortran::lower::AbstractConverter {
Fortran::lower::StatementContext localStmtCtx;
hlfir::Entity rhs = evaluateRhs(localStmtCtx);
hlfir::Entity lhs = evaluateLhs(localStmtCtx);
- builder.create<hlfir::AssignOp>(loc, rhs, lhs,
- isWholeAllocatableAssignment,
- keepLhsLengthInAllocatableAssignment);
+ if (lhsIsDevice || rhsIsDevice) {
+ genCUDADataTransfer(builder, loc, lhsIsDevice, lhs, rhsIsDevice, rhs);
----------------
jeanPerier wrote:
Is it possible to have "non trivial" intrinsic assignments used in cuda transfer contexts: character assignments (require truncating/pading), derived type with allocatable components or derived type component with user defined assignments.
Is the fir.cuda_transfer representing/implementing these assignment aspects?
https://github.com/llvm/llvm-project/pull/85960
More information about the flang-commits
mailing list