mindspore.runtime.MemPool

查看源文件
class mindspore.runtime.MemPool(allocator: PluggableAllocator)[源代码]

MemPool封装了一个 mindspore.runtime.PluggableAllocator ,并将其传递给 mindspore.runtime.use_mem_pool() 使用。

参数:
  • allocator (mindspore.runtime.PluggableAllocator) - 一个mindspore.runtime.PluggableAllocator对象,用于定义内存池中内存的分配和释放方式。

支持平台:

Ascend