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:
vals – NumPy array with int64 dtype..
storage (spdl.io.CPUStorage) – Storage object. See
spdl.io.cpu_storage()
.
- Returns:
A Buffer object.