diff --git a/src/objective/regression_obj.cu b/src/objective/regression_obj.cu index d7999f8c1..460f1f40e 100644 --- a/src/objective/regression_obj.cu +++ b/src/objective/regression_obj.cu @@ -38,7 +38,10 @@ #if defined(XGBOOST_USE_CUDA) #include "../common/device_helpers.cuh" #include "../common/linalg_op.cuh" -#endif // defined(XGBOOST_USE_CUDA) +#elif defined(XGBOOST_USE_HIP) +#include "../common/device_helpers.hip.h" +#include "../common/linalg_op.cuh" +#endif // defined(XGBOOST_USE_CUDA), defined(XGBOOST_USE_HIP) namespace xgboost { namespace obj { @@ -49,9 +52,9 @@ void CheckRegInputs(MetaInfo const& info, HostDeviceVector const& pre } } // anonymous namespace -#if defined(XGBOOST_USE_CUDA) +#if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP) DMLC_REGISTRY_FILE_TAG(regression_obj_gpu); -#endif // defined(XGBOOST_USE_CUDA) +#endif // defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP) struct RegLossParam : public XGBoostParameter { float scale_pos_weight; diff --git a/src/objective/regression_obj.hip b/src/objective/regression_obj.hip index e69de29bb..1812685af 100644 --- a/src/objective/regression_obj.hip +++ b/src/objective/regression_obj.hip @@ -0,0 +1,4 @@ + +#if defined(XGBOOST_USE_HIP) +#include "regression_obj.cu" +#endif