Skip to content

Commit e3a28c0

Browse files
authored
[flang][cuda][NFC] Fix naming of CUFGetAssociatedStream (#169838)
1 parent 620f1f1 commit e3a28c0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

flang-rt/lib/cuda/allocator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void RTDEF(CUFRegisterAllocator)() {
132132
kUnifiedAllocatorPos, {&CUFAllocUnified, CUFFreeUnified});
133133
}
134134

135-
cudaStream_t RTDECL(CUFAssociatedGetStream)(void *p) {
135+
cudaStream_t RTDECL(CUFGetAssociatedStream)(void *p) {
136136
int pos = findAllocation(p);
137137
if (pos >= 0) {
138138
cudaStream_t stream = deviceAllocations[pos].stream;

flang-rt/unittests/Runtime/CUDA/Allocatable.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ TEST(AllocatableAsyncTest, StreamDeviceAllocatable) {
142142
EXPECT_TRUE(a->IsAllocated());
143143
cudaDeviceSynchronize();
144144
EXPECT_EQ(cudaSuccess, cudaGetLastError());
145-
cudaStream_t s = RTDECL(CUFAssociatedGetStream)(a->raw().base_addr);
145+
cudaStream_t s = RTDECL(CUFGetAssociatedStream)(a->raw().base_addr);
146146
EXPECT_EQ(s, stream);
147147
RTNAME(AllocatableDeallocate)
148148
(*a, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__, __LINE__);
@@ -156,7 +156,7 @@ TEST(AllocatableAsyncTest, StreamDeviceAllocatable) {
156156
EXPECT_TRUE(a->IsAllocated());
157157
cudaDeviceSynchronize();
158158
EXPECT_EQ(cudaSuccess, cudaGetLastError());
159-
cudaStream_t d = RTDECL(CUFAssociatedGetStream)(a->raw().base_addr);
159+
cudaStream_t d = RTDECL(CUFGetAssociatedStream)(a->raw().base_addr);
160160
EXPECT_EQ(d, defaultStream);
161161
RTNAME(AllocatableDeallocate)
162162
(*a, /*hasStat=*/false, /*errMsg=*/nullptr, __FILE__, __LINE__);
@@ -169,6 +169,6 @@ TEST(AllocatableAsyncTest, StreamDeviceAllocatable) {
169169
EXPECT_TRUE(a->IsAllocated());
170170
cudaDeviceSynchronize();
171171
EXPECT_EQ(cudaSuccess, cudaGetLastError());
172-
cudaStream_t empty = RTDECL(CUFAssociatedGetStream)(a->raw().base_addr);
172+
cudaStream_t empty = RTDECL(CUFGetAssociatedStream)(a->raw().base_addr);
173173
EXPECT_EQ(empty, nullptr);
174174
}

flang/include/flang/Runtime/CUDA/allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Fortran::runtime::cuda {
2020
extern "C" {
2121

2222
void RTDECL(CUFRegisterAllocator)();
23-
cudaStream_t RTDECL(CUFAssociatedGetStream)(void *);
23+
cudaStream_t RTDECL(CUFGetAssociatedStream)(void *);
2424
}
2525

2626
void *CUFAllocPinned(std::size_t, std::int64_t *);

0 commit comments

Comments
 (0)