[flang-commits] [flang] [flang][cuda] Add restriction on implicit data transfer (PR #87720)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Thu Apr 4 16:21:46 PDT 2024


================
@@ -413,4 +415,18 @@ void CUDAChecker::Enter(const parser::CUFKernelDoConstruct &x) {
   }
 }
 
+void CUDAChecker::Enter(const parser::AssignmentStmt &x) {
+  const evaluate::Assignment *assign = semantics::GetAssignment(x);
+  unsigned nbLhs = evaluate::GetNbOfCUDASymbols(assign->lhs);
+  unsigned nbRhs = evaluate::GetNbOfCUDASymbols(assign->rhs);
+  auto lhsLoc{std::get<parser::Variable>(x.t).GetSource()};
+
+  // device to host transfer with more than one device object on the rhs is not
----------------
clementval wrote:

This is not specified but I guess we can allow it since it will issue a single implicit data transfer. 

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


More information about the flang-commits mailing list