try elementwise_metric.cu

This commit is contained in:
amdsc21
2023-03-08 22:42:48 +01:00
parent 946f9e9802
commit 6fa248b75f
7 changed files with 35 additions and 19 deletions

View File

@@ -3,8 +3,6 @@
*/
// Dummy file to keep the CUDA conditional compile trick.
#if !defined(XGBOOST_USE_CUDA)
#if !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP)
#include "elementwise_metric.cu"
#elif !defined(XGBOOST_USE_HIP)
#include "elementwise_metric.hip"
#endif // !defined(XGBOOST_USE_CUDA)
#endif // !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP)

View File

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

View File

@@ -3,6 +3,6 @@
*/
// Dummy file to keep the CUDA conditional compile trick.
#if !defined(XGBOOST_USE_CUDA)
#if !defined(XGBOOST_USE_CUDA) && !defined(XGBOOST_USE_HIP)
#include "multiclass_metric.cu"
#endif // !defined(XGBOOST_USE_CUDA)

View File

@@ -23,6 +23,15 @@
#include "../common/device_helpers.cuh"
#endif // XGBOOST_USE_CUDA
#if defined(XGBOOST_USE_HIP)
#include <thrust/execution_policy.h> // thrust::cuda::par
#include <thrust/functional.h> // thrust::plus<>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/transform_reduce.h>
#include "../common/device_helpers.hip.h"
#endif // XGBOOST_USE_HIP
namespace xgboost {
namespace metric {
// tag the this file, used by force static link later.