Conversation
…nd ordering fixes Squashed import of facebookincubator#17803 (4 commit(s)) from facebookincubator#17803.
Squashed import of facebookincubator#17422 (2 commit(s)) from facebookincubator#17422.
…daptor Wrap the cuDF/RMM device resource (and separate output MR, if any) in an rmm::mr::statistics_resource_adaptor so live-allocated device bytes can be queried. cudaMemGetInfo only sees the retained RMM pool high-water mark and cannot distinguish a free-for-reuse pool from active work; the adaptor's current-bytes counter drops when queries free their allocations. Adds cudfAllocatedBytes() accessor. The adaptor is a cuda::mr::shared_resource (copyable, shared counter state), so the copies stored in mr_/output_mr_ feed the same counters read here.
Author
|
@dan13bauer FYI. |
7 tasks
Collaborator
|
That looks good to me. Some minor question/comment:
|
Author
|
Thanks! On the flag: the whole experimental/cudf module is already gated by the cuDF build option, so this only exists in GPU builds. Rather than a compile-time flag I'd lean toward [always-on / a runtime CudfConfig toggle], since the cost is so low and a compile-time switch fragments builds. Happy to add a runtime toggle if you'd prefer an opt-out. |
lga-zurich
force-pushed
the
ibm-research-preview
branch
from
August 28, 2026 21:50
ba8abb6 to
dbf358a
Compare
lga-zurich
force-pushed
the
ibm-research-preview
branch
from
September 3, 2026 07:24
dbf358a to
660efa0
Compare
lga-zurich
force-pushed
the
ibm-research-preview
branch
from
September 15, 2026 07:14
660efa0 to
b02a398
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wrap the cuDF/RMM device resource (and the separate output MR, when present) in an
rmm::mr::statistics_resource_adaptor, and add acudfAllocatedBytes()accessor thatreturns the live-allocated device bytes.
Why
cudaMemGetInfoonly reflects the retained RMM pool high-water mark — it cannot distinguish apool that is free-for-reuse from one with active work. The adaptor's current-bytes counter drops
when queries free their allocations, giving a true "busy vs. idle" GPU-memory signal.
This is needed by a downstream Prestissimo change that reports live GPU pool usage on
/v1/statusfor GPU-aware autoscaling (scale a GPU worker in only when its GPU memory is actually free, not
merely because the retained pool looks full).
How
statistics_resource_adaptoris acuda::mr::shared_resource(copyable, shared counter state),so the copies stored in
mr_/output_mr_feed the same counters read bycudfAllocatedBytes().Scope / impact
velox/experimental/cudf/exec/GpuResources.{h,cpp},velox/experimental/cudf/exec/ToCudf.cpp.Test plan
cudfAllocatedBytes()tracks a query's allocations and returns to ~0when the query frees, whereas
cudaMemGetInfostays at the retained pool high-water mark.