@@ -1067,11 +1067,9 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CPUBufferAndCudaBufferPointToCpuMemo
1067
1067
array_data->null_count = 4 ;
1068
1068
ASSERT_TRUE (is_valid_as_array (array_data));
1069
1069
{
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.
1075
1073
ASSERT_OK_AND_ASSIGN (auto viewed_array_data, array_data->ViewOrCopyTo (cpu_mm_));
1076
1074
ASSERT_TRUE (is_statistics_shared (array_data, viewed_array_data));
1077
1075
}
@@ -1132,11 +1130,10 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CudaHostBufferAndGpuBuffersPointToMe
1132
1130
array_data->null_count = 4 ;
1133
1131
ASSERT_TRUE (is_valid_as_array (array_data));
1134
1132
{
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
+
1140
1137
ASSERT_OK_AND_ASSIGN (auto viewed_array_data, array_data->ViewOrCopyTo (cpu_mm_));
1141
1138
ASSERT_TRUE (is_statistics_shared (array_data, viewed_array_data));
1142
1139
}
@@ -1158,8 +1155,10 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CudaBuffers) {
1158
1155
statistics->max = 10 ;
1159
1156
array_data->statistics = statistics;
1160
1157
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?
1162
1160
// ASSERT_TRUE(is_valid_as_array(array_data));
1161
+
1163
1162
{
1164
1163
// Since it's not possible to get host pointers from CudaBuffers,
1165
1164
// the buffers are copied.
@@ -1193,11 +1192,10 @@ TEST_F(TestArrayDataStatisticsViewOrCopyTO, CudaBuffersPointToCpuMemory) {
1193
1192
// even though the other GPU-resident buffers are valid?
1194
1193
// ASSERT_TRUE(is_valid_as_array(array_data));
1195
1194
{
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
+
1201
1199
ASSERT_OK_AND_ASSIGN (auto viewed_data, array_data->ViewOrCopyTo (cpu_mm_));
1202
1200
ASSERT_TRUE (is_statistics_shared (array_data, viewed_data));
1203
1201
}
0 commit comments