[flang] [llvm] [flang][cuda][NFC] Fix naming of CUFGetAssociatedStream (PR #169838)
Valentin Clement バレンタイン クレメン via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 27 08:53:23 PST 2025
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/169838
None
>From 6273332ba247d18947d3c5231f2162fbfe457e2c Mon Sep 17 00:00:00 2001
From: Valentin Clement <clementval at gmail.com>
Date: Thu, 27 Nov 2025 08:52:48 -0800
Subject: [PATCH] [flang][cuda][NFC] Fix naming of CUFGetAssociatedStream
---
flang-rt/lib/cuda/allocator.cpp | 2 +-
flang-rt/unittests/Runtime/CUDA/Allocatable.cpp | 6 +++---
flang/include/flang/Runtime/CUDA/allocator.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/flang-rt/lib/cuda/allocator.cpp b/flang-rt/lib/cuda/allocator.cpp
index d2aa832883e65..dc3ce0ee1b590 100644
--- a/flang-rt/lib/cuda/allocator.cpp
+++ b/flang-rt/lib/cuda/allocator.cpp
@@ -132,7 +132,7 @@ void RTDEF(CUFRegisterAllocator)() {
kUnifiedAllocatorPos, {&CUFAllocUnified, CUFFreeUnified});
}
-cudaStream_t RTDECL(CUFAssociatedGetStream)(void *p) {
+cudaStream_t RTDECL(CUFGetAssociatedStream)(void *p) {
int pos = findAllocation(p);
if (pos >= 0) {
cudaStream_t stream = deviceAllocations[pos].stream;
diff --git a/flang-rt/unittests/Runtime/CUDA/Allocatable.cpp b/flang-rt/unittests/Runtime/CUDA/Allocatable.cpp
index 4e65326b31a62..f061c082cc614 100644
--- a/flang-rt/unittests/Runtime/CUDA/Allocatable.cpp
+++ b/flang-rt/unittests/Runtime/CUDA/Allocatable.cpp
@@ -142,7 +142,7 @@ TEST(AllocatableAsyncTest, StreamDeviceAllocatable) {
EXPECT_TRUE(a->IsAllocated());
cudaDeviceSynchronize();
EXPECT_EQ(cudaSuccess, cudaGetLastError());
- cudaStream_t s = RTDECL(CUFAssociatedGetStream)(a->raw().base_addr);
+ cudaStream_t s = RTDECL(CUFGetAssociatedStream)(a->raw().base_addr);
EXPECT_EQ(s, stream);
RTNAME(AllocatableDeallocate)
(*a, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__, __LINE__);
@@ -156,7 +156,7 @@ TEST(AllocatableAsyncTest, StreamDeviceAllocatable) {
EXPECT_TRUE(a->IsAllocated());
cudaDeviceSynchronize();
EXPECT_EQ(cudaSuccess, cudaGetLastError());
- cudaStream_t d = RTDECL(CUFAssociatedGetStream)(a->raw().base_addr);
+ cudaStream_t d = RTDECL(CUFGetAssociatedStream)(a->raw().base_addr);
EXPECT_EQ(d, defaultStream);
RTNAME(AllocatableDeallocate)
(*a, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__, __LINE__);
@@ -169,6 +169,6 @@ TEST(AllocatableAsyncTest, StreamDeviceAllocatable) {
EXPECT_TRUE(a->IsAllocated());
cudaDeviceSynchronize();
EXPECT_EQ(cudaSuccess, cudaGetLastError());
- cudaStream_t empty = RTDECL(CUFAssociatedGetStream)(a->raw().base_addr);
+ cudaStream_t empty = RTDECL(CUFGetAssociatedStream)(a->raw().base_addr);
EXPECT_EQ(empty, nullptr);
}
diff --git a/flang/include/flang/Runtime/CUDA/allocator.h b/flang/include/flang/Runtime/CUDA/allocator.h
index 4e38482a7de30..56176360296a9 100644
--- a/flang/include/flang/Runtime/CUDA/allocator.h
+++ b/flang/include/flang/Runtime/CUDA/allocator.h
@@ -20,7 +20,7 @@ namespace Fortran::runtime::cuda {
extern "C" {
void RTDECL(CUFRegisterAllocator)();
-cudaStream_t RTDECL(CUFAssociatedGetStream)(void *);
+cudaStream_t RTDECL(CUFGetAssociatedStream)(void *);
}
void *CUFAllocPinned(std::size_t, std::int64_t *);
More information about the llvm-commits
mailing list