[cfe-dev] SPIR target enables all CL optional extensions

David Airlie via cfe-dev cfe-dev at lists.llvm.org
Tue Jul 6 20:29:23 PDT 2021


Hi,

I'm trying to bring back up the mesa CL 3.0 support at the moment, and
running into a problem I'm not sure how to solve.

There has been some work around optional CL 3.0 features at the
compiler level, but one of the things is the SPIR backend now always
enables all optional CL 3.0 features, but for current mesa I'd like to
expose CL3.0 with no optional features but still use the SPIR target.

For example now tests like ./basic/test_basic vector_swizzle

testing type char3

ends in a lot of these.

Build log for device "llvmpipe (LLVM 13.0.0, 256 bits)" is: ------------
input.cl:13:5: error: no matching function for call to 'vstore3'
/home/cldrv/lib/clang/13.0.0/include/opencl-c.h:11502:13: note:
candidate function not viable: cannot pass pointer to address space
'__global' as a pointer to address space '__private' in 3rd argument

This is because the generic address space defines are being enabled
for all SPIR targets, for our use case I'd rather control that from
the Mesa side or have some way to restrict these options, is something
like that available?

Dave.



More information about the cfe-dev mailing list