Resolve GPU bug on large files (#3472)

Remove calls to thrust copy, fix indexing bug
This commit is contained in:
Rory Mitchell
2018-07-16 20:43:45 +12:00
committed by GitHub
parent 1b59316444
commit 0f145a0365
3 changed files with 28 additions and 20 deletions

View File

@@ -132,9 +132,10 @@ class DeviceShard {
for (int fidx = 0; fidx < batch.Size(); fidx++) {
auto col = batch[fidx];
thrust::copy(col.data + column_segments[fidx].first,
col.data + column_segments[fidx].second,
data_.tbegin() + row_ptr_[fidx]);
auto seg = column_segments[fidx];
dh::safe_cuda(cudaMemcpy(
data_.Data() + row_ptr_[fidx], col.data + seg.first,
sizeof(Entry) * (seg.second - seg.first), cudaMemcpyHostToDevice));
}
// Rescale indices with respect to current shard
RescaleIndices(ridx_begin_, &data_);