Skip to content

Commit 96e68ef

Browse files
committed
Correct Comment
1 parent 00c1316 commit 96e68ef

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

cpp/src/arrow/gpu/cuda_test.cc

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,11 +1067,9 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CPUBufferAndCudaBufferPointToCpuMemo
10671067
array_data->null_count = 4;
10681068
ASSERT_TRUE(is_valid_as_array(array_data));
10691069
{
1070-
// The view operation is applied to CudaBuffers because it's possible to obtain a
1071-
// host pointer from them.
1072-
// I ran this test on an RTX 3050 Mobile (which supports Unified Addressing), and
1073-
// the assertion passed. However, on GPUs that do not support Unified Addressing,
1074-
// the assertion is expected to fail.
1070+
// I ran this test on an RTX 3050 Mobile, which supports the device attribute
1071+
// cudaDevAttrCanUseHostPointerForRegisteredMem, and the assertion passed.
1072+
// On GPUs that do not support this attribute, the assertion is expected to fail.
10751073
ASSERT_OK_AND_ASSIGN(auto viewed_array_data, array_data->ViewOrCopyTo(cpu_mm_));
10761074
ASSERT_TRUE(is_statistics_shared(array_data, viewed_array_data));
10771075
}
@@ -1132,11 +1130,10 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CudaHostBufferAndGpuBuffersPointToMe
11321130
array_data->null_count = 4;
11331131
ASSERT_TRUE(is_valid_as_array(array_data));
11341132
{
1135-
// The view operation is applied to data_buffer because it's possible to obtain a
1136-
// host pointer from it.
1137-
// I ran this test on an RTX 3050 Mobile (which supports Unified Addressing), and
1138-
// the assertion passed. However, on GPUs that do not support Unified Addressing,
1139-
// the assertion is expected to fail.
1133+
// I ran this test on an RTX 3050 Mobile, which supports the device attribute
1134+
// cudaDevAttrCanUseHostPointerForRegisteredMem, and the assertion passed.
1135+
// On GPUs that do not support this attribute, the assertion is expected to fail.
1136+
11401137
ASSERT_OK_AND_ASSIGN(auto viewed_array_data, array_data->ViewOrCopyTo(cpu_mm_));
11411138
ASSERT_TRUE(is_statistics_shared(array_data, viewed_array_data));
11421139
}
@@ -1158,8 +1155,10 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CudaBuffers) {
11581155
statistics->max = 10;
11591156
array_data->statistics = statistics;
11601157
array_data->null_count = 4;
1161-
// Why does the assertion below fail
1158+
// Why does the assertion below fail? Is the bitmap_buffer on the GPU invalid,
1159+
// even though the other GPU-resident buffers are valid?
11621160
// ASSERT_TRUE(is_valid_as_array(array_data));
1161+
11631162
{
11641163
// Since it's not possible to get host pointers from CudaBuffers,
11651164
// the buffers are copied.
@@ -1193,11 +1192,10 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CudaBuffersPointToCpuMemory) {
11931192
// even though the other GPU-resident buffers are valid?
11941193
// ASSERT_TRUE(is_valid_as_array(array_data));
11951194
{
1196-
// The view operation is applied to CudaBuffers because it's possible to obtain a
1197-
// host pointer from them.
1198-
// Note that I ran this test on an RTX 3050 Mobile (which supports Unified
1199-
// Addressing), and the assertion passed. However, on GPUs that do not support Unified
1200-
// Addressing, the assertion is expected to fail.
1195+
// I ran this test on an RTX 3050 Mobile, which supports the device attribute
1196+
// cudaDevAttrCanUseHostPointerForRegisteredMem, and the assertion passed.
1197+
// On GPUs that do not support this attribute, the assertion is expected to fail.
1198+
12011199
ASSERT_OK_AND_ASSIGN(auto viewed_data, array_data->ViewOrCopyTo(cpu_mm_));
12021200
ASSERT_TRUE(is_statistics_shared(array_data, viewed_data));
12031201
}

0 commit comments

Comments
 (0)