cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

anu9anna
Adept I

Does OpenCl1.2 Supports double precision floating point?

Hi ,

              Can anyone explain whether opencl1.2 supports double precision? I understand that this is optional for 1.2 . If so how to enable the support?

Thanks

0 Likes
13 Replies
ankhster
Adept II

Re: Does OpenCl1.2 Supports double precision floating point?

Yes, OpenCL 1.2 supports double precision. Whether or not your device does is another question.

You can query your device to test this.

Page 39 onwards of the OpenCL 1.2 Specification: www.khronos.org/registry/cl/specs/opencl-1.2.pdf

If double precision is not supported, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE must return 0.

If double precision is not supported, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE must return 0.

anu9anna
Adept I

Re: Does OpenCl1.2 Supports double precision floating point?

Thanku ankhster .. Can you just tell me if the device supports double precision, what should be the value ?

0 Likes
ankhster
Adept II

Re: Does OpenCl1.2 Supports double precision floating point?

As it says, the device must return zero if the device does not support double precision. Depending on the device you will get a zero or non-zero answer.

The values I get are:

Preferred Double Vector Width    1    // This is HD 7970 GPU

Preferred Double Vector Width    2    // This is Intel Q9450 CPU

indicating both devices support double precision.

anu9anna
Adept I

Re: Does OpenCl1.2 Supports double precision floating point?

I tried to get the info from the device Intel(R) Core(TM)2 Duo CPU E7500 and I got both the values as zero.

So does it mean that the CPU doesn't support double precision. Then how can I use double precision algorithms??

0 Likes
nou
Exemplar

Re: Does OpenCl1.2 Supports double precision floating point?

you should check for cl_khr_fp64 device extension.

0 Likes
anu9anna
Adept I

Re: Does OpenCl1.2 Supports double precision floating point?

can I check using clinfo?

0 Likes
ankhster
Adept II

Re: Does OpenCl1.2 Supports double precision floating point?

Indeed you can, you should get something like this:

        CL_DEVICE_EXTENSIONS:   cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_dx9_media_sharing

0 Likes
anu9anna
Adept I

Does OpenCl1.2 Supports double precision floating point?

Hi,

         Do we have any other API to read and write data from and to the device other than , clEnqueueReadBuffer and clEnqueueWriteBuffer ?

0 Likes
nou
Exemplar

Re: Does OpenCl1.2 Supports double precision floating point?

clEnqueueMapBuffer()

0 Likes