I am doing a study on the TVM project as a part of my internship. One area where I am a little confused is how or if TVM makes use of LLVM while compiling for Cuda. As per the diagram given here, in this link , TVM can target either LLVM or Cuda. But running the tutorial example here, the script required me to have LLVM backend enabled. Could you please point me in the right direction to get a better idea about LLVM and Cuda interact with each other.
Yes, even for CUDA target, the host side code needs to be generated. For that, LLVM is used. In this case, LLVM will not be involved in device code generation.
Thanks for the reply. I am still not clear why you need to generate host side code for cuda. As per the diagram, I was under the impression that TVM can directly compile to Cuda code. Can you clarity?
Everything else besides CUDA kernels - memory alloc, kernel launch, error handling, etc… need to be done by host. This is where LLVM comes in.