我对性能指南章节中 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)第二句话似乎不是很清楚。有人可以解释一下吗?