[PATCH] D151904: [clang-repl][CUDA] Add an unit test for interactive CUDA
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 1 10:32:34 PDT 2023
tra added inline comments.
================
Comment at: clang/unittests/Interpreter/InteractiveCudaTest.cpp:92
+ std::unique_ptr<clang::Interpreter> Interp = createInterpreter();
+ auto Err = Interp->LoadDynamicLibrary("libcudart.so");
+ if (Err) { // CUDA runtime is not installed/usable, cannot continue testing
----------------
This could be a bit of a problem.
There may be multiple CUDA SDK versions that may be installed on a system at any given time and the libcudart.so you pick here may not be the one you want.
E.g it may be from a recent CUDA version which is not supported by NVIDIA drivers yet.
I think you may need a way to let the user override CUDA SDK (or libcudart.so) location explicitly. I guess they could do that via LD_LIBRARY_PATH, but for the CUDA compilation in general, knowing CUDA SDK path is essential, as it does affect various compilation options set by the driver.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151904/new/
https://reviews.llvm.org/D151904
More information about the cfe-commits
mailing list