cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Alexium
Adept I

double sqrt function - supported/available for RV770?

The clBuildProgram sais “Creating kernel failed!” with no specific error message whenever there's sqrt(), or length(), or normalize() function of double argument. But double functions are part of OCL 1.0 specs and thus shold be supported for RV770. Please advise.

0 Likes
15 Replies
Alexium
Adept I

Any ideas? I really need double precision...

0 Likes

Alexium,

Please a try a fresh installation.Also furnish the following details so that we can try to reproduce the issue at out side:

Operating system,CPU.

post the code snippet where you tried to enable the extension

0 Likes

Originally posted by: himanshu.gautam Alexium,



Please a try a fresh installation.Also furnish the following details so that we can try to reproduce the issue at out side: Operating system,CPU.

post the code snippet where you tried to enable the extension


Do you advise fresh installation of SDK, drivers or both?

I have a 10.10 APP Edition driver, ATI 4850 card, Intel Q6600 CPU (have no idea why would you wonder) and Win 7 x32 OS. The code attached generates an error both in clBuildProgram and SKA.

#pragma OPENCL EXTENSION cl_amd_fp64 : enable __kernel void k(void) { }

0 Likes

Updated the OpenCL driver to 10.11. The problem remains.

0 Likes

Are you getting this when you try to complie and run your code, or just in the stream kernel analyzer?

Because I get that same message in the kernel analyzer, but my double precision code runs fine (on Radeon 5870). Despite fresh installs of the latest, the kernel analyzer (v1.6) doesn't want to recognize above v10.7. If so, it may just be a kernel analyzer thing.

Also, you might try: (taken from the OpenCL Spec. PDF)

#pragma OPENCL EXTENSION cl_khr_fp64 : enable


It doesn't work for me but, you never know...

-Chris

0 Likes

Are you getting this when you try to complie and run your code


Both is SKA and when my program calls clBuildProgram.

I think no _khr_ extensions are supported on GPU prior to Evergreen. No, it doesn't work. But thanks for concerning yourself with my problem. I really don't know what to try next.

0 Likes

Does your clInfo displays this extension.

Are you able to enable any other extension?

Are you able to run without any extension.

Please post the clInfo output.

Also try MatrixMulDouble sample.

0 Likes

Also try MatrixMulDouble sample.


 

Now it works. SKA still reports an error, but the program works. Must have something to do with me reinstalling ocl driver yesterday. So basically, fp64 works fine.

Have another problem now : apparently, there’s no double precision sqrt function available, despite the fact double math functions are part of OCL 1.0 spec which AMD claims to be supported fully… 

To be more precise – I’m getting “Creating kernel failed!” message with no specific error. The message disappears and the kernel compiles just fine when I comment sqrt out.

 

 

0 Likes

alexium,

Are you saying your program crashes giving an error creating kernel failed.

Post the code.

0 Likes

Originally posted by: himanshu.gautam alexium,

 

Are you saying your program crashes giving an error creating kernel failed.  Post the code.

Exactly. Whenever there's sqrt(), or length(), or normalize() function of double argument.

#pragma OPENCL EXTENSION cl_amd_fp64 : enable kernel void integrate(void) { const double G = (6.67428e-11); double r = sqrt(G); }

0 Likes

alexium,

I tried the code in v2.2 and confirm the problem with SKA. How ever i was able to run the code in a win xp system.

Are you able to run other samples.Try the matrix muldouble sample it uses the same extension.It might help you.

 

0 Likes

Originally posted by: himanshu.gautam   Are you able to run other samples.Try the matrix muldouble sample it uses the same extension.It might help you.

I can now enable and use the fp64 extension. The matmult example compiles and runs fine. But I cannot use sqrt function of double argument.

0 Likes

alexium,

Maybe you are doing something wrong with the host code.You can try to insert your kernel code inside any double sample's kernel.This way we can eliminate any host code fallacies you might be doing.

I recommend you to send a complete and simple test case(host code + Kernel code) and i will try to run it with the internal drivers to check whether the problem still exists.

 

0 Likes

You can try to insert your kernel code inside any double sample's kernel.

Good thinking, thanks for advice! Sqrt works fine in double matmul sample. Which means I'm doing something wrong somewhere. Have no idea what and where yet...

0 Likes

You can take help from the samples provided with SDK.

Also OpenCL Programming guide and many tutorials are available at AMD' site and at other places.

 

My personal advice is to do tight exception handling for every openCL API.This can be very useful in isolating the bug in your code.

0 Likes