在 3.9 版本加入.
将 CUDA 源代码编译为 .ptx 文件,而不是 对象库 中的 .obj 文件。
.ptx
.obj
例如:
add_library(myptx OBJECT a.cu b.cu) set_property(TARGET myptx PROPERTY CUDA_PTX_COMPILATION ON)
CUDA_扩展
CUDA_RESOLVE_DEVICE_SYMBOLS