Questions about prefetch and cache flush

Hi everyone:

  I am now using nvprof to profile the hit ratios for some benchmarks. But I found that the results some how does not match my expectation. So I am worried that prefetch and cache flush may effect the profiled result. 

  So two questions:

  (1) is there a way to disable or enable the prefetch for the L2 cache?

  (2) is there a way to flush L2 cache before launching the kernels?

  Thanks!

Dong

Unfortunately the answer is no to both questions. All global memory accesses go through the L2 cache.
Instead of flushing L2, you could however cache a large enough unrelated memory area to ensure L2 holds no relevant data.