finish ellpack_page_source.cu

This commit is contained in:
amdsc21 2023-03-10 05:06:36 +01:00
parent fa9f69dd85
commit 61c0b19331
2 changed files with 8 additions and 0 deletions

View File

@ -10,7 +10,11 @@
namespace xgboost {
namespace data {
void EllpackPageSource::Fetch() {
#if defined(XGBOOST_USE_CUDA)
dh::safe_cuda(cudaSetDevice(param_.gpu_id));
#elif defined(XGBOOST_USE_HIP)
dh::safe_cuda(hipSetDevice(param_.gpu_id));
#endif
if (!this->ReadCache()) {
if (count_ != 0 && !sync_) {
// source is initialized to be the 0th page during construction, so when count_ is 0

View File

@ -0,0 +1,4 @@
#if defined(XGBOOST_USE_HIP)
#include "ellpack_page_source.cu"
#endif