pocl icon indicating copy to clipboard operation
pocl copied to clipboard

Implement cl_nv_compiler_options

Open isuruf opened this issue 1 year ago • 2 comments

See https://registry.khronos.org/OpenCL/extensions/nv/cl_nv_compiler_options.txt

These are device specific compiler options and currently lib/CL/pocl_build.c doesn't seem to support adding them. I guess I could store the values in pocl_cuda_kernel_data_t, but how to store there while in pocl_build.c is something I don't know how to do. Any pointers?

isuruf avatar May 25 '23 01:05 isuruf

I think we need a device layer hook function for validating device-specific flags that is called before the parser's else branch and then you can just pass them to build_source().

pjaaskel avatar May 25 '23 07:05 pjaaskel

Since clBuildProgram can be called on multiple devices of the context, we need to call the hook for all devices, and fail the build if any device doesn't have the hook or doesn't recognize any of the flags. So maybe simpler first to parse & separate the unknown flags into a string, then call the hook for each device with that string.

franz avatar May 25 '23 08:05 franz