Chuanqiz’s blog

日志

1. tools

  • nsight in WIN(vs) or Linux (eclipse)
  • nvprof in linux cmd line
    
    //in gtx1060 
    nvprof --metrics ipc,issued_ipc,achieved_occupancy,global_hit_rate,local_hit_rate,l2_tex_read_hit_rate,gld_transactions,gst_transactions,local_load_transactions,local_store_transactions,l2_tex_read_transactions,l2_tex_write_transactions,l2_read_transactions,l2_write_transactions,dram_read_transactions,dram_write_transactions,sysmem_read_transactions,sysmem_write_transactions ./wave
    

2. 度量标准 metrics

2.1 Performance

  • ipc
    • Instructions executed per cycle
  • issued_ipc
    • Instructions issued per cycle
  • achieved_occupancy
    • Ratio of the average active warps per active cycle to the maximum number of warps supported on a multiprocessor

说明:本文研究点在 Data Cache,那么一下的提到的L1 Cache 都为 Data Cache

2.2 Cache Hit Rate

L1 Cache

Fermi/Kepler (Capability 2.x/3.x)

  • l1_cache_global_hit_rate
    • Hit rate in L1 cache for global loads
  • l1_cache_local_hit_rate
    • Hit rate in L1 cache for local loads and stores
  • nc_cache_global_hit_rate
    • only for Kepler
    • Hit rate in non coherent cache for global loads

Maxwell/Pascal(Capability 5.x/6.x)

  • global_hit_rate
    • Hit rate for global loads
  • local_hit_rate
    • Hit rate for local loads and stores

L2 Cache

Fermi/Kepler (Capability 2.x/3.x)

  • l2_l1_read_hit_rate
    • Hit rate at L2 cache for all read requests from L1 cache
  • l2_tex_read_hit_rate
    • Hit rate at L2 cache for all read requests from texture cache

Maxwell/Pascal(Capability 5.x/6.x)

  • l2_tex_read_hit_rate
    • Hit rate at L2 cache for all read requests from texture cache

2.3 Transactions

L1 Cache

Global data

  • gld_transactions
    • Number of global memory load transactions
  • gld_transactions_per_request
    • Average number of global memory load transactions performed for each global memory load
  • gst_transactions
    • Number of global memory store transactions
  • gst_transactions_per_request
    • Average number of global memory store transactions performed for each global memory store

Local data

  • local_load_transactions
    • Number of local memory load transactions
  • local_load_transactions_per_request
    • Average number of local memory load transactions performed for each local memory load
  • local_store_transactions
    • Number of local memory store transactions
  • local_store_transactions_per_request
    • Average number of local memory store transactions performed for each local memory store

L2 Cache

Fermi/Kepler (Capability 2.x/3.x)

  • l2_l1_read_transactions
    • Memory read transactions seen at L2 cache for all read requests from L1 cache
  • l2_l1_write_transactions
    • Memory write transactions seen at L2 cache for all write requests from L1 cache

Maxwell/Pascal(Capability 5.x/6.x)

  • l2_tex_read_transactions
    • Memory read transactions seen at L2 cache for read requests from the texture cache
  • l2_tex_write_transactions

    Both

  • l2_read_transactions
    • Memory read transactions seen at L2 cache for all read requests
  • l2_write_transactions
    • Memory write transactions seen at L2 cache for all write requests

Only in Kepler

  • nc_l2_read_transactions
    • Memory read transactions seen at L2 cache for non coherent global read requests

备注

  • Kepler架构以来,L1 Cacheglobal data 的默认策略是 bypassing ,只有Fermi架构L1 Cache对 global data 是既可读又可写的,但是不能保持cache coherence
  • 那么为了保证 cache coherence,nvidia 采取了较为极端的做法,那就是bypassing L1 Cache ,并且在MaxwellPascal 架构中,与Tex Cache 合并,设置为 Read Only , 但我认为其效果并不佳。最新架构volta又将其架构改为 FermiL1 CacheShared memory 可配置的模式。
  • 可知,在MaxwellPascal 架构中,我们就将 tex cache 看成 L1 Data Cache

