diff options
| author | Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> | 2025-09-09 14:20:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-09 14:20:19 -0700 |
| commit | 3e9802159b064988cff9aa3655f2a68a463711a3 (patch) | |
| tree | 36d5f1f6862dcb795a773b1a0f10413ac53f6d89 /flang-rt | |
| parent | 69511ae80480815385abef7dfa095a8bd2961144 (diff) | |
[flang][cuda] Remove set_allocator_idx operation (#157747)
The allocator index is set from the component genre #157731 . There is
no more need of an operation to set it at a later point.
Diffstat (limited to 'flang-rt')
| -rw-r--r-- | flang-rt/lib/cuda/descriptor.cpp | 9 | ||||
| -rw-r--r-- | flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp | 11 |
2 files changed, 0 insertions, 20 deletions
diff --git a/flang-rt/lib/cuda/descriptor.cpp b/flang-rt/lib/cuda/descriptor.cpp index d3cc6c2c99e7..aa75d4eff051 100644 --- a/flang-rt/lib/cuda/descriptor.cpp +++ b/flang-rt/lib/cuda/descriptor.cpp @@ -62,15 +62,6 @@ void RTDEF(CUFDescriptorCheckSection)( } } -void RTDEF(CUFSetAllocatorIndex)( - Descriptor *desc, int index, const char *sourceFile, int sourceLine) { - if (!desc) { - Terminator terminator{sourceFile, sourceLine}; - terminator.Crash("descriptor is null"); - } - desc->SetAllocIdx(index); -} - RT_EXT_API_GROUP_END } } // namespace Fortran::runtime::cuda diff --git a/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp b/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp index 4b22e29cc817..f1f931e87a86 100644 --- a/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp +++ b/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp @@ -72,14 +72,3 @@ TEST(AllocatableCUFTest, DescriptorAllocationTest) { EXPECT_TRUE(desc != nullptr); RTNAME(CUFFreeDescriptor)(desc); } - -TEST(AllocatableCUFTest, CUFSetAllocatorIndex) { - using Fortran::common::TypeCategory; - RTNAME(CUFRegisterAllocator)(); - // REAL(4), DEVICE, ALLOCATABLE :: a(:) - auto a{createAllocatable(TypeCategory::Real, 4)}; - EXPECT_EQ((int)kDefaultAllocator, a->GetAllocIdx()); - RTNAME(CUFSetAllocatorIndex)( - a.get(), kDeviceAllocatorPos, __FILE__, __LINE__); - EXPECT_EQ((int)kDeviceAllocatorPos, a->GetAllocIdx()); -} |
