Skip to content

Add Microsoft CLC CLOn12 compiler stack

Jesse Natalie requested to merge jenatali/mesa:upstream/microsoft-clc into master

This is the OpenCL C compiler stack used by Microsoft's OpenCLOn12 implementation. It's a parallel OpenCL C -> NIR stack from Clover, with the added step of translating to DXIL afterwards using the already-merged nir_to_dxil code with some augmentations. See !7477 (merged) for that initial implementation.

This is the result of a lot of work from our downstream branch.

This MR contains a few commits from !7433 (closed), which have the net effect of enabling nir_var_mem_constant for nir_lower_vars_to_explicit_types. There's also some misc changes to core nir/vtn code which weren't found during our initial history search, but were found while debugging failures after rebasing. I can split those out if necessary.

This is not a completely functional CL stack, since it doesn't have printf support yet, which will come with !7357. It passes the set of functional tests we built for it as part of bringup, but hasn't been run through the CL CTS after rebasing -- though prior to rebasing we are more or less passing the full CL 1.2 CTS.

It likely contains some locally-duplicated functionality (e.g. the libclc loader) which can either be de-duplicated before or after merging, whichever people would prefer.

/cc @jekstrand @karolherbst @airlied

Merge request reports