Repository navigation
fix(engram): stop allocations that leave 50 GiB or less of host RAM - #1852
Open
xingleixu123 wants to merge 3 commits into
Open
xingleixu123 wants to merge 3 commits into
xingleixu123 wants to merge 3 commits into
Conversation
xingleixu123
requested review from
kisnwangg,
liuchongming74,
suteng,
yangzhenzhang02 and
yaoyifanx
as code owners
December 3, 2026 14:18
xingleixu123
force-pushed
the
codex/engram-host-capacity
branch
from
December 3, 2026 14:57
6305ea8 to
2709545
Compare
xingleixu123
force-pushed
the
codex/engram-host-capacity
branch
from
December 4, 2026 04:47
2709545 to
b964b5b
Compare
xingleixu123
force-pushed
the
codex/engram-host-capacity
branch
from
December 4, 2026 06:19
b964b5b to
ed8a4a4
Compare
xingleixu123
force-pushed
the
codex/engram-host-capacity
branch
from
December 4, 2026 11:14
ed8a4a4 to
a2d9ab8
Compare
xingleixu123
force-pushed
the
codex/engram-host-capacity
branch
from
December 4, 2026 11:40
a2d9ab8 to
77090b7
Compare
Contributor
Author
|
/check-pr |
Contributor
Author
|
/retest |
|
Gate trigger failed: please fix the /check-pr findings and obtain the |
Contributor
Author
|
/check-pr |
Contributor
Author
|
/retest |
|
🔵 The pipeline #2816 is running. Please wait a moment... (Link) |
|
|
@xingleixu123, your gate pipeline failed at the code check stage. You can configure some code check tools locally following the (pre-push quick guide), to enable automatic checking when you push your code every time. Tools included are: Check_CMakelint, Check_Codespell, Check_Cpplint, Check_Lizard, Check_Pylint, Check_ClangFormat, Check_ShellCheck. |
Contributor
Author
|
/retest |
|
🔵 The pipeline #2817 is running. Please wait a moment... (Link) |
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.
Paired: GitHub #1852 ↔ GitCode !2178
What type of PR is this?
/kind bug
What does this PR do / why do we need it:
Read OS-visible host RAM with
psutil.virtual_memory()and sum the pending Engram shard bytes on each physical host. Before allocating weights or building the two SparseAdam moments, stop all startup ranks when a nonempty plan would leave 50 GiB or less available. Recovery checks only the replacement worker's missing weights. No configuration is required.If a rank cannot read RAM, its shard still counts when its host is known. A peer on that host can supply the reading. An unreadable probe produces one warning per collective check. Hosts without a usable reading are skipped while other hosts remain checked. Independent container memory limits are outside the physical-host budget. The probe boundary retains its broad exception handling so every rank can still report its planned shard when a platform-specific probe fails. Pylint W0718 is locally suppressed at this boundary; the runtime behavior is unchanged.
Which issue(s) this PR fixes:
Follow-up to #1807 for issue #43680.
What scenarios were tested, and what were the verification results(Function, performance, reliability, etc.):
Nine committed unit tests cover host-memory reporting, distributed host budgets, recovery, and the admission boundaries before weight and optimizer allocation. On Linux CPU with PyTorch 2.10.0, all 27 targeted tests passed, including 18 existing Engram and recovery tests. Additional admission regressions ran outside the source tree. Physical 910C 16-DIE hardware was unavailable.
Self-checklist:(Please check carefully,and mark an x in the [] brackets. We will review your completion status.)