spdl.io.convert_array

convert_array(vals, storage: CPUStorage | None = None) CPUBuffer[source]

Convert the given array to buffer.

This function is intended to be used when sending class labels (which is generated from list of integer) to GPU while overlapping the transfer with kenrel execution. See spdl.io.cpu_storage() for the detail.

Parameters:
Returns:

A Buffer object.