4 ms·
Does the LLVM IR output from the JIT compiler have to then be compiled to CUDA PTX with nvcc? I looked a while back for a JIT compiler for CUDA, but didn't find
by jclay 8y ago
Does the LLVM IR output from the JIT compiler have to then be compiled to CUDA PTX with nvcc? I looked a while back for a JIT compiler for CUDA, but didn't find much.
- tmostak 8y agoLLVM actually has a native PTX backend, NVPTX, but since the Nvidia ISA is proprietary we use the CUDA driver API to generate the binary for the target GPU arch. (see here in MapD where it generates the PTX from the LLVM IR: https://github.com/omnisci/mapd-core/blob/ae88c486d1d790db54885605349b882203b2bb73/QueryEngine/NativeCodegen.cpp#L613 https://github.com/omnisci/mapd-core/blob/ae88c486d1d790db54..., and here for where it calls the driver API to generate the native code: https://github.com/omnisci/mapd-core/blob/568e77d9c9706049eeccd32846387f4e042588d0/QueryEngine/NvidiaKernel.cpp#L83 https://github.com/omnisci/mapd-core/blob/568e77d9c9706049ee...)