diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-06-28 11:56:21 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-06-28 11:56:21 -0700 |
commit | 74a9dd11022b58685de29230f5cf69067bd7fbd4 (patch) | |
tree | c7defa3a9d1b87d730a841c31be8493119d65c16 | |
parent | 70d4020ad9b4e2d1bb6d1ea2436a853a41e04b20 (diff) |
Fix preprocessor condition to only generate a warning when calling eigen::GpuDevice::synchronize() from device code, but not when calling from a non-GPU compilation unit.
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h index ebf85c072..5b1abdc40 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h @@ -283,7 +283,7 @@ struct GpuDevice { } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const { -#if defined(EIGEN_GPUCC) && !defined(EIGEN_GPU_COMPILE_PHASE) +#ifndef EIGEN_GPU_COMPILE_PHASE gpuError_t err = gpuStreamSynchronize(stream_->stream()); if (err != gpuSuccess) { std::cerr << "Error detected in GPU stream: " |