fix IterativeDeviceDMatrix, support HIP

This commit is contained in:
amdsc21 2023-05-02 20:20:11 +02:00
parent 4a24ca2f95
commit 65097212b3

View File

@ -356,7 +356,7 @@ BatchSet<ExtSparsePage> IterativeDMatrix::GetExtBatches(Context const* ctx,
return BatchSet<ExtSparsePage>(begin_iter); return BatchSet<ExtSparsePage>(begin_iter);
} }
#if !defined(XGBOOST_USE_CUDA) #if !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP)
inline void IterativeDMatrix::InitFromCUDA(Context const*, BatchParam const&, DataIterHandle, float, inline void IterativeDMatrix::InitFromCUDA(Context const*, BatchParam const&, DataIterHandle, float,
std::shared_ptr<DMatrix>) { std::shared_ptr<DMatrix>) {
// silent the warning about unused variables. // silent the warning about unused variables.
@ -376,5 +376,5 @@ inline BatchSet<EllpackPage> IterativeDMatrix::GetEllpackBatches(Context const*
inline void GetCutsFromEllpack(EllpackPage const&, common::HistogramCuts*) { inline void GetCutsFromEllpack(EllpackPage const&, common::HistogramCuts*) {
common::AssertGPUSupport(); common::AssertGPUSupport();
} }
#endif // !defined(XGBOOST_USE_CUDA) #endif // !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP)
} // namespace xgboost::data } // namespace xgboost::data