pocl
pocl copied to clipboard
Implement cl_nv_compiler_options
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?
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().
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.