Skip to content

Commit

Permalink
At BatchedTableCompressor.finish synchronize to allow for "right-size…
Browse files Browse the repository at this point in the history
…" copies to finish before it is potentially spilled (NVIDIA#1248)

Signed-off-by: Alessandro Bellina <abellina@nvidia.com>
  • Loading branch information
abellina authored Dec 3, 2020
1 parent 3f0d1d1 commit 178c14e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ abstract class BatchedTableCompressor(maxBatchMemorySize: Long, stream: Cuda.Str

val compressedTables = results.toArray
results.clear()

// Ensure we synchronize on the CUDA stream, because `CompressedTable` instances
// could be copied to host during a spill before we are done.
// TODO: A better way to do this would be via CUDA events, synchronizing on the event
// instead of the whole stream
stream.sync()
compressedTables
}

Expand Down

0 comments on commit 178c14e

Please sign in to comment.