nvlink

NVCC won't look for libraries in /usr/lib/x86_64-linux-gnu - why?

淺唱寂寞╮ 提交于 2020-01-07 09:23:24
问题 Consider the following CUDA program, in a file named foo.cu : #include <cooperative_groups.h> #include <stdio.h> __global__ void my_kernel() { auto g = cooperative_groups::this_grid(); g.sync(); } int main(int, char **) { cudaLaunchCooperativeKernel( (const void*) my_kernel, 2, 2, nullptr, 0, nullptr); cudaDeviceSynchronize(); } This program needs to be compiled with -rdc=true (see this question); and needs to be explicitly linked against libcudadevrt . Ok, no problem... or is it? $ nvcc -rdc