Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL] Daily Update Velox Version (2024_05_30) #5919

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cpp/velox/memory/VeloxMemoryManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator {
uint64_t growCapacity(velox::memory::MemoryPool* pool, uint64_t targetBytes) override {
std::lock_guard<std::recursive_mutex> l(mutex_);
listener_->allocationChanged(targetBytes);
if (!pool->grow(targetBytes, 0)) {
if (!growPool(pool, targetBytes, 0)) {
VELOX_FAIL("Failed to grow root pool's capacity for {}", velox::succinctBytes(targetBytes));
}
return targetBytes;
Expand Down Expand Up @@ -81,7 +81,7 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator {
auto pool = pools.at(0);
const uint64_t oldCapacity = pool->capacity();
pool->reclaim(targetBytes, 0, status); // ignore the output
pool->shrink(0);
shrinkPool(pool.get(), 0);
const uint64_t newCapacity = pool->capacity();
uint64_t total = oldCapacity - newCapacity;
listener_->allocationChanged(-total);
Expand All @@ -104,14 +104,14 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator {
// We should pass bytes as parameter "reservationBytes" when calling ::grow.
auto freeByes = pool->freeBytes();
if (freeByes > bytes) {
if (pool->grow(0, bytes)) {
if (growPool(pool, 0, bytes)) {
return;
}
}
auto reclaimedFreeBytes = pool->shrink(0);
auto reclaimedFreeBytes = shrinkPool(pool, 0);
auto neededBytes = velox::bits::roundUp(bytes - reclaimedFreeBytes, memoryPoolTransferCapacity_);
listener_->allocationChanged(neededBytes);
auto ret = pool->grow(reclaimedFreeBytes + neededBytes, bytes);
auto ret = growPool(pool, reclaimedFreeBytes + neededBytes, bytes);
VELOX_CHECK(
ret,
"{} failed to grow {} bytes, current state {}",
Expand All @@ -121,7 +121,7 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator {
}

uint64_t shrinkCapacityLocked(velox::memory::MemoryPool* pool, uint64_t bytes) {
uint64_t freeBytes = pool->shrink(bytes);
uint64_t freeBytes = shrinkPool(pool, bytes);
listener_->allocationChanged(-freeBytes);
return freeBytes;
}
Expand Down
2 changes: 1 addition & 1 deletion ep/build-velox/src/get_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
set -exu

VELOX_REPO=https://github.com/oap-project/velox.git
VELOX_BRANCH=2024_05_29
VELOX_BRANCH=2024_05_30
VELOX_HOME=""

#Set on run gluten on HDFS
Expand Down
Loading