diff --git a/CUDAStream.cu b/CUDAStream.cu index 21d36fa..802bb05 100644 --- a/CUDAStream.cu +++ b/CUDAStream.cu @@ -42,7 +42,7 @@ CUDAStream::CUDAStream(const unsigned int ARRAY_SIZE, const int device_index) check_error(); // Print out device information - std::cout << "Using OpenCL device " << getDeviceName(device_index) << std::endl; + std::cout << "Using CUDA device " << getDeviceName(device_index) << std::endl; std::cout << "Driver: " << getDeviceDriver(device_index) << std::endl; array_size = ARRAY_SIZE; diff --git a/OCLStream.cpp b/OCLStream.cpp index 50ad543..0ed4b8e 100644 --- a/OCLStream.cpp +++ b/OCLStream.cpp @@ -78,7 +78,18 @@ OCLStream::OCLStream(const unsigned int ARRAY_SIZE, const int device_index) // Check device can do double if (!device.getInfo()) throw std::runtime_error("Device does not support double precision, please use --float"); - program.build("-DTYPE=double"); + try + { + program.build("-DTYPE=double"); + } + catch (cl::Error& err) + { + if (err.err() == CL_BUILD_PROGRAM_FAILURE) + { + std::cout << program.getBuildInfo()[0].second << std::endl; + throw err; + } + } } else if (sizeof(T) == sizeof(float)) program.build("-DTYPE=float"); diff --git a/SYCLStream.cpp b/SYCLStream.cpp index d039d70..d4a2fd0 100644 --- a/SYCLStream.cpp +++ b/SYCLStream.cpp @@ -11,7 +11,7 @@ using namespace cl::sycl; -#define WGSIZE 64 +#define WGSIZE 256 // Cache list of devices bool cached = false;