Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 2e06b53

Browse files
committed
Use rootMemoryPool to construct execContext (#480)
Summary: Pull Request resolved: #480 It originally use `memory::getDefaultScopedMemoryPool()` since `ExecCtx` constructor expects `unique_ptr<MemoryPool>`. Since facebookincubator/velox@15eeddb, `ExecCtx` now expects `MemoryPool*`, so we can use `&velox::memory::getProcessDefaultMemoryManager().getRoot()` returned by `TorchArrowGlobalStatic::rootMemoryPool`. This makes TorchArrow always use this process default root memory pool. Reviewed By: dracifer, vancexu Differential Revision: D39010989 fbshipit-source-id: 3a383b01163e9866500a6fc8b091080b70684c6e
1 parent 1e996c5 commit 2e06b53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

csrc/velox/column.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ velox::core::QueryCtx& TorchArrowGlobalStatic::queryContext() {
553553
}
554554

555555
velox::core::ExecCtx& TorchArrowGlobalStatic::execContext() {
556-
static auto pool = velox::memory::getDefaultScopedMemoryPool();
557556
static velox::core::ExecCtx execContext(
558-
pool.get(), &TorchArrowGlobalStatic::queryContext());
557+
TorchArrowGlobalStatic::rootMemoryPool(),
558+
&TorchArrowGlobalStatic::queryContext());
559559
return execContext;
560560
}
561561

0 commit comments

Comments
 (0)