From ad710e4888924ff1efd867ab72633a8dac330373 Mon Sep 17 00:00:00 2001 From: amdsc21 <96135754+amdsc21@users.noreply.github.com> Date: Fri, 10 Mar 2023 06:04:59 +0100 Subject: [PATCH] finish hinge.cu --- src/objective/hinge.cc | 4 ++-- src/objective/hinge.cu | 4 ++-- src/objective/hinge.hip | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/objective/hinge.cc b/src/objective/hinge.cc index 4476ff628..fd04c0291 100644 --- a/src/objective/hinge.cc +++ b/src/objective/hinge.cc @@ -13,6 +13,6 @@ DMLC_REGISTRY_FILE_TAG(hinge_obj); } // namespace obj } // namespace xgboost -#ifndef XGBOOST_USE_CUDA +#if !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP) #include "hinge.cu" -#endif // XGBOOST_USE_CUDA +#endif // XGBOOST_USE_CUDA && XGBOOST_USE_HIP diff --git a/src/objective/hinge.cu b/src/objective/hinge.cu index bff3bc593..17bd57768 100644 --- a/src/objective/hinge.cu +++ b/src/objective/hinge.cu @@ -16,9 +16,9 @@ namespace xgboost { namespace obj { -#if defined(XGBOOST_USE_CUDA) +#if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP) DMLC_REGISTRY_FILE_TAG(hinge_obj_gpu); -#endif // defined(XGBOOST_USE_CUDA) +#endif // defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP) class HingeObj : public ObjFunction { public: diff --git a/src/objective/hinge.hip b/src/objective/hinge.hip index e69de29bb..c3a806772 100644 --- a/src/objective/hinge.hip +++ b/src/objective/hinge.hip @@ -0,0 +1,4 @@ + +#if defined(XGBOST_USE_HIP) +#incude "hinge.cu" +#endif