GPU 利用率低常见原因分析及优化 - 知乎
https://zhuanlan.zhihu.com/p/41024478014.09.2021 · 说明:未设置 prefetch_factor 等参数或者设置的不合理,导致 CPU 与 GPU 在时间上串行,CPU 运行时 GPU 利用率直接掉 0 优化:设置 torch.utils.data.DataLoader 方法的 prefetch_factor 参数 或者 tf.data.Dataset.prefetch ()方法。 prefetch_factor 表示每个 worker 提前加载的 sample 数量 (使用该参数需升级到 pytorch1.7 及以上),Dataset.prefetch ()方法的 …
Cache prefetching - Wikipedia
https://en.wikipedia.org/wiki/Cache_prefetchingCache prefetching is a technique used by computer processors to boost execution performance by fetching instructions or data from their original storage in slower memory to a faster local memory before it is actually needed (hence the term 'prefetch'). Most modern computer processors have fast and local cache memory in which prefetched data is held until it is required. The source for the prefetch operation is usually main memory. Because of their design, accessing cache …