testing porting

This commit is contained in:
amdsc21 2023-03-11 01:38:54 +01:00
parent 332f6a89a9
commit 9bf16a2ca6
7 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,4 @@
#if defined(XGBOOST_USE_HIP)
#include "test_aft_obj.cu"
#endif

View File

@ -0,0 +1,4 @@
#if defined(XGBOOST_USE_HIP)
#include "test_hinge.cu"
#endif

View File

@ -0,0 +1,2 @@
#include "test_multiclass_obj.cc"

View File

@ -0,0 +1,2 @@
#include "test_quantile_obj.cc"

View File

@ -0,0 +1,4 @@
#if defined(XGBOOST_USE_HIP)
#include "test_ranking_obj_gpu.cu"
#endif

View File

@ -278,7 +278,7 @@ TEST(Objective, DeclareUnifiedTest(TweedieRegressionGPair)) {
ASSERT_EQ(obj->DefaultEvalMetric(), std::string{"tweedie-nloglik@1.1"}); ASSERT_EQ(obj->DefaultEvalMetric(), std::string{"tweedie-nloglik@1.1"});
} }
#if defined(__CUDACC__) #if defined(__CUDACC__) || defined(__HIP_PLATFORM_AMD__)
TEST(Objective, CPU_vs_CUDA) { TEST(Objective, CPU_vs_CUDA) {
Context ctx = CreateEmptyGenericParam(GPUIDX); Context ctx = CreateEmptyGenericParam(GPUIDX);
@ -358,7 +358,7 @@ TEST(Objective, DeclareUnifiedTest(TweedieRegressionBasic)) {
} }
// CoxRegression not implemented in GPU code, no need for testing. // CoxRegression not implemented in GPU code, no need for testing.
#if !defined(__CUDACC__) #if !defined(__CUDACC__) && !defined(__HIP_PLATFORM_AMD__)
TEST(Objective, CoxRegressionGPair) { TEST(Objective, CoxRegressionGPair) {
Context ctx = CreateEmptyGenericParam(GPUIDX); Context ctx = CreateEmptyGenericParam(GPUIDX);
std::vector<std::pair<std::string, std::string>> args; std::vector<std::pair<std::string, std::string>> args;

View File

@ -0,0 +1,2 @@
#include "test_regression_obj.cc"