cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

et1
Adept II

Bug in platform detection in APP SDK samples

There's a bug in the validation of having a GPU in CLCommandArgs::validatePlatformAndDeviceOptions(). This results in the message "GPU not found. Falling back to CPU device" when running the program.

The bug is in setting 'gpu = false' when a GPU device isn't found (line 1383 of CLUtil.hpp). If there's a platform with no GPU, gpu will be set to false even though there's another platform that does have a GPU. Common example: both AMD and Intel OpenCL drivers are installed.

This can be solved by inverting the logic: start with 'gpu = false', then set 'gpu = true' and break when a GPU platform is found.

Tags (2)
0 Kudos
Reply
1 Reply
dipak
Staff
Staff

Re: Bug in platform detection in APP SDK samples

Thanks for pointing out the code section and your suggestion. I've already passed it to sdk team and hope, it'll be fixed in next release.

Regards,

0 Kudos
Reply