Repository navigation
Conversation
4 of 5 tasks
Collaborator
|
Closing as part of clearing this pre-hygiene queue; see #298 (comment) for the note on the updated review process. Thank you again. |
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 & why
An asynchronous weight read retains its allocation in the packaged-task closure. Its future can become ready before that closure is destroyed, so
complete()followed byclose()can leave the resident-weight budget charged until the worker releases its task. The existing mixed-storage test also intermittently encounters this residual charge.Move the worker's allocation reference into a local lifetime guard when the task starts. It keeps the buffer alive throughout the read and releases the reference before the task publishes its result, including an error return or exception. Add a regression that completes, checks the loaded bytes and closes 1,000 small weight loads, checking that no completed load retains a resident charge.
Area
edge0-infer/)How was it tested?
The isolated before/after validation tests these two files against upstream
f6bfa5546bcf89919f86946ec669bcc7f4cd526d.platform_memory,ordered_json,template_tools). All runnable weights tests passed, including lifecycle and staged read-error coverage.weights_computeandweights_group_compute: both passed.app_generationtemporary file andplatform_memory). Both CPU L2 weights tests passed locally as well.Checklist