At a high-level, what I’m looking for boils down to: how do I find more details on how the (Nvidia) OpenCL compilation process works? My belief is that the equivalent of the “-keep” option will lead me to this, but I haven’t been able to find one thus far.
I know that in OpenCL we use clBuildProgram() and clCreateProgramWithSource, WithBinary, etc. to build the program, but I haven’t been able to find any details on how these steps themselves work. Do they create any intermediate files? If so, is there a compiler option we can pass in to keep these files around? In CUDA, we can look at these intermediate files using the “-keep” option, and it seems like there should be an equivalent option in OpenCL. However, since it’s doing the compilation JIT, maybe such an option isn’t possible?
I know that I can get the PTX version by using clGetProgramInfo() with CL_PROGRAM_BINARIES + CL_PROGRAM_BINARY_SIZES and printing that to a file, but I would like to be able to see the other equivalent files (e.g. the .cu.cpp equivalent, etc.).
Thanks for any pointers you may have.