Skip to content

Instantly share code, notes, and snippets.

@srivathsanmurali
Last active November 3, 2021 14:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save srivathsanmurali/c4da1f2b3d531c385ffcce3f799c25a6 to your computer and use it in GitHub Desktop.
Save srivathsanmurali/c4da1f2b3d531c385ffcce3f799c25a6 to your computer and use it in GitHub Desktop.
Compileing CUDA with dynamic parllelism using CMAKE

Dynamic parallelism using CUDA and CMAKE

Requirements:

  • compute_35 or higher cards. I am using Pascal (compute_61)

CMAKE MAGIC

  • set(CUDA_SEPARABLE_COMPILATION TRUE)
  • list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_61,code=sm_51;)
  • target_link_libraries(yourCudaLib ${CUDA_cudadevrt_LIBRARY}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment