【发布时间】:2012-08-11 04:03:14
【问题描述】:
我对 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) 第二句好像不是很清楚。有人可以解释一下吗?
【问题讨论】: