我对 CUDA 编程指南 4.0 部分 5.3.2.1 中的以下语句感到困惑
在性能指南的章节中。
Global memory resides in device memory and device memory is accessed
via 32-, 64-, or 128-byte memory transactions.
These memory transactions must be naturally aligned:Only the 32-, 64- ,
128- byte segments of device memory
that are aligned to their size (i.e. whose first address is a
multiple of their size) can be read or written by memory
transactions.
1)
我对设备内存的理解是线程对设备内存的访问是未缓存的:因此,如果线程访问内存位置
a[i]
它只会获取 a[i]
并且没有一个值约
a[i]
.所以第一个陈述似乎与此矛盾。或者我可能误解了“内存事务”一词的用法?2)第二句好像不是很清楚。有人可以解释一下吗?
最佳答案
关于cuda - 阐明 CUDA 中的内存事务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11908142/