finish ellpack_page.cu

This commit is contained in:
amdsc21
2023-03-10 04:26:09 +01:00
parent 49732359ef
commit 185dbce21f
3 changed files with 69 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
/*!
* Copyright 2019 XGBoost contributors
*/
#ifndef XGBOOST_USE_CUDA
#if !defined(XGBOOST_USE_CUDA)
#include <xgboost/data.h>
@@ -34,4 +34,36 @@ size_t EllpackPage::Size() const {
} // namespace xgboost
#endif // XGBOOST_USE_CUDA
#elif !defined(XGBOOST_USE_HIP)
#include <xgboost/data.h>
// dummy implementation of EllpackPage in case HIP is not used
namespace xgboost {
class EllpackPageImpl {};
EllpackPage::EllpackPage() = default;
EllpackPage::EllpackPage(DMatrix*, const BatchParam&) {
LOG(FATAL) << "Internal Error: XGBoost is not compiled with HIP but "
"EllpackPage is required";
}
EllpackPage::~EllpackPage() {
LOG(FATAL) << "Internal Error: XGBoost is not compiled with HIP but "
"EllpackPage is required";
}
void EllpackPage::SetBaseRowId(std::size_t) {
LOG(FATAL) << "Internal Error: XGBoost is not compiled with HIP but "
"EllpackPage is required";
}
size_t EllpackPage::Size() const {
LOG(FATAL) << "Internal Error: XGBoost is not compiled with HIP but "
"EllpackPage is required";
return 0;
}
} // namespace xgboost
#endif // XGBOOST_USE_CUDA || XGBOOST_USE_HIP