I read section 9.3 of OpenCL specification,how can I use double in a kernel function? I tried to add "#pragma OPENCL EXTENSION cl_khr_fp64:enable"on the top of kernel function,but my program failed to compile,what can I do ?
By the way, I used "clGetDeviceInfo" to query"CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE", it returned 0,does it means my GPU support double precision or not ?
Which GPU are you using?
Extensions are supported in 8xx series of GPU's only. Also post the error message you are getting.
How to check my GPU's version ? If my GPU support extension, how can I use parameters of double precision in kernel function?
query for device name. if it is cypress redwood and not 7xx than you have evergreen family GPU whhich support double.
you can enable it through cl_amd_fp64 but only basic +-*/ operation are support currently on GPU.
http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=88
Thank you very much, it displays?"Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz"?My GPU surely support double. But I don't know how to include the #pragma OPENCL EXTENSION cl_amd_fp64 : enable directive. My kernel is like this, it fail to compile. Could you please tell me where is the grammar error !
#pragma OPENCL EXTENSION cl_amd_fp64 : enable __kernel void FunctionName( __global double* M1, __global double* M2) { // code without error compilation. }
Thank you very much ! My GPU support double extension.