fix macro XGBOOST_USE_HIP

This commit is contained in:
amdsc21 2023-03-10 07:01:25 +01:00
parent 5edfc1e2e9
commit bde3107c3e
3 changed files with 6 additions and 6 deletions

View File

@ -30,8 +30,8 @@ DMLC_REGISTER_PARAMETER(LinearTrainParam);
// List of files that will be force linked in static links. // List of files that will be force linked in static links.
DMLC_REGISTRY_LINK_TAG(updater_shotgun); DMLC_REGISTRY_LINK_TAG(updater_shotgun);
DMLC_REGISTRY_LINK_TAG(updater_coordinate); DMLC_REGISTRY_LINK_TAG(updater_coordinate);
#ifdef XGBOOST_USE_CUDA #if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
DMLC_REGISTRY_LINK_TAG(updater_gpu_coordinate); DMLC_REGISTRY_LINK_TAG(updater_gpu_coordinate);
#endif // XGBOOST_USE_CUDA #endif // XGBOOST_USE_CUDA, XGBOOST_USE_HIP
} // namespace linear } // namespace linear
} // namespace xgboost } // namespace xgboost

View File

@ -42,7 +42,7 @@ void ObjFunction::InitEstimation(MetaInfo const&, linalg::Tensor<float, 1>* base
namespace xgboost { namespace xgboost {
namespace obj { namespace obj {
// List of files that will be force linked in static links. // List of files that will be force linked in static links.
#ifdef XGBOOST_USE_CUDA #if !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP)
DMLC_REGISTRY_LINK_TAG(regression_obj_gpu); DMLC_REGISTRY_LINK_TAG(regression_obj_gpu);
DMLC_REGISTRY_LINK_TAG(quantile_obj_gpu); DMLC_REGISTRY_LINK_TAG(quantile_obj_gpu);
DMLC_REGISTRY_LINK_TAG(hinge_obj_gpu); DMLC_REGISTRY_LINK_TAG(hinge_obj_gpu);
@ -54,6 +54,6 @@ DMLC_REGISTRY_LINK_TAG(quantile_obj);
DMLC_REGISTRY_LINK_TAG(hinge_obj); DMLC_REGISTRY_LINK_TAG(hinge_obj);
DMLC_REGISTRY_LINK_TAG(multiclass_obj); DMLC_REGISTRY_LINK_TAG(multiclass_obj);
DMLC_REGISTRY_LINK_TAG(rank_obj); DMLC_REGISTRY_LINK_TAG(rank_obj);
#endif // XGBOOST_USE_CUDA #endif // XGBOOST_USE_CUDA, XGBOOST_USE_HIP
} // namespace obj } // namespace obj
} // namespace xgboost } // namespace xgboost

View File

@ -34,8 +34,8 @@ DMLC_REGISTRY_LINK_TAG(updater_prune);
DMLC_REGISTRY_LINK_TAG(updater_quantile_hist); DMLC_REGISTRY_LINK_TAG(updater_quantile_hist);
DMLC_REGISTRY_LINK_TAG(updater_approx); DMLC_REGISTRY_LINK_TAG(updater_approx);
DMLC_REGISTRY_LINK_TAG(updater_sync); DMLC_REGISTRY_LINK_TAG(updater_sync);
#ifdef XGBOOST_USE_CUDA #if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
DMLC_REGISTRY_LINK_TAG(updater_gpu_hist); DMLC_REGISTRY_LINK_TAG(updater_gpu_hist);
#endif // XGBOOST_USE_CUDA #endif // XGBOOST_USE_CUDA, XGBOOST_USE_HIP
} // namespace tree } // namespace tree
} // namespace xgboost } // namespace xgboost