CUDA disable L1 cache only for one variable

前端 未结 3 1352
别那么骄傲
别那么骄傲 2020-12-08 03:47

Is there any way on CUDA 2.0 devices to disable L1 cache only for one specific variable? I know that one can disable L1 cache at compile time adding the flag -Xptxas

3条回答
  •  粉色の甜心
    2020-12-08 03:53

    Inline PTX can be used to load and store the variable. ld.cg and st.cg instructions only cache data in L2. The cache operators are described in section 8.7.8.1 Cache Operators of the PTX ISA 2.3 document. The instructions or interest are ld and st. Inline PTX is described in Using Inline PTX Assembly in CUDA.

提交回复
热议问题