Hi ,everyone.
I am recently reading opencl spec, but I want to know more details about opencl compiler. I wonder how on earth it realize JIT, and how it relates to LLVM?
Has anyone tell how to find more detailed doc about opencl compiler?
Thanks!
i dont know why you assume, there’s a jit compiler in the opencl implementation. it’s a kind of jit compiling cz. the kernel source is usually packed to the program to compile it optimized for the graphic card since even different nvidia cards have different instruction sets. but the compilation does not take place at kernel runtime. it happens before executing the kernel.
i dont have a concrete answer for the usage of llvm. maybe it’s just easier to use an free program where all the program optimization stuff is already included.
ps: there’s no more information about the opencl compiler than in the opencl doc.
the other switches to the compiler are vendor specific. for nvidia compilers, you get the additional flags by appending --help to the compiler
(as i experienced, those flags for nvidia gpus are not working with the current sdk. maybe someone else can confirm this.)