[flang-commits] [flang] [llvm] [flang][cuda] Use a reference for asyncObject (PR #138186)

Zhen Wang via flang-commits flang-commits at lists.llvm.org
Thu May 1 14:17:49 PDT 2025


================
@@ -82,19 +83,22 @@ TEST(AllocatableCUFTest, StreamDeviceAllocatable) {
   RTNAME(AllocatableSetBounds)(*c, 0, 1, 100);
 
   RTNAME(AllocatableAllocate)
-  (*a, 1, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__, __LINE__);
+  (*a, /*asyncObject=*/nullptr, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__,
+      __LINE__);
   EXPECT_TRUE(a->IsAllocated());
   cudaDeviceSynchronize();
   EXPECT_EQ(cudaSuccess, cudaGetLastError());
 
   RTNAME(AllocatableAllocate)
-  (*b, 1, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__, __LINE__);
+  (*b, /*asyncObject=*/nullptr, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__,
+      __LINE__);
   EXPECT_TRUE(b->IsAllocated());
   cudaDeviceSynchronize();
   EXPECT_EQ(cudaSuccess, cudaGetLastError());
 
   RTNAME(AllocatableAllocate)
-  (*c, 1, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__, __LINE__);
+  (*c, /*asyncObject=*/nullptr, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__,
----------------
wangzpgi wrote:

Question: `asyncId=-1` translates to `asyncObject=nullptr`. Here `asyncId=1` also translates to `asyncObject=nullptr`?

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


More information about the flang-commits mailing list