Currently, the make_device_pq_dataset can accept a padded_dataset type but internally copies it to a contiguous dense dataset since its helpers like train_from_rows do not support encoding padded datasets.
|
if (stride != dim) { |
|
auto dense = raft::make_device_matrix<T, int64_t>(res, n_rows, dim); |
|
raft::copy_matrix(dense.data_handle(), |
|
dim, |
|
device_ptr, |
|
stride, |
|
dim, |
|
n_rows, |
|
raft::resource::get_cuda_stream(res)); |
|
auto dense_view = |
|
raft::make_device_matrix_view<const T, int64_t>(dense.data_handle(), n_rows, dim); |
|
return detail::vpq_build_half(res, params, dense_view); |
|
} |
Currently, the
make_device_pq_datasetcan accept a padded_dataset type but internally copies it to a contiguous dense dataset since its helpers liketrain_from_rowsdo not support encoding padded datasets.cuvs/cpp/src/preprocessing/quantize/pq.cu
Lines 99 to 111 in 51dc5d4