nvcc

Compiling using nvcc gives “No such file or directory”

◇◆丶佛笑我妖孽 提交于 2021-02-17 06:07:34
问题 I'm trying to compile CUDA code using nvcc on Ubuntu. However, when I do, I get this output: > make /usr/local/cuda/bin/nvcc -m64 --ptxas-options="-v" -gencode arch=compute_11,code=sm_11 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -o main main.cu gcc: No such file or directory make: *** [main] Error 1 Even when I'm trying to compile a file with only a main function in it, it still doesn't work:

Compiling using nvcc gives “No such file or directory”

耗尽温柔 提交于 2021-02-17 06:04:10
问题 I'm trying to compile CUDA code using nvcc on Ubuntu. However, when I do, I get this output: > make /usr/local/cuda/bin/nvcc -m64 --ptxas-options="-v" -gencode arch=compute_11,code=sm_11 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -o main main.cu gcc: No such file or directory make: *** [main] Error 1 Even when I'm trying to compile a file with only a main function in it, it still doesn't work:

NVCC overriding a MSVC flag (EHs)

懵懂的女人 提交于 2021-02-11 15:17:30
问题 To compile my source correctly on Windows, I need to pass the EHs flag to MSVC. This is usually straight forward: cl -EHs -c ... When building for GPU acceleration, I need nvcc to pass this flag along when it invokes cl under the hood. I simply do: nvcc -dc -ccbin cl -Xcompiler -EHs ... yet cl throws a warning: warning C4297: 'someFuncInMyCode': function assumed not to throw an exception but does note: The function is extern "C" and /EHc was specified It seems cl receives the flag EHc ,

NVCC overriding a MSVC flag (EHs)

99封情书 提交于 2021-02-11 15:16:39
问题 To compile my source correctly on Windows, I need to pass the EHs flag to MSVC. This is usually straight forward: cl -EHs -c ... When building for GPU acceleration, I need nvcc to pass this flag along when it invokes cl under the hood. I simply do: nvcc -dc -ccbin cl -Xcompiler -EHs ... yet cl throws a warning: warning C4297: 'someFuncInMyCode': function assumed not to throw an exception but does note: The function is extern "C" and /EHc was specified It seems cl receives the flag EHc ,

How can I specify a minimum compute capability to the mexcuda compiler to compile a mexfunction?

匆匆过客 提交于 2021-02-05 08:19:29
问题 I have a CUDA project in a .cu file that I would like to compile to a .mex file using mexcuda . Because my code makes use of the 64-bit floating point atomic operation atomicAdd(double *, double) , which is only supposed for GPU devices of compute capability 6.0 or higher, I need to specify this as a flag when I am compiling. In my standard IDE, this works fine, but when compiling with mexcuda , this is not working as I would like. In this post on MathWorks, it was suggested to use the

CUDA nvcc building chain of libraries

心不动则不痛 提交于 2021-01-29 00:16:39
问题 My goal is: library2.so is using library1.so and mycode.o is using (libs should be linked) library2.so (and maybe library1.so ). The source code is (one line header files are omitted): library1.cu: __device__ void func1_lib1(void){} library2.cu: #include "library1.h" __global__ void func1_lib2(void) { func1_lib1(); } extern "C" void func2_lib2(void) { func1_lib2<<<1,1>>>(); } mycode.c: #include "library2.h" int main(void) { func2_lib2(); } I'm building the shared libraries according to with

CUDA nvcc building chain of libraries

孤街浪徒 提交于 2021-01-29 00:09:35
问题 My goal is: library2.so is using library1.so and mycode.o is using (libs should be linked) library2.so (and maybe library1.so ). The source code is (one line header files are omitted): library1.cu: __device__ void func1_lib1(void){} library2.cu: #include "library1.h" __global__ void func1_lib2(void) { func1_lib1(); } extern "C" void func2_lib2(void) { func1_lib2<<<1,1>>>(); } mycode.c: #include "library2.h" int main(void) { func2_lib2(); } I'm building the shared libraries according to with

CUDA nvcc building chain of libraries

你离开我真会死。 提交于 2021-01-29 00:05:09
问题 My goal is: library2.so is using library1.so and mycode.o is using (libs should be linked) library2.so (and maybe library1.so ). The source code is (one line header files are omitted): library1.cu: __device__ void func1_lib1(void){} library2.cu: #include "library1.h" __global__ void func1_lib2(void) { func1_lib1(); } extern "C" void func2_lib2(void) { func1_lib2<<<1,1>>>(); } mycode.c: #include "library2.h" int main(void) { func2_lib2(); } I'm building the shared libraries according to with