L2缓存在Kepler [英] L2 cache in Kepler

查看:269
本文介绍了L2缓存在Kepler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

L2缓存在引用的局部性方面如何在具有Kepler架构的GPU中工作?例如,如果线程访问全局内存中的地址,假设该地址的值不在L2缓存中,那么该值是如何缓存的?是时间吗?

How does L2 cache work in GPUs with Kepler architecture in terms of locality of references? For example if a thread accesses an address in global memory, supposing the value of that address is not in L2 cache, how is the value being cached? Is it temporal? Or are other nearby values of that address brought to L2 cache too (spatial)?

下面的图片来自NVIDIA白皮书。

Below picture is from NVIDIA whitepaper.

推荐答案

统一L2缓存引入了计算能力2.0和更高版本,并继续在Kepler架构上得到支持。所使用的缓存策略是LRU(最近最少使用),其主要目的是避免全局存储器带宽瓶颈。 GPU应用可以呈现两种类型的局部性(时间和空间)。

Unified L2 cache was introduced with compute capability 2.0 and higher and continues to be supported on the Kepler architecture. The caching policy used is LRU (least recently used) the main intention of which was to avoid the global memory bandwidth bottleneck. The GPU application can exhibit both types of locality (temporal and spatial).

每当有一个尝试读取特定的内存时,它会在缓存L1和L2中查找,如果找不到,那么它将从缓存线加载128个字节。这是默认模式。从下面的图中可以理解为什么128位访问模式给出了良好的结果。

Whenever there is an attempt read a specific memory it looks in the cache L1 and L2 if not found, then it will load 128 byte from the cache line. This is the default mode. The same can be understood from the below diagram as to why the 128 bit access pattern gives the good result.

>

这篇关于L2缓存在Kepler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