finish ellpack_page_source.cu
This commit is contained in:
parent
fa9f69dd85
commit
61c0b19331
@ -10,7 +10,11 @@
|
|||||||
namespace xgboost {
|
namespace xgboost {
|
||||||
namespace data {
|
namespace data {
|
||||||
void EllpackPageSource::Fetch() {
|
void EllpackPageSource::Fetch() {
|
||||||
|
#if defined(XGBOOST_USE_CUDA)
|
||||||
dh::safe_cuda(cudaSetDevice(param_.gpu_id));
|
dh::safe_cuda(cudaSetDevice(param_.gpu_id));
|
||||||
|
#elif defined(XGBOOST_USE_HIP)
|
||||||
|
dh::safe_cuda(hipSetDevice(param_.gpu_id));
|
||||||
|
#endif
|
||||||
if (!this->ReadCache()) {
|
if (!this->ReadCache()) {
|
||||||
if (count_ != 0 && !sync_) {
|
if (count_ != 0 && !sync_) {
|
||||||
// source is initialized to be the 0th page during construction, so when count_ is 0
|
// source is initialized to be the 0th page during construction, so when count_ is 0
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
#if defined(XGBOOST_USE_HIP)
|
||||||
|
#include "ellpack_page_source.cu"
|
||||||
|
#endif
|
||||||
Loading…
x
Reference in New Issue
Block a user