mindspore.runtime.MemPool ========================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/master/docs/api/api_python/runtime/mindspore.runtime.MemPool.rst :alt: 查看源文件 .. py:class:: mindspore.runtime.MemPool(allocator: PluggableAllocator) MemPool封装了一个 :class:`mindspore.runtime.PluggableAllocator` ,并将其传递给 :func:`mindspore.runtime.use_mem_pool` 使用。 参数: - **allocator** (mindspore.runtime.PluggableAllocator) - 一个mindspore.runtime.PluggableAllocator对象,用于定义内存池中内存的分配和释放方式。