天天看點

《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>

繼續閱讀