Questions tagged [nvcc]

"nvcc" is NVIDIA's LLVM-based C/C++ compiler for targeting GPUs with CUDA.

This tag refers to NVIDIA’s compiler toolchain nvcc for the parallel computing architecture (CUDA). Documentation for nvcc is included with the CUDA Toolkit.

You should ask questions about CUDA here on Stack Overflow, but if you have bugs to report you should discuss them on the CUDA forums or report them via the registered developer portal. You may want to cross-link to any discussion here on Stack Overflow.

688 questions
7
votes
5 answers

CUDA: NVCC gives controlling expression is constant warning on assert

I get the warning controlling expression is constant on assert statement like this: assert(... && "error message"); Why this warning on this assert? How can I suppress this warning? NVCC is the NVIDIA cuda compiler, I think it is based on LLVM. Why…
Anycorn
  • 50,217
  • 42
  • 167
  • 261
7
votes
1 answer

NVCC warning level

I would like NVCC to treat the warning below as an error: warning : calling a __host__ function("foo") from a __host__ __device__ function("bar") NVCC documentation "NVIDIA CUDA Compiler Driver NVCC" doesn't even contain the word "warning".
7
votes
2 answers

NVCC 5.0 and OpenACC

According to NVIDIA website: "The CUDA Toolkit complements and fully supports programming with OpenACC directives." Does this mean OpenACC programs (pargma and API) can be compiled with nvcc compiler? Or it means only runtime routine calls are…
lashgar
  • 5,184
  • 3
  • 37
  • 45
7
votes
1 answer

Does CUDA applications' compute capability automatically upgrade?

If I compile a CUDA program with a lower Compute Capability, e.g 1.3 (nvcc flag sm_13), and run it on a device with Compute Capability 2.1, will it exploit the features of Compute 2.1 or not? In that situation, Will the compute 2.1 device behave…
sgarizvi
  • 16,623
  • 9
  • 64
  • 98
7
votes
1 answer

/usr/bin/ld: Dwarf Error

I'm trying to compile a complex application with nvcc, and a need to change the compiler from mpic++ to g++, since that I'm having this error: /usr/bin/ld: Dwarf Error: found dwarf version '3', this reader only handles version 2 information. What is…
RSFalcon7
  • 2,241
  • 6
  • 34
  • 55
6
votes
1 answer

CMake: pass list of compiler flags through NVCC

I am trying to compile some CUDA and I wish to display compiler warnings. Equivalent to: g++ fish.cpp -Wall -Wextra Except NVCC doesn't understand these, and you have to pass them through: nvcc fish.cu --compiler-options -Wall --compiler-options…
Edd Inglis
  • 1,067
  • 10
  • 22
6
votes
2 answers

tensorflow error This file requires compiler and library support for the ISO C++ 2011 standard

The result is below,I run the project stylegan2, but it fails. So I need help. The link is https://github.com/NVlabs/stylegan2 File "/home/ubuntu/workspaces/workspace_lsh/stylegan2/dnnlib/tflib/network.py", line 154, in _init_graph out_expr =…
hhhhhhhhhh
  • 71
  • 1
  • 2
6
votes
2 answers

building a pybind11 module with cpp and cuda sources using cmake

I'm trying to generate python bindings for a dummy class which needs to be compiled with a cuda enabled compiler. I'm using cmake 3.12.0, pybind11 v2.2.3 and nvcc 7.5.17. Compilation fails because options like -flto and -fno-fat-lto-objects are…
gravy
  • 121
  • 1
  • 6
6
votes
1 answer

Is there any documentation for NVCC's `#pragma nv_exec_check_disable` and/or `#pragma hd_warning_disable`?

Some projects use #pragma nv_exec_check_disable and/or #pragma hd_warning_disable to silence NVCC warnings about warning: calling a __host__ function from a __host__ __device__ function is not allowed` However they seem completely…
fwyzard
  • 2,364
  • 1
  • 21
  • 19
6
votes
1 answer

NVCC - host compiler targets unsupported OS

I've been trying to get CUDA working on my PC. I tried clean (re-)installing the latest drivers and CUDA as well as latest Visual Studio 2017 RC Build Tools. My operating system is Windows 10 (64-bit) build 14393.693, GPU is GTX 1060 6GB (Driver…
Sina Madani
  • 1,246
  • 3
  • 15
  • 27
6
votes
2 answers

nvcc fatal : Value 'sm_61' is not defined for option 'gpu-architecture' error with theano

I was setting up python and theano for use with gpu on; ubuntu 14.04, GeForce GTX 1080 already installed NVIDIA driver (367.27) and CUDA toolkit (7.5) successfully for the system, but on testing with theano gpu implementation I get the above error…
Joshua Owoyemi
  • 1,827
  • 1
  • 10
  • 7
6
votes
1 answer

CUDA/C++ - linking error : undefined reference to

I'm a newbie looking for help with linking some compiled CUDA object code to a C++ project using g++. There have been some previous questions and solutions for this posted (here and here), but none have worked for me yet and I can't seem to figure…
Geoff M
  • 91
  • 1
  • 1
  • 2
6
votes
1 answer

CUDA: nvcc cannot be detected though installed

I successfully installed CUDA 7.0 on ubuntu(ami instance), but when I typed 'nvcc -version', it told me that The program 'nvcc' is currently not installed. You can install it by typing: apt-get install nvidia-cuda-toolkit You will have to enable the…
Yiqun Liu
  • 503
  • 2
  • 5
  • 14
6
votes
1 answer

Why am I getting "nvcc fatal : redefinition of argument 'optimize'"?

I am trying to compile on MacBook Pro Retina with CUDA Driver Version: 7.0.36 and cuda toolkit 7.0 in a nVidia GT 750 M, the following code with its makefile but it gives me this error: nvcc fatal : redefinition of argument 'optimize'. Despite…
6
votes
1 answer

How can I dump all NVCC preprocessor defines?

I want to achieve the same effect as gcc -dM -E - < /dev/null (as described here) - but for nvcc. That is, I want to dump all of nvcc's preprocessor defines. Alas, nvcc doesn not support -dM. What do I do instead?
einpoklum
  • 118,144
  • 57
  • 340
  • 684