天天看点

《CUDA C编程权威指南》——导读

《CUDA C编程权威指南》——导读

###前  言

欢迎来到用cuda c进行异构并行编程的奇妙世界!

现代的异构系统正朝一个充满无限计算可能性的未来发展。异构计算正在不断被应用到新的计算领域—从科学到数据库,再到机器学习的方方面面。编程的未来将是异构并行编程的天下!

本书将引领你通过使用cuda平台、cuda工具包和cuda c语言快速上手gpu(图形处理单元)计算。本书中设置的范例与练习也将带你快速了解cuda的专业知识,助你早日达到专业水平!

[第1章 基于cuda的异构并行计算

1.1.1 串行编程和并行编程

1.1.2 并行性

1.1.3 计算机架构

<a href="https://yq.aliyun.com/articles/118155/">1.2 异构计算</a>

1.2.1 异构架构

1.2.2 异构计算范例

1.2.3 cuda:一种异构计算平台

<a href="https://yq.aliyun.com/articles/118162/">1.3 用gpu输出hello world</a>

<a href="https://yq.aliyun.com/articles/118164/">1.4 使用cuda c编程难吗</a>

<a href="https://yq.aliyun.com/articles/118167/">1.5 总结</a>

<a href="https://yq.aliyun.com/articles/118171/">1.6 习题</a>

[第2章 cuda编程模型

2.1.1 cuda编程结构

2.1.2 内存管理

2.1.3 线程管理

2.1.4 启动一个cuda核函数

2.1.5 编写核函数

2.1.6 验证核函数

2.1.7 处理错误

2.1.8 编译和执行

<a href="https://yq.aliyun.com/articles/118215/">2.2 给核函数计时</a>

2.2.1 用cpu计时器计时

2.2.2 用nvprof工具计时

<a href="https://yq.aliyun.com/articles/118233/">2.3 组织并行线程</a>

2.3.1 使用块和线程建立矩阵索引

2.3.2 使用二维网格和二维块对矩阵求和

2.3.3 使用一维网格和一维块对矩阵求和

2.3.4 使用二维网格和一维块对矩阵求和

<a href="https://yq.aliyun.com/articles/118243/">2.4 设备管理</a>

2.4.1 使用运行时api查询gpu信息

2.4.2 确定最优gpu

2.4.3 使用nvidia-smi查询gpu信息

2.4.4 在运行时设置设备

<a href="https://yq.aliyun.com/articles/118248/">2.5 总结</a>

<a href="https://yq.aliyun.com/articles/118249/">2.6 习题</a>

[第3章 cuda执行模型

3.1.1 gpu架构概述

3.1.2 fermi架构

3.1.3 kepler架构

3.1.4 配置文件驱动优化

<a href="https://yq.aliyun.com/articles/118313/">3.2 理解线程束执行的本质</a>

3.2.1 线程束和线程块

3.2.2 线程束分化

3.2.3 资源分配

3.2.4 延迟隐藏

3.2.5 占用率

3.2.6 同步

3.2.7 可扩展性

<a href="https://yq.aliyun.com/articles/118332/">3.3 并行性的表现</a>

3.3.1 用nvprof检测活跃的线程束

3.3.2 用nvprof检测内存操作

3.3.3 增大并行性

<a href="https://yq.aliyun.com/articles/118357/">3.4 避免分支分化</a>

3.4.1 并行归约问题

3.4.2 并行归约中的分化

3.4.3 改善并行归约的分化

3.4.4 交错配对的归约

<a href="https://yq.aliyun.com/articles/118386/">3.5 展开循环</a>

3.5.1 展开的归约

3.5.2 展开线程的归约

3.5.3 完全展开的归约

3.5.4 模板函数的归约

<a href="https://yq.aliyun.com/articles/118397/">3.6 动态并行</a>

3.6.1 嵌套执行

3.6.2 在gpu上嵌套hello world

3.6.3 嵌套归约

<a href="https://yq.aliyun.com/articles/118401/">3.7 总结</a>

<a href="https://yq.aliyun.com/articles/118405/">3.8 习题</a>

继续阅读