Repository navigation
[Hardware][Ascend] Use registered NPU allocator telemetry for cache retention #8578
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
Merged
david6666666
merged 4 commits into
vllm-project:main
from
Dong1017:codex/h3-npu-allocator-telemetry
Oct 10, 2026
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2ef6552
[Hardware][Ascend] Use registered NPU allocator telemetry for cache r…
Dong1017 d86f712
Merge branch 'main' into codex/h3-npu-allocator-telemetry
Dong1017 ac461ae
[Hardware][Ascend] Cover NPU allocator cache decisions on CPU
Dong1017 9feeaff
Merge branch 'main' into codex/h3-npu-allocator-telemetry
Dong1017 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a CPU regression test for the NPU branch? The current allocator tests use a CPU device and only mock
torch.accelerator, so they still pass if this fix is reverted. A fake registered device module could cover retention, threshold release and forced cleanup.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in ac461aea1: seven CPU cases using the repository's
mockerfixture and the existingcore_model/cpumarks.They cover retention, the exact 25% cached-memory / 5% free-memory boundaries, release above/below those thresholds, unavailable registered-device telemetry, and forced cleanup. The tests explicitly require
torch.get_device_module(device)and the registered module's memory APIs, and assert that the generictorch.acceleratorqueries are not called. Forced cleanup must bypass all telemetry.Validation:
This follow-up changes only
tests/diffusion/offloader/test_module_residency.py; production code is unchanged.Reproduce in the repository test environment:
python -m pytest -q tests/diffusion/offloader/test_module_residency.py -m "core_model and cpu" --run-level core_model