本文章主要是记录,cuda 编程过程中遇到的相关概念,名字解释和问题;主要是是用来备忘:
- cuda PTX :并行线程执行(Parallel Thread eXecution,PTX)代码是编译后的GPU代码的一种中间形式,它可以再次编译为原生的GPU微码。
- 下面几条链接,是对nvcc 编译过程中,编译参数的解释:-gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61;本编译参数适用于 1080ti显卡;此种模式为cuda fatbinary模式,用于优化cudabin的执行;
- https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#virtual-architecture-feature-list
- https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list
- nvcc 编译过程理解:https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-compilation
-
上图是:Two-Staged Compilation with Virtual and Real Architectures,详细情况,请看上面链接;
-
上图是:Just-in-Time Compilation of Device Code
- https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#fatbinaries (CUDA fatbinaries 模式)
- https://www.cnblogs.com/zjutzz/p/10272424.html (nvcc 与 C++ 混合编译Demo, 较为优秀)
保持更新,更多内容,请关注 cnblogs.com/xuyaowen;