Skip to content

Commit

Permalink
Document .split better
Browse files Browse the repository at this point in the history
  • Loading branch information
abellina committed Mar 7, 2023
1 parent 3a5c1d0 commit dd1bad3
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ object RmmRapidsRetryIterator extends Arm {
trait Spliterator[K] extends Iterator[K] with AutoCloseable {
override def hasNext: Boolean

/**
* Split is a function that is invoked by `RmmRapidsRetryIterator` when `SplitAndRetryOOM`
* is thrown. This function is implemented by `Spliterator` classes to attempt to handle
* this exception by reducing the size of attempts (the thing that `.next` is
* using as an input), usually by splitting a batch in half by number of rows, or
* splitting a collection of batches into smaller collections to be attempted separately,
* likely reducing GPU memory that needs to be manifested while calling `.next`.
*/
def split(): Unit

override def next(): K
Expand Down

0 comments on commit dd1bad3

Please sign in to comment.