From 056dd9ce48b2c16b0a2bce58ed53a17dcc20fb42 Mon Sep 17 00:00:00 2001 From: Albert Cardona Date: Tue, 15 Jan 2019 16:23:45 -0500 Subject: [PATCH] Fix compilation errors in tests/test_how_cufft_works.cu in Ubuntu 16.04 with CUDA 10.0. All this commit does is remove code that sets a compatibility mode for CUDA versions earlier than 6050. --- tests/test_how_cufft_works.cu | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/test_how_cufft_works.cu b/tests/test_how_cufft_works.cu index 75f4b77..9dba13b 100644 --- a/tests/test_how_cufft_works.cu +++ b/tests/test_how_cufft_works.cu @@ -1,11 +1,11 @@ #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE TEST_HOW_CUFFT_WORKS -#ifdef __CUDACC_VER_MAJOR__ -#if __CUDACC_VER_MAJOR__ >= 9 -#define __CUDACC_VER__ 90000 -#endif -#endif +//#ifdef __CUDACC_VER_MAJOR__ +//#if __CUDACC_VER_MAJOR__ >= 9 +//#define __CUDACC_VER__ 90000 +//#endif +//#endif #include "boost/test/unit_test.hpp" #include @@ -81,8 +81,6 @@ namespace fourierconvolution { //FORWARD cufftHandle fftPlanFwd; CUFFT_ERROR(cufftPlan3d(&fftPlanFwd, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_R2C)); - if(CUDART_VERSION < 6050) - CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanFwd,CUFFT_COMPATIBILITY_FFTW_PADDING)); CUFFT_ERROR(cufftExecR2C(fftPlanFwd, (cufftReal*)d_stack, (cufftComplex *)d_stack)); CUFFT_ERROR(cufftDestroy(fftPlanFwd)); @@ -96,8 +94,6 @@ namespace fourierconvolution { //BACKWARD cufftHandle fftPlanInv; CUFFT_ERROR(cufftPlan3d(&fftPlanInv, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_C2R)); - if(CUDART_VERSION < 6050) - CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanInv,CUFFT_COMPATIBILITY_FFTW_PADDING)); CUFFT_ERROR(cufftExecC2R(fftPlanInv, (cufftComplex*)d_stack, (cufftReal *)d_stack)); CUFFT_ERROR(cufftDestroy(fftPlanInv) ); @@ -151,8 +147,6 @@ namespace fourierconvolution { //FORWARD cufftHandle fftPlanFwd; CUFFT_ERROR(cufftPlan3d(&fftPlanFwd, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_R2C)); - if(CUDART_VERSION < 6050) - CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanFwd,CUFFT_COMPATIBILITY_FFTW_PADDING)); CUFFT_ERROR(cufftExecR2C(fftPlanFwd, d_real, d_complex)); //apply scale @@ -164,8 +158,6 @@ namespace fourierconvolution { //BACKWARD cufftHandle fftPlanInv; CUFFT_ERROR(cufftPlan3d(&fftPlanInv, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_C2R)); - if(CUDART_VERSION < 6050) - CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanInv,CUFFT_COMPATIBILITY_FFTW_PADDING)); CUFFT_ERROR(cufftExecC2R(fftPlanInv, d_complex, d_real));