[flang-commits] [flang] [flang][cuda] Lower simple host to device data transfer (PR #85960)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Thu Mar 21 10:18:58 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);
----------------
clementval wrote:
The spec is not clear on what happens with the assignment and if it follow the standard semantic while doing the transfer.
I'll make a survey of what is currently implemented in compilers implementing cuf.
In the mean time I can error out with a TODO for all the non trivial case.
https://github.com/llvm/llvm-project/pull/85960
More information about the flang-commits
mailing list