torch.cuda.memory.caching_allocator_enable¶ torch.cuda.memory.caching_allocator_enable(value=True)[源代码][源代码]¶ 启用或禁用 CUDA 内存分配器。默认情况下启用。