From c073417d0caf55364627b1a0062d3257d3c831cf Mon Sep 17 00:00:00 2001 From: amdsc21 <96135754+amdsc21@users.noreply.github.com> Date: Fri, 10 Mar 2023 06:39:03 +0100 Subject: [PATCH] finish aft_obj.cu --- src/objective/aft_obj.cc | 2 +- src/objective/aft_obj.cu | 4 ++-- src/objective/aft_obj.hip | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/objective/aft_obj.cc b/src/objective/aft_obj.cc index 407c97554..e9299dc54 100644 --- a/src/objective/aft_obj.cc +++ b/src/objective/aft_obj.cc @@ -16,6 +16,6 @@ DMLC_REGISTRY_FILE_TAG(aft_obj); } // namespace obj } // namespace xgboost -#ifndef XGBOOST_USE_CUDA +#if !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP) #include "aft_obj.cu" #endif // XGBOOST_USE_CUDA diff --git a/src/objective/aft_obj.cu b/src/objective/aft_obj.cu index 52a58a7f4..9c34b827a 100644 --- a/src/objective/aft_obj.cu +++ b/src/objective/aft_obj.cu @@ -28,9 +28,9 @@ using AFTLoss = xgboost::common::AFTLoss; namespace xgboost { namespace obj { -#if defined(XGBOOST_USE_CUDA) +#if defined(XGBOOST_USE_CUDA) || !defined(XGBOOST_USE_HIP) DMLC_REGISTRY_FILE_TAG(aft_obj_gpu); -#endif // defined(XGBOOST_USE_CUDA) +#endif // defined(XGBOOST_USE_CUDA) || !defined(XGBOOST_USE_HIP) class AFTObj : public ObjFunction { public: diff --git a/src/objective/aft_obj.hip b/src/objective/aft_obj.hip index e69de29bb..6df5878b9 100644 --- a/src/objective/aft_obj.hip +++ b/src/objective/aft_obj.hip @@ -0,0 +1,4 @@ + +#if !defined(XGBOOST_USE_HIP) +#include "aft_obj.cu" +#endif