Skip to content

Instantly share code, notes, and snippets.

@srivathsanmurali
Last active August 12, 2024 15:47
Show Gist options
  • 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