GDRAM

  • dram_read_transactions
    • Device memory read transactions
  • dram_write_transactions
    • Device memory write transactions

DRAM

  • sysmem_read_transactions
    • System memory read transactions
  • sysmem_write_transactions
    • System memory write transactions

Influence by L2 Hit Rate

Reference

Read more at: http://docs.nvidia.com/cuda/profiler-users-guide/index.html#ixzz4t4vGKod8
Follow us: @GPUComputing on Twitter | NVIDIA on Facebook

突然想写一点感想,不知如何来命名,不如就叫 无题 吧。

想到现在正在做的一切,我在做什么?我为什么这么做?我的目标?

好像都没有一个确切的答案,但是我知道我在走着自己选择的路,我在遵从自己的内心,而不是人云亦云。

似乎在别人看来,你何必这么拼命,你tm又不来实验室学习!他们只是看到了你的一部分,而你自己才看到的是完整的你。

一个来自农村的孩子,走着走着,不能忘记来时的路啊!

我特别喜欢的一句话,你是一个什么人,取决于你想成为一个什么样的人!

这句话,我很赞同,每个人都有自己的选择,听从自己的内心,就可以了,无关外物。

那天看了CS 大牛 张晓东的一个关于博士的几点要求,心里默默想着,其实不限于博士,对每个人都适用。

大概有五条:

发现问题 

我想这个能力无论那个行业,无论做什么工作,其实都是共通的。

解决问题

解决问题的能力,我认为是一种执行力的体现。一种自律,或者是自我驱动力。

交流沟通

在当今社会,信息大爆炸的时代。我们的交流和沟通可以是信息相互传递。

每个人都有自己的想法,因此交流至关重要,共同进步。

责任感

责任感,这点有点“穷则独善其身,达则兼济天下”的意思了。

就是说一个人要敢于担当,敢于做一些惊天地的事了,要有舍我其谁味道。

书面表达

书面表达能力很重要,就如同写一篇paper,做一次报告。向别传递你的思想,使别人了解你的工作。

这几点也是我或者说我们应该提升自己的硬实力吧。

作报告==讲故事,

目的是让别人听懂自己在说什么,所以在做PPT之前先列好提纲(建议以后写paper也采取类似的思路),把听众当成什么都不懂的小白对待,来想想:

  1. 如果让听众都听懂,我需要先介绍什么,再解释什么。
  2. 如果我自己不了解这个背景的话,我可能有什么问题。
  3. 定义好了这么一个问题,我最直接的想法是什么,或者可能的解决方案是什么?为什么这么做/不这么做?
  4. 所以,一个好的presentation会让听众紧跟你的思路,换句话说,我们来准备一个presentation的时候,要从听众的角度出发,让他们充分理解和接受我们讲的故事。
  5. 一个好的presentation,不是越深奥越好的(paper同理),要深入浅出,用一种观众比较好理解的方式(比如例子)展现出来,再逐层深入。
  6. 观众来听一个presentation的时候可能有几个层次:完全不懂你在说什么,大概了解你做问题的背景,知道你的main idea,完全听懂。
  7. 因为听众的背景不同,让大家完全听懂会比较困难,我们的目的是至少要让绝大部分人听懂main idea。
  8. 做presentation的时候一个非常重要的技巧(写paper也是)就是“抽象概括”,切忌一下子用很多detail把大家砸晕,在讲细节之前要先“抽象概括”,把main idea概括清楚了,细节自然而然就好理解了。
  9. 在准备presentation之前,我们可能在一个topic里沉浸了好久,解决很多细枝末节的问题,但在准备PPT之前,一定要跳出来,重新从宏观的角度捋清思路:background -> problem -> challenge -> solution –> idea。自己把故事顺完整了,PPT也就出来了,presentation的逻辑也就出来了。
  10. 至于PPT,绝对不是写几句话+截几个图。例子、动画、颜色标注都能帮助在讲的时候突出和彰显思路。PPT的要求不是炫,是清晰+美观(看着舒服)。
  11. 多练才会提高,大家积极准备,多做报告吧~
  12. 想到什么就写了什么,大家在做PPT和报告的过程中再细细体会吧​