| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| return (dev.getInfo<CL_DEVICE_DOUBLE_FP_CONFIG>() > 0); | ||
| // 64bit fp is an optional extension | ||
| return (dev.getInfo<CL_DEVICE_EXTENSIONS>().find("cl_khr_fp64") != | ||
| string::npos); |
There was a problem hiding this comment.
👍🏾
Although I wonder if the vendor implementation caches the device type support in internal cache. If cached in such manner, then fetching that compared to doing a string search is more efficient.
Sorry, something went wrong.
There was a problem hiding this comment.
I will get through the debugger step by step and report what I find.
Sorry, something went wrong.
There was a problem hiding this comment.
I have the impression that it is straight copy into a vector.
For NVIDIA
The complete string is cached in the driver. Copy happens in cl2.hpp at line 1427.
Although I can not see inside the function, I come to this conclusion because the exact length is provided upfront during the construction of the vector.
Sorry, something went wrong.
16fp and 64fp are optional extensions to OpenCL. The CONFIG's only exists when the extension is available. It is therefore better to check the availability of the extension, so that no errors are thrown (and have to treated). + Cleanup of compiler warnings.
| Back | FazBrowse Home | New Git URL |
CL_DEVICE_HALF_FP_CONFIG only exists when the extension cl_khr_fp16 is available.
Description
Instead of testing on the CONFIGURATION, it is better to directly test if the extensions (fp16 & fp64) are available so that no exceptions are thrown.
While updating the file, I added explicit conversions to eliminate compiler warnings, so that later real warnings jump in the eye.
Changes to Users
No changes to end-users.
Checklist
- [ ] Functions added to unified API
- [ ] Functions documented