torch.cuda.caching_allocator_delete¶ torch.cuda.caching_allocator_delete(mem_ptr)[源][源]¶ 刪除使用 CUDA 記憶體分配器分配的記憶體。 使用 caching_allocator_alloc() 分配的記憶體在此處釋放。相關的裝置和流在分配器內部進行跟蹤。 引數 mem_ptr (int) – 記憶體地址,由分配器釋放。 注意 有關 GPU 記憶體管理的更多詳細資訊,請參閱記憶體管理。