OpenCL-CTS icon indicating copy to clipboard operation
OpenCL-CTS copied to clipboard

No explicit coverage of using multiple kernels created from the same source program with different builds

Open kpet opened this issue 1 year ago • 0 comments

OpenCL programs can be built multiple times, with different options that can affect the behaviour of the kernels. We do not, AFAICT, test this explicitly in the CTS.

Suggested test:

  • Create two buffers
  • Create a program from source (the source contains a single kernel that writes a value defined by a preprocessor macro into a buffer)
  • Build the program, setting the macro to one value
  • Create a kernel from the program
  • Enqueue the kernel, with buffer 1 as a parameter
  • Build the program again, setting the macro to a different value
  • Create a kernel from the program
  • Enqueue the kernel, with buffer 2 as a parameter
  • Call clFinish on the queue
  • Check that both buffers contain different values and the right value for each kernel

Also consider adding a variant using clCompileProgram/clLinkProgram.

kpet avatar Nov 26 '24 19:11 kpet