i tried addding the
#
pragma OPENCL EXTENSION cl_khr_fp64 : enable
in the kernal but then i suddenly get an error,
and tested my kernal in the kernal analyzer but its says
OpenCL Compile Error: clBuildProgram failed (CL_BUILD_PROGRAM_FAILURE).
Line 4: error: unrecognized
preprocessing directive
#EXTENSION OPENCL cl_khr_fp64 : enable
^
1 error detected.
HD 5870
openCL sdk 2.4
catalyst 11.4 beta
i7 core
device[0] = primary HD 5870
device[1] = secondary HD 5870
coding and commandquery utilizes device[0]
change it into cl_amd_fp64
Originally posted by: hayabusaxps i tried addding the
[B]
#pragma OPENCL EXTENSION cl_khr_fp64 : enable in the kernal but then i suddenly get an error
The cl_khr_fp64 is not officially supported by AMD on any gpu at the moment, you need to use cl_amd_fp64. The list of supported extensions on each device can be seen with the 'clinfo' binary that is shipped with the SDK. You can also use the various OpenCL query functions to find out at runtime whether a particular extension is supported.
Another solution that works at least on linux is to set the environment variable 'CL_KHR_FP64' to 1. This enable the extension on GPU devices, but is unsupported.
will i still be able to use double floating point on the gpu, if i utilize
cl_amd_fp64
hayabusaxps,
This is a AMD vendor specific extension which AMD supports for its GPUs. This is the only only way currently to work with double on AMD GPUs. In some future release you might expect the khr extension to be supported as well, but i am not aware of its timeline.
will i still be able to use double floating point on the gpu, if i utilize
cl_amd_fp64
Yes, I use cl_amd_fp64 on my Radeon 5870.
Hey Rick, can you help me set it up on my 5870? I don't know where to start but need it for some software. Is it too difficult to walk through? Thanks!
Just add the following line before your kernel...
"
#pragma OPENCL EXTENSION cl_amd_fp64 : enable
"
If you still have problems, please post your code.
The 58xx series supports double precision
You can check the kernels of some double precision(DP) samples in APP SDK to know about how to use the extensions. Run clinfo to know what all extensions are supported by your device.