From c64fe9ea1f9f5943864cd9ca27d3fcca07453f82 Mon Sep 17 00:00:00 2001 From: Deven Desai Date: Thu, 30 Aug 2018 20:22:16 +0000 Subject: Updates to fix HIP-clang specific compile errors. Compiling the eigen unittests with hip-clang (HIP with clang as the underlying compiler instead of hcc or nvcc), results in compile errors. The changes in this commit fix those compile errors. The main change is to convert a few instances of "__device__" to "EIGEN_DEVICE_FUNC" --- unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h index 01d3863da..f3f1640b0 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h @@ -14,7 +14,7 @@ // clang is incompatible with the CUDA syntax wrt making a kernel a class friend, // so we'll use a macro to make clang happy. #ifndef KERNEL_FRIEND -#if defined(__clang__) && defined(__CUDA__) +#if defined(__clang__) && (defined(__CUDA__) || defined(__HIP__)) #define KERNEL_FRIEND friend __global__ #else #define KERNEL_FRIEND friend -- cgit v1.2.3