KhronosGroup / KhronosGroup/OpenCL-Docs
Probem Determining Exported Symbols and Versions from cl.xml
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
I am trying to generate the icd_exports.map of the ICD loader from the cl.xml file. For now it seems impossible without substantial amount of hacks:
- gather commands present in the loader:
- gather ```commands.command``` nodes,
- filtering vendor specific functions,
- filter extensions functions that are not/have never been entry points in the loader:
- clIcdGetPlatformIDsKHR
- clCreateProgramWithILKHR
- clTerminateContextKHR
- clCreateCommandQueueWithPropertiesKHR
- clEnqueueMigrateMemObjectEXT
- find commands original OpenCL versions
- for non extensions, this can be obtained from the ```feature``` node ```version``` and their ```require.command``` nodes
- for non-deprecated extension functions, this can be obtained by scanning the corresponding ```commands.command``` node suffix
- you are left with clCreateFromGLTexture2D and clCreateFromGLTexture3D witch have CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED, so the scan assigns them as 1.1 whereas they are 1.0 functions
This seems a bit too convoluted. Nonetheless this process would be necessary to automatically generate a mock-up/intercept library, or bindings.
Several possibilities exist to alleviate the problem, here are some examples:
- For presence in the loader:
- add an attribute telling which function are entry points for the icd loader,
- For version of the API either
- add an attribute telling in which OpenCL version the symbols appeared. This would be redundant with some of the comments, but maybe that is not so much of an issue?
- add version information for all extensions (cl_khr_d3d11_sharing description in the xml doesn't state it appeared in 1.2)
I am unsure what the best course of actions would be here, or if I missed something obvious. Any thoughts on the matter?
Thanks,
Brice
Contributor guide
Assessment
This issue has not been assessed yet.