finished communicator.cu

This commit is contained in:
amdsc21 2023-03-09 21:02:48 +01:00
parent 5044713388
commit f67e7de7ef
3 changed files with 6 additions and 2 deletions

View File

@ -50,7 +50,7 @@ void Communicator::Init(Json const& config) {
}
}
#ifndef XGBOOST_USE_CUDA
#if !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP)
void Communicator::Finalize() {
communicator_->Shutdown();
communicator_.reset(new NoOpCommunicator());

View File

@ -228,7 +228,7 @@ class Communicator {
static thread_local std::unique_ptr<Communicator> communicator_;
static thread_local CommunicatorType type_;
#if defined(XGBOOST_USE_CUDA)
#if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
static thread_local int device_ordinal_;
static thread_local std::unique_ptr<DeviceCommunicator> device_communicator_;
#endif

View File

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