jordan30001 / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

Pragmas generated which are not supported by targeted hardware #91

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
AMD Radeon HD 7660D supports the cl_amd_fp64 OpenCL extension. However, APARAPI 
generates the cl_khr_fp64 OpenCL extension automatically. Given that when an 
OpenCL kernel is generated by APARAPI we know the device being targeted, it 
should be possible to add native calls to retrieve the OpenCL extensions 
supported by a device and ensure no unsupported extensions are generated, while 
checking for common alternatives (such as cl_amd_fp64 for cl_khr_fp64).

I've already begun drafting limited support by adding the declarations:

   native public boolean supportsKhronosFP64(OpenCLDevice dev);
   native public boolean supportsAMDFP64(OpenCLDevice dev);

to OpenCLJNI.java, and the functions in the attached file to opencljni.cpp 
(though none of that is tested, or particularly efficient).

Original issue reported on code.google.com by jmaxg3@gmail.com on 11 Jan 2013 at 4:04

Attachments:

GoogleCodeExporter commented 9 years ago
There should also be an option to support Apple's proprietary FP64 extension as 
well.

Original comment by ryan.lam...@gmail.com on 11 Jan 2013 at 11:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I just hit the apple extensions as well. I am a little concerned that when 
different vendors add their own xxx_fp_64 extensions, I am not entirely sure 
what support they actually have. My guess is that something required for 
khr_fp_64 is *not* available.  Do we need to guard against all variations from 
the spec.  Maybe we can at least throw a warning message to the log.  

Original comment by frost.g...@gmail.com on 21 Jan 2013 at 3:20