Remove MGPU cpp tests. (#8276)
Co-authored-by: Hyunsu Philip Cho <chohyu01@cs.washington.edu>
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
/*!
|
||||
* Copyright 2018 XGBoost contributors
|
||||
* Copyright 2018-2022 XGBoost contributors
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
namespace xgboost {
|
||||
namespace common {
|
||||
|
||||
void SetDevice(std::int32_t device) {
|
||||
if (device >= 0) {
|
||||
dh::safe_cuda(cudaSetDevice(device));
|
||||
}
|
||||
}
|
||||
|
||||
int AllVisibleGPUs() {
|
||||
int n_visgpus = 0;
|
||||
try {
|
||||
|
||||
@@ -246,6 +246,16 @@ inline void AssertOneAPISupport() {
|
||||
#endif // XGBOOST_USE_ONEAPI
|
||||
}
|
||||
|
||||
void SetDevice(std::int32_t device);
|
||||
|
||||
#if !defined(XGBOOST_USE_CUDA)
|
||||
inline void SetDevice(std::int32_t device) {
|
||||
if (device >= 0) {
|
||||
AssertGPUSupport();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename Idx, typename Container,
|
||||
typename V = typename Container::value_type,
|
||||
typename Comp = std::less<V>>
|
||||
|
||||
Reference in New Issue
Block a user