diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h b/Eigen/src/Core/util/GpuHipCudaDefines.inc similarity index 96% rename from unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h rename to Eigen/src/Core/util/GpuHipCudaDefines.inc index 3073272a2..4e1050053 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h +++ b/Eigen/src/Core/util/GpuHipCudaDefines.inc @@ -8,7 +8,7 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#if defined(EIGEN_USE_GPU) && !defined(EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H) +#if defined(EIGEN_USE_GPU) && !defined(EIGEN_CORE_GPU_HIP_CUDA_DEFINES_H) #define EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H // Note that we are using EIGEN_USE_HIP here instead of EIGEN_HIPCC...this is by design @@ -98,4 +98,4 @@ #endif // gpu_assert -#endif // EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H +#endif // EIGEN_CORE_GPU_HIP_CUDA_DEFINES_H diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaUndefines.h b/Eigen/src/Core/util/GpuHipCudaUndefines.inc similarity index 87% rename from unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaUndefines.h rename to Eigen/src/Core/util/GpuHipCudaUndefines.inc index 509bcee0b..342a323a9 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaUndefines.h +++ b/Eigen/src/Core/util/GpuHipCudaUndefines.inc @@ -8,7 +8,7 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#if defined(EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H) +#if defined(EIGEN_CORE_GPU_HIP_CUDA_DEFINES_H) #ifndef EIGEN_PERMANENTLY_ENABLE_GPU_HIP_CUDA_DEFINES @@ -40,6 +40,6 @@ #endif // EIGEN_PERMANENTLY_ENABLE_GPU_HIP_CUDA_DEFINES -#undef EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H +#undef EIGEN_CORE_GPU_HIP_CUDA_DEFINES_H -#endif // EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H +#endif // EIGEN_CORE_GPU_HIP_CUDA_DEFINES_H diff --git a/test/gpu_test_helper.h b/test/gpu_test_helper.h index bbf766dde..bc8c8d410 100644 --- a/test/gpu_test_helper.h +++ b/test/gpu_test_helper.h @@ -4,7 +4,7 @@ #include // Allow gpu** macros for generic tests. -#include +#include // std::tuple cannot be used on device, and there is a bug in cuda < 9.2 that // doesn't allow std::tuple to compile for host code either. In these cases, diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h index 4c24bc1f0..2a3b08732 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h @@ -10,14 +10,11 @@ #if defined(EIGEN_USE_GPU) && !defined(EIGEN_CXX11_TENSOR_TENSOR_DEVICE_GPU_H) #define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_GPU_H -// This header file container defines fo gpu* macros which will resolve to -// their equivalent hip* or cuda* versions depending on the compiler in use -// A separate header (included at the end of this file) will undefine all -#include "TensorGpuHipCudaDefines.h" - // IWYU pragma: private #include "./InternalHeaderCheck.h" +#include "../../../../../Eigen/src/Core/util/GpuHipCudaDefines.inc" + namespace Eigen { static const int kGpuScratchSize = 1024; @@ -390,6 +387,6 @@ static EIGEN_DEVICE_FUNC inline void setGpuSharedMemConfig(gpuSharedMemConfig co } // end namespace Eigen // undefine all the gpu* macros we defined at the beginning of the file -#include "TensorGpuHipCudaUndefines.h" +#include "../../../../../Eigen/src/Core/util/GpuHipCudaUndefines.inc" #endif // EIGEN_CXX11_TENSOR_TENSOR_DEVICE_GPU_H diff --git a/unsupported/test/cxx11_tensor_argmax_gpu.cu b/unsupported/test/cxx11_tensor_argmax_gpu.cu index 629e5c02b..90c94c56d 100644 --- a/unsupported/test/cxx11_tensor_argmax_gpu.cu +++ b/unsupported/test/cxx11_tensor_argmax_gpu.cu @@ -14,8 +14,6 @@ #include "main.h" #include -#include - using Eigen::Tensor; template diff --git a/unsupported/test/cxx11_tensor_contract_gpu.cu b/unsupported/test/cxx11_tensor_contract_gpu.cu index c9eebfca5..a41a2df46 100644 --- a/unsupported/test/cxx11_tensor_contract_gpu.cu +++ b/unsupported/test/cxx11_tensor_contract_gpu.cu @@ -17,8 +17,6 @@ #include "main.h" #include -#include - using Eigen::Tensor; typedef Tensor::DimensionPair DimPair; diff --git a/unsupported/test/cxx11_tensor_device.cu b/unsupported/test/cxx11_tensor_device.cu index 0a26ab93b..b4ba23e10 100644 --- a/unsupported/test/cxx11_tensor_device.cu +++ b/unsupported/test/cxx11_tensor_device.cu @@ -17,8 +17,6 @@ #include "OffByOneScalar.h" #include -#include - using Eigen::RowMajor; using Eigen::Tensor; diff --git a/unsupported/test/cxx11_tensor_gpu.cu b/unsupported/test/cxx11_tensor_gpu.cu index c5046c029..c4d0be10d 100644 --- a/unsupported/test/cxx11_tensor_gpu.cu +++ b/unsupported/test/cxx11_tensor_gpu.cu @@ -15,8 +15,6 @@ #include "main.h" #include -#include - using Eigen::Tensor; void test_gpu_nullary() { diff --git a/unsupported/test/cxx11_tensor_random_gpu.cu b/unsupported/test/cxx11_tensor_random_gpu.cu index fa8da7d98..6edea1c42 100644 --- a/unsupported/test/cxx11_tensor_random_gpu.cu +++ b/unsupported/test/cxx11_tensor_random_gpu.cu @@ -16,8 +16,6 @@ #include "main.h" #include -#include - void test_gpu_random_uniform() { Tensor out(72, 97); out.setZero(); diff --git a/unsupported/test/cxx11_tensor_scan_gpu.cu b/unsupported/test/cxx11_tensor_scan_gpu.cu index c9997adb4..b94ab3104 100644 --- a/unsupported/test/cxx11_tensor_scan_gpu.cu +++ b/unsupported/test/cxx11_tensor_scan_gpu.cu @@ -16,8 +16,6 @@ #include "main.h" #include -#include - using Eigen::Tensor; typedef Tensor::DimensionPair DimPair;