cuda_learn_record
刷了一遍谭升的cuda教程,这里记录一些自己的心得体会和关键点。
cuda工具使用
======== Warning: Skipping profiling on device 0 since profiling is not supported on devices with compute capability 7.5 and higher.
Use NVIDIA Nsight Compute for GPU profiling and NVIDIA Nsight Systems for GPU tracing and CPU sampling.
Refer https://developer.nvidia.com/tools-overview for more details.
多维度数组寻址
在进行并行编程,如cuda编程,进行grid、block、thread等索引和实际的计算多维数组对应时,如模型输出后对内存上的输出排列按照特定的数组结构进行分解时,往往都会设计数组地址的计算。
在内存中,数据都是一维度线性存在的,但我们在写程序时,往往会按照二维、多维的逻辑进行计算,这就涉及到底层一点的代码,会有多维索引和实际内存地址的相互转换。
cmake 配置 cuda支持
对于c/c++而言,编译cuda可以使用nvcc工具直接命令行进行编译,不过对于大型工程,还是需要利用cmake进行管理,下面介绍一下cmake如何配置cuda。
利用github.io搭建自有博客 next v6 v8
利用github.io搭建自有博客,基于hexo博客框架和next主题。
搭建这个blog框架吧,一是觉得csdn不好用,反正有一段时间特别卡,编辑界面出不来;二是觉得托管到上边没有github那种掌控感,反正csdn没有提供导出文章为md的功能,还得自己用工具把html转换为md,而且广告贼多,就感觉自己被白嫖了。索性研究一下搭建自己的blog。
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.