输入“/”快速插入内容

CUDA & GPGPU Programming

4月2日修改
2023年9月30日创建
1824
2099
Links
Lecture 26: GPU Programming (Fall 2022)
Berkeley - Understanding Latency Hiding on GPUs
August 12, 2016
128 页 pdf
reusable software components for every layer of the CUDA programming model
Nvidia PTX 指令理解
Summary
需要掌握的要点:
1.
GPU 架构入门,cuda framework & 基本术语。
a.
grid/block/thread 的基本概念。
b.
kernel function 声明 & kernel launch
c.
sm / sp 的 hardware execution model
d.
warp,warp scheduler & warp-synchronicity
2.
性能加速方法,总结为两个方向:
a.
IO优化(提高cache命中、使用share memory、register等)
b.
并行规划(让计算与IO、IO与IO、计算与计算互相overlap)
3.
memory copy
4.
stream & async copy
5.
cache 友好的程序
分 host & device 侧。
host:
allocate device memory
copy data
launch kernels
device 上:
hardware execution model: SIMT
software programming model: SPMD
device 上,kernel 间的同步是 bulk sync programming 模式。
Global (coarse-grain) sync between kernels.
bulk sync programming: kernel 的 thread 间做同步的唯一方法是 terminate the kernel。
thread 调度.
为了代码能在不同 GPU 上兼容运行,thread 的调度都交给硬件去做。不同 hardware 的 thread 数不同。
重点:
1.
并行性