torch.cuda.get_allocator_backend¶ torch.cuda.get_allocator_backend()[源代码]¶ 返回一个描述由PYTORCH_CUDA_ALLOC_CONF设置的活动分配器后端的字符串。目前可用的后端有native(PyTorch的原生存储分配器)和cudaMallocAsync`(CUDA的内置异步分配器)。 注意 有关选择分配器后端的详细信息,请参阅内存管理。 Return type str