8.2 异步计算
此节内容对应PyTorch的版本本人没怎么用过,网上参考资料也比较少,所以略:),有兴趣的可以去看看原文。
关于PyTorch的异步执行我只在官方文档找到了一段:
By default, GPU operations are asynchronous. When you call a function that uses the GPU, the operations are enqueued to the particular device, but not necessarily executed until later. This allows us to execute more computations in parallel, including operations on CPU or other GPUs. In general, the effect of asynchronous computation is