clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL
Apache License 2.0
839 stars 240 forks source link

clBLAS-client OpenCL Platform and Device Probing #130

Open naibaf7 opened 9 years ago

naibaf7 commented 9 years ago

clBLAS-client binary only probes the first platform found. This is really bad behavior, as I had to remove nVidia and Intel OpenCL ICDs to benchmark the AMD W9100 correctly. I would suggest that it should try to find the AMD platform first, then use that one (if present) and only fallback on other OpenCL implementations on any computer if AMD OpenCL is not present. That way, you ensure that users get the best experience with little configuration requirement.

Or, even better, do the probing similarly to how I do it in Caffe: https://github.com/naibaf7/caffe/blob/master/src/caffe/common.cpp (Functions EnumerateDevices() and SetDevices())

Then, --gpu and --cpu flags could be used together with a number to specify which device, as well as --devices should show a list of all available devices and their number.