Closed wenleix closed 2 years ago
Summary: It originally use memory::getDefaultScopedMemoryPool() since ExecCtx constructor expects unique_ptr<MemoryPool>.
memory::getDefaultScopedMemoryPool()
ExecCtx
unique_ptr<MemoryPool>
Since https://github.com/facebookincubator/velox/commit/15eeddb8e7d50de39afdbde4049f9a1310edf5e5, ExecCtx now expects MemoryPool*, so we can use &velox::memory::getProcessDefaultMemoryManager().getRoot() returned by TorchArrowGlobalStatic::rootMemoryPool.
MemoryPool*
&velox::memory::getProcessDefaultMemoryManager().getRoot()
TorchArrowGlobalStatic::rootMemoryPool
This makes TorchArrow always use this process default root memory pool.
Differential Revision: D39010989
This pull request was exported from Phabricator. Differential Revision: D39010989
Summary: It originally use
memory::getDefaultScopedMemoryPool()
sinceExecCtx
constructor expectsunique_ptr<MemoryPool>
.Since https://github.com/facebookincubator/velox/commit/15eeddb8e7d50de39afdbde4049f9a1310edf5e5,
ExecCtx
now expectsMemoryPool*
, so we can use&velox::memory::getProcessDefaultMemoryManager().getRoot()
returned byTorchArrowGlobalStatic::rootMemoryPool
.This makes TorchArrow always use this process default root memory pool.
Differential Revision: D39010989