Nvidia GPU 的存储架构 发展

查阅了好多论文,以及英伟达的白皮书,最后终于搞明白了。。

从Fermi 到Pascal,cache 的体系结构发生了变化;

1. Fermi
  • L1dcahce 是与 Shared mem 可配置的64kB的大小,一般为 16/48 or 48/16,可读可写 ;
  • 还有专有的对图像渲染的texture cache 和 存放常量的constant cache,只读;
  • 以上L1层的cache是对SM 私有的;为了保证cache coherence 的问题,l1dcache 的写请求 也不会被cache了
  • 综上,l1层 总是只读的

  • l2对于所有sm共享,可读可写

  • 当l2中的数据被写,恰好l1中还存在这个数据,那么将l1中这个数据 使失效,保持了cache coherency;
2. Kepler

cache 层基本继承于Fermi架构,其对于Fermi架构的新的特性就是增加了48KB的READ-ONLY DATA-CACHE.
专门用来缓存只读的数据。

其他同上

3.Maxwell

这一次 英伟达有了一次较大的改变,,完全放弃了在L1层的写,将l1d 与 tex 等专用cache 进行统一;
根据workload 的不同进行选择。

  • global loads are cached in L2 only

  • local loads are cached in L2 only

  • 手册原文

    Maxwell combines the functionality of the L1 and texture caches into a single unit.

    As with Kepler, global loads in Maxwell are cached in L2 only, unless using the LDG
read-only data cache mechanism introduced in Kepler.

    In a manner similar to Kepler GK110B, GM204 retains this behavior by default but also
allows applications to opt-in to caching of global loads in its unified L1/Texture cache.

    The opt-in mechanism is the same as with GK110B: pass the -Xptxas -dlcm=ca flag to
nvcc at compile time.

    Local loads also are cached in L2 only, which could increase the cost of register spilling
if L1 local load hit rates were high with Kepler. 

    The balance of occupancy versus spilling should therefore be reevaluated to ensure best performance. 
Especially given the improvements to arithmetic latencies, code built for Maxwell may benefit from
somewhat lower occupancy (due to increased registers per thread) in exchange for lower spilling.

    The unified L1/texture cache acts as a coalescing buffer for memory accesses, gathering
up the data requested by the threads of a warp prior to delivery of that data to the warp.
This function previously was served by the separate L1 cache in Fermi and Kepler.
Pascal

除了增大了l2cache大小之外,cache 架构也是继承与上一代 Maxwell 的

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值