Repository navigation
Take the least of three RssAnon peaks in the block dequant host RAM check test - #14561
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Follow-up to #14561. `test_block_dequant_is_checked_for_its_peak_intermediates[mxfp8]` failed again on #14539's Backend CI `(Python 3.13, a-k)` run (job 119508973440). That base already had #14561's least-of-three readings: ``` E AssertionError: ([50331648, 50331648, 50331648], 57405440) E assert ([50331648, 50331648, 50331648] and 50331648 >= (0.9 * 57405440)) ``` The smallest of three readings was still about 7 MB above the charge, so the extra memory is not a one-off spike. It is steady for the life of that pytest worker. The product's estimate is not the problem: the same torch (2.10.0+cpu, Python 3.13) measured alone gives charge / growth of 0.98 to 1.07 for both formats at 1, 2, 4 and 8 torch threads. A raised glibc mmap or trim threshold does not reproduce it either. What differs in CI is the worker's history: thousands of earlier tests, their threads and their allocator state all count toward the process-wide `RssAnon` this test reads. ## Change The measurement runs in a fresh `python -c` subprocess: same tensors, same sampler, same least of three, same 0.9 bar. The parent test only checks the JSON the child prints. Nothing else lives in that process, so the reading is the dequant's own. ## Testing - Both parameters pass in three back-to-back runs. The whole `test_diffusion_comfy_block.py` file passes: 55 passed, 5 skipped. - Sabotage: charging only the bf16 output, dropping `chunk * per_row` in `diffusion_comfy_block.py`, fails both formats (`[33554432] vs 47.9 MB / 51.1 MB`). This failure did not reproduce locally, so the subprocess is aimed at the one variable that differs from a clean run, rather than at a confirmed allocator mechanism.
test_block_dequant_is_checked_for_its_peak_intermediates[nvfp4](added in #14510) failed on #14558's Backend CI(Python 3.13, a-k)run (job 119452419222), on the same base where main's run passed it. #14558 only touches Laya files:The test samples
RssAnonwhiledequant_blockruns and requires the host RAM charge to cover 90% of the growth.RssAnonis process-wide, so in a busy xdist worker anything else allocating at the same time is counted as the dequant's peak.Run alone, the charge is close to exact. Charge / growth over 12 local runs each:
CI's 0.889 is about 6 MB of unrelated growth. The product's estimate is right; the measurement was noisy.
Change
The measurement runs three times, and the smallest growth is the one checked against the same 0.9 bar. Unrelated activity can only add to a reading, so the minimum is the closest to the dequant's own peak, and the guard keeps its strength.
Testing
diffusion_comfy_block.pyfails both formats ([33554432] vs ~50 MB).