nvcc

Specify compiler NVCC uses to compile host-code

余生颓废 提交于 2019-12-05 17:31:39
When running nvcc, it always uses the Visual C++ compiler ( cl.exe ). How can I make it use the GCC compiler? Setting the CC environment-variable to gcc didn't fix it. I also couldn't find any option for this in the executeables help-output. On Windows, NVCC only supports the Visual C++ compiler (cl.exe) for host compilation. You can of course compile .cpp (non-CUDA) code using GCC and link the objects with objects generated by nvcc. 来源: https://stackoverflow.com/questions/12117779/specify-compiler-nvcc-uses-to-compile-host-code

Nvcc has different version than CUDA

China☆狼群 提交于 2019-12-05 10:04:44
I got installed cuda 7, but when I hit nvcc --version, it prints out 6.5. I would like to install Theano library on GTX 960 card, but it needs nvcc 7.0. Ive tried reinstall cuda, but it didn't update nvcc. When I run apt-get install nvidida-cuda-toolkit, it instals only 6.5. How can I update nvcc to version 7.0 ? Please follow the official installation guide to uninstall your current cuda environment and then install the lateest CUDA developing environment, it includes cudaSDK, cudatoolkit and driver. 来源: https://stackoverflow.com/questions/34319877/nvcc-has-different-version-than-cuda

\"don't know what to do with' nvcc fatal error

佐手、 提交于 2019-12-05 10:02:16
I use the command lines in Ubuntu's terminal. And I am trying to compile the three files presented in CUDA_Compiler_Driver_NVCC.pdf When I do use the command line given by the documentation on these 3 files, I do get the following errors: nvcc fatal : don't know what to do with'-dc' If I erase -dc in the command line, I do get the following error too: nvcc fatal : don't know what to do with'-arch=sm=20' Do anyone know how I could fix this issue ? Thanks a lot in advance for your help Gibo Below, you will find the command line I entered in the terminal, and the files. Command line used: nvcc

CUDA/PTX 32-bit vs. 64-bit

浪尽此生 提交于 2019-12-05 06:02:51
CUDA compilers have options for producing 32-bit or 64-bit PTX. What is the difference between these? Is it like for x86, NVidia GPUs actually have 32-bit and 64-bit ISAs? Or is it related to host code only? Robert Crovella Pointers are certainly the most obvious difference . 64 bit machine model enables 64-bit pointers. 64 bit pointers enable a variety of things, such as address spaces larger than 4GB, and unified virtual addressing . Unified virtual addressing in turn enables other things, such as GPUDirect Peer-to-Peer . The CUDA IPC API also depends on 64 bit machine model. The x64 ISA is

How Can I use my GPU on Ipython Notebook?

南笙酒味 提交于 2019-12-05 05:21:56
OS : Ubuntu 14.04LTS Language : Python Anaconda 2.7 (keras, theano) GPU : GTX980Ti CUDA : CUDA 7.5 I wanna run keras python code on IPython Notebook by using my GPU(GTX980Ti) But I can't find it. I want to test below code. When I run it on to Ubuntu terminal, I command as below (It uses GPU well. It doesn't have any problem) First I set the path like below export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH Second I run the code as below THEANO_FLAGS='floatX=float32,device=gpu0,nvcc.fastmath=True' python myscript.py And it runs well. But when i

Completely disable optimizations on NVCC

拜拜、爱过 提交于 2019-12-05 02:55:46
问题 I'm trying to measure peak single-precision flops on my GPU, for that I'm modifying a PTX file to perform successive MAD instructions on registers. Unfortunately the compiler is removing all the code because it actually does nothing usefull since I do not perform any load/store of the data. Is there a compiler flag or pragma to add to the code so the compiler does not touch it? Thanks. 回答1: I don't think there is any way to turn off such optimization in the compiler. You can work around this

undefined reference error for linking CUDA static or shared library with gcc

こ雲淡風輕ζ 提交于 2019-12-04 22:28:22
问题 gcc and CUDA question Hi, I have compiled a CUDA shared library but can't link it with the main program that uses it. I am compiling the main program with gcc. The code: simplemain.c #include <stdio.h> #include <stdlib.h> void fcudadriver(); int main() { printf("Main \n"); fcudadriver(); return 0; } test.cu __global__ void fcuda() { } void fcudadriver() { fcuda<<<1,1>>>(); } I compile test.cu as --> It works nvcc --compiler-options '-fPIC' -o libtest.so --shared test.cu I compile simplemain.c

NVCC CUDA cross compiling cannot find “-lcudart”

£可爱£侵袭症+ 提交于 2019-12-04 19:17:17
I have installed CUDA 5.0 and NVCC on my Ubuntu virtual machine and have had problems compiling even a basic CUDA C program. The error is as follows: user@ubuntu:~/CUDA$ nvcc helloworld.cu -o helloworld.o -target-cpu-arch=ARM -ccbin=/usr/bin/arm-linux-gnueabi-gcc-4.6 --machine=32 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /usr/local/cuda-5.0/bin/../lib/libcudart.so when searching for -lcudart /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libcudart.so when searching for -lcudart /usr

CUDA 5.0: CUBIN and CUBLAS_device, compute capability 3.5

混江龙づ霸主 提交于 2019-12-04 12:10:33
I'm trying to compile a kernel that uses dynamic parallelism to run CUBLAS to a cubin file. When I try to compile the code using the command nvcc -cubin -m64 -lcudadevrt -lcublas_device -gencode arch=compute_35,code=sm_35 -o test.cubin -c test.cu I get ptxas fatal : Unresolved extern function 'cublasCreate_v2 If I add the -rdc=true compile option it compiles fine, but when I try to load the module using cuModuleLoad I get error 500: CUDA_ERROR_NOT_FOUND. From cuda.h: /** * This indicates that a named symbol was not found. Examples of symbols * are global/constant variable names, texture names,

Caffe compilation fails due to unsupported gcc compiler version

倖福魔咒の 提交于 2019-12-04 09:50:39
I struggle with Caffe compilation. Unfortunately I failed to compile it. Steps I followed: git clone https://github.com/BVLC/caffe.git cd caffe mkdir build cd build cmake .. make all Running make all fails with the following error message: [ 2%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/util/cuda_compile_generated_im2col.cu.o In file included from /usr/include/cuda_runtime.h:59:0, from <command-line>:0: /usr/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported! #error -- unsupported GNU version! gcc 4.9 and up are not