When running the code below I get this error:
symbol lookup error: /tmp/OCLvOO1aF.so: undefined symbol: __fabs_f64
Does the AMD OpenCL implementation actually overload fabs() to accept double datatypes?
double x = -1; fabs(x);
For the record...
This still happens when I do this:
#pragma OPENCL EXTENSION cl_khr_fp64 : enable __kernel void edgeDetectKernel( __global uint4 * input,
When calling the code below, the result is:
"Extensions: 1.0"
Does this mean anything?
clGetDeviceInfo(devices, CL_DEVICE_EXTENSIONS, sizeof(param), param, &ret_size); printf("\tExtensions:\t\t%s\n", param);
Will double precision support be added soon? Considering the Radeon HD 5870 has more than 500 GFlops double precision performance, I'm assuming the GPU implementation will at least have it?
OK, thanks... so now I've changed my calculations to integers and I get strangeness with the "abs" function.
When using an int as in the code below I get a printout of:
[temp=-12345][abs(temp)=12345]
Nice
When using a long as in the code below I get a printout of:
[temp=-12345][abs(temp)=-1]
Not nice!
As far as I can tell, the documentation states that abs() supports long data types too
Is this a bug? Or am I missing something?
int tempInt = -12345; printf("[temp=%d][abs(temp)=%d]\n",tempInt, abs(tempInt)); long tempLong = -12345; printf("[temp=%d][abs(temp)=%d]\n",tempLong, abs(tempLong));
Which SDK release are you using? Also, could you post your complete kernel code?
Beta 2.0... I know, I should switch to 3.0... maybe later this week
Sorry I dont have time to post a kernel now... late for class!
It was actually just tested by commenting out my entire kernel and inserting the lines I mentioned above.
try '%ld' instead of '%d' to print long variable.
Are you able to use 'printf' inside the kernel without any issues?
'%ld' results in the same output, still incorrect
printf works in the kernel code, I'm very grateful for that!
Originally posted by: alexaverbuch '%ld' results in the same output, still incorrect
I am getting correct results with long datatype, doing printing at host side though.
printf works in the kernel code, I'm very grateful for that!
Did it work by default?
To clarify about DPFP support in OpenCL:
It is not currently in the OpenCL beta release. We start introducing various pieces of DPFP support in OpenCL over the next year. Some of the basic arithmetic functions will be introduced first with the math function support likely taking longer. Since full DPFP support is an optional extension in the OpenCL spec, we are concentrating first improving the performance and other aspects of the required spec first.
Michael.