Closed wenleix closed 2 years ago
Summary: Pull Request resolved: https://github.com/pytorch/torcharrow/pull/480
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.
Reviewed By: dracifer, vancexu
Differential Revision: D39010989
fbshipit-source-id: 3a383b01163e9866500a6fc8b091080b70684c6e
Summary: Pull Request resolved: https://github.com/pytorch/torcharrow/pull/480
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.
Reviewed By: dracifer, vancexu
Differential Revision: D39010989
fbshipit-source-id: 3a383b01163e9866500a6fc8b091080b70684c6e