Skip to content

Commit

Permalink
Fix testchunkedPackTwoPasses to copy from the bounce buffer (#15220)
Browse files Browse the repository at this point in the history
This is a follow on from #15210. We bring back the test and fix it so it copies from the right buffer this time. I also set the original column to have some values and nulls, to make sure we are checking something interesting.

Authors:
  - Alessandro Bellina (https://github.com/abellina)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Gera Shegalov (https://github.com/gerashegalov)

URL: #15220
  • Loading branch information
abellina committed Mar 5, 2024
1 parent cd79fe5 commit f804aa6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions java/src/test/java/ai/rapids/cudf/TableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3758,12 +3758,16 @@ void testChunkedPackBasic() {
}
}
}
/*

@Test
void testChunkedPackTwoPasses() {
// this test packes ~2MB worth of long into a 1MB bounce buffer
// this is 3 iterations because of the validity buffer
Long[] longs = new Long[256*1024];
// Initialize elements at odd-numbered indices
for (int i = 1; i < longs.length; i += 2) {
longs[i] = (long)i;
}
try (Table t1 = new Table.TestBuilder().column(longs).build();
DeviceMemoryBuffer bounceBuffer = DeviceMemoryBuffer.allocate(1L*1024*1024);
ChunkedPack cp = t1.makeChunkedPack(1L*1024*1024);
Expand All @@ -3776,7 +3780,7 @@ void testChunkedPackTwoPasses() {
while (cp.hasNext()) {
long copied = cp.next(bounceBuffer);
target.copyFromDeviceBufferAsync(
offset, target, 0, copied, Cuda.DEFAULT_STREAM);
offset, bounceBuffer, 0, copied, Cuda.DEFAULT_STREAM);
offset += copied;
}

Expand All @@ -3787,7 +3791,6 @@ void testChunkedPackTwoPasses() {
}
}
}
*/

@Test
void testContiguousSplitWithStrings() {
Expand Down

0 comments on commit f804aa6

Please sign in to comment.