torch.cuda.memory_snapshot¶ torch.cuda.memory_snapshot()[源][源]¶ 返回所有裝置上 CUDA 記憶體分配器狀態的快照。 解釋此函式的輸出需要熟悉記憶體分配器的內部機制。 注意 有關 GPU 記憶體管理的更多詳細資訊,請參閱記憶體管理。