Home > CUDA > Compiling CUDA Projects with Dynamic Parallelism (VS 2012/13)

Compiling CUDA Projects with Dynamic Parallelism (VS 2012/13)

Just a quick note.
If you are starting from a template C++ CUDA project in VS 2012/2013, calling a kernel from a kernel (dynamic parallelism) would not compile:

error : kernel launch from __device__ or __global__ functions requires separate compilation mode

To fix this, first make sure your hardware supports it (cc 3.5 or higher) and compute capability is set correctly in the compiler options (“compute_35,sm_35”)

fourth

Then set -rdc=true in CUDA C++ options:

compiler

Then add cudadevrt.lib to the libraries that are statically linked in the Linker options:

linker

Categories: CUDA
  1. Alexey
    February 5, 2016 at 2:54 pm

    Thanks a lot.It works!

  2. November 26, 2016 at 1:13 pm

    Thank you

  3. Yan Bellavance
    July 14, 2017 at 10:53 pm

    thanks!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: