Clang error: cannot find libdevice for A; provide path to different CUDA installation via '--cuda-path', or pass '-nocudalib' to build without linking with libdevice (err_drv_no_cuda_libdevice)
Jump to navigation
Jump to search
Text | error: cannot find libdevice for A; provide path to different CUDA installation via '--cuda-path', or pass '-nocudalib' to build without linking with libdevice (since 14.0) error: cannot find libdevice for A. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice. (until 13.0) |
---|---|
Type | Error |
Category | None |
Internal Id | err_drv_no_cuda_libdevice |
Internal Message | cannot find libdevice for %0; provide path to different CUDA installation via '--cuda-path', or pass '-nocudalib' to build without linking with libdevice (since 14.0)cannot find libdevice for %0. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice. (until 13.0)
|
Regular Expression | (?:error|fatal error)\: cannot find libdevice for (.*?); provide path to different CUDA installation via '\-\-cuda\-path', or pass '\-nocudalib' to build without linking with libdevice
|
First Commit | 2016-08-03 02a1e973a80a [CUDA] Fix libdevice selection. |
Description
Example
Flags | -xcuda
|
|
---|---|---|
Source |
__device__ void f() { }
int main() { f(); }
// __device__ function called from host code
| |
Compiler Output |
clang++: error: cannot specify -o when generating multiple output files clang++: error: cannot find CUDA installation; provide its path via '--cuda-path', or pass '-nocudainc' to build without CUDA includes clang++: error: cannot find libdevice for sm_35; provide path to different CUDA installation via '--cuda-path', or pass '-nocudalib' to build without linking with libdevice clang++: error: cannot find CUDA installation; provide its path via '--cuda-path', or pass '-nocudainc' to build without CUDA includes |
Clang Internals (17.0.6)
Git Commit Message
[CUDA] Fix libdevice selection. This makes clang's libdevice selection match that of NVCC as described in http://docs.nvidia.com/cuda/libdevice-users-guide/basic-usage.html#version-selection If required libdevice variant is not found, driver now fails with an error. Differential Revision: https://reviews.llvm.org/D23037 llvm-svn: 277542
Used in Clang Sources
This section lists all occurrences of the diagnostic within the Clang's codebase. For each occurrence, an auto-extracted snipped from the source code is listed including key elements like control structures, functions, or classes. It should illustrate the conditions under which the diagnostic is activated.
clang/lib/Driver/ToolChains/Cuda.cpp (line 825)
void CudaToolChain::addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, Action::OffloadKind DeviceOffloadingKind) const {
// ...
if (LibDeviceFile.empty()) {
getDriver().Diag(diag::err_drv_no_cuda_libdevice) << GpuArch;