Re: Trouble running platform filter
Posted by HenryS on Feb 20, 2017; 12:34pm
URL: https://forum.jogamp.org/Trouble-running-platform-filter-tp4037629p4037644.html
It was a matter of imports indeed. Thanks for your help!
Results are interesting. I use a slightly adapted version of platformTest:
public void platformTest ()
{
final CLPlatform platformGPU = CLPlatform.getDefault(version(CL_1_0), type(GPU));
final CLPlatform platformCPU = CLPlatform.getDefault(version(CL_1_0), type(CPU));
if (platformGPU != null && platformGPU.listCLDevices(GPU).length > 0)
{
System.out.println (platformGPU.listCLDevices(GPU).length + " OpenCL GPU platform(s) present");
} // if
if (platformCPU != null && platformCPU.listCLDevices(CPU).length > 0);
{
System.out.println (platformCPU.listCLDevices(CPU).length + " OpenCL CPU platform(s) present");
} // if
} /*** platformTest ***/
That reports:
1 OpenCL GPU platform(s) present
1 OpenCL CPU platform(s) present
However, when in the same program 'enumerating' thru all platforms and for each platform thru all devices I get 2 CPU platforms:
Platform NVIDIA CUDA contains 1 devices
Device: CLDevice [id: 2716768 name: GeForce GTX 1060 6GB type: GPU profile: FULL_PROFILE]
Platform Intel(R) OpenCL contains 1 devices
Device: CLDevice [id: 151383568 name: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz type: CPU profile: FULL_PROFILE]
Platform AMD Accelerated Parallel Processing contains 1 devices
Device: CLDevice [id: 151784080 name: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz type: CPU profile: FULL_PROFILE]
I have 2 exactly the same CPU platforms present. CLPlatform.getDefault(version(CL_1_0), type(CPU)) does not see that. The AMD drivers have the tendency to act as drivers for the Intel CPU's as well. And they are not so performant as the Intel drivers. In the benchmark they are about 3.5 as slow for complex tasks compared to the Intel drivers.