Now I see that the problem is the API cannot be used through ICD, but in
OpenCL1.2 it is a vender extension.
Beignet may consider it a vendor extension, but ocl-icd doesn't:
anything with a KHR or EXT name goes through the "check the dispatch
table first" lookup process, whether or not it exists in the version of
OpenCL the ICD says it supports.
Should we use the ICD OpenCL2.0 API table of it?
If you mean my patch, yes.
Or maybe we should not use clGetExtensionFunctionForPlatform or
clGetExtensionFunction to get the API clGetKernelSubGroupInfoKHR?
The alternative of just calling clGetKernelSubGroupInfoKHR without such
a lookup also goes through the address table when used via ICD, so it
will have the same problem...plus the additional problem of being a
compile-time error on older versions of ocl-icd that don't know about
this function. (If you want to see the code that does this, build
ocl-icd then look in ocl_icd_loader_gen.c)
If you want the warning to go away, you'd need to update Beignet's
headers to 2.0+ (we already do that in Debian (for different reasons),
it doesn't change the 1.2 version Beignet reports via clGetDeviceInfo)
*and* use a stricter check (OCL_ICD_IDENTIFIED_FUNCTIONS > 120), or
suppress it via compiler option (though the latter might also suppress
the warning if you accidentally put a function in the wrong slot - I
haven't tried).
_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet