[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 4 10:47:40 PDT 2023


v.g.vassilev added a subscriber: SimeonEhrig.
v.g.vassilev added inline comments.


================
Comment at: clang/tools/clang-repl/ClangRepl.cpp:137
+
+    ExitOnErr(Interp->LoadDynamicLibrary("libcudart.so"));
+  } else
----------------
tra wrote:
> Is there any doc describing the big picture approach to CUDA REPL implementation and how all the pieces tie together?
> 
> From the patch I see that we will compile GPU side of the code to PTX, pack it into fatbinary, but it's not clear now do we get from there to actually launching the kernels. Loading libcudart.so here also does not appear to be tied to anything else. I do not see any direct API calls, and the host-side compilation appears to be done w.o passing the GPU binary to it, which would normally trigger generation of the glue code to register the kernels with CUDA runtime. I may be missing something, too.
> 
> I assume the gaps will be filled in in future patches, but I'm still curious about the overall plan.
> 
> 
Hi @tra, thanks for asking. Our reference implementation was done in Cling a while ago by @SimeonEhrig. One of his talks which I think describes well the big picture could be found here: https://compiler-research.org/meetings/#caas_04Mar2021


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146389/new/

https://reviews.llvm.org/D146389



More information about the cfe-commits mailing list