[PATCH] D92004: [OpenCL] add CL 3.0 optional feature support to opencl-c.h

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 24 05:57:44 PST 2020


Anastasia added a subscriber: svenvh.
Anastasia added a comment.

> It will need some decent review and maybe some testing by other CL users to make sure I've haven't messed up when used with a fully featured CL 3.0 stack.

Clang functionality is expected to be tested in llvm-project and with OpenCL headers we are violating the process to be honest. Aside from that it slows down the development in my opinion because making larger changes is extremely hard without the testing. Relying on reviews is not great for various reasons. We constantly fix bugs related to the headers.

The biggest issue with testing that header originally was that the parsing of it is so slow - with only one test we have exceeded the acceptable limits immediately. However, to mitigate this problem there is no reason we couldn't add header testing conditioned on a CMake option passed during the build configuration. So by default only minimal functionality could be tested as it is done now but if some option is being passed to cmake (say `ENABLE_FULL_OPENCL_BIFS_TESTS`) we could do comprehensive testing of the header. If there is interest in such an approach we could start from just adding the tests related to OpenCL 3.0 changes and then slowly build more tests in the future.

Another area where such tests would be needed is for Tablegen header enabled by `-fdeclare-opencl-builtins` that is developed to replace the regular header eventually because it is much quicker to parse. @svenvh I imagine the testing functionality between the two headers will be identical?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92004/new/

https://reviews.llvm.org/D92004



More information about the cfe-commits mailing list