Skip to content

Studio tests: measure the int8 / fp8 dequant and nibble-swap peaks in a fresh process - #15912

Merged
danielhanchen merged 1 commit into
mainfrom
tests-int8-fp8-dequant-peak-fresh-process
Oct 29, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
tests-int8-fp8-dequant-peak-fresh-process

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

The (Python 3.13, a-f) shard on #15906's staging run failed one test the PR does not touch:

tests/test_diffusion_comfy_block.py:979: in test_int8_fp8_dequant_is_checked_for_its_float32_peak
    assert seen and max(seen) >= 0.9 * growth, (seen, growth)
E   AssertionError: ([201326592], 237703168)

The test passes on main and on #15906's head when run on its own.

Cause

This is the flake #14579 already fixed for test_block_dequant_is_checked_for_its_peak_intermediates. RssAnon is process-wide, and in a long-lived xdist worker it carries whatever earlier tests left behind. #14579 moved that test into a fresh process, with a malloc_trim baseline and the best of three. Two siblings in the same file kept measuring in the worker: test_int8_fp8_dequant_is_checked_for_its_float32_peak and the peak half of test_swap_nibbles_is_bit_identical_and_checked_for_its_peak.

The CI reading shows how far off a worker reading can be. Measured on its own, the int8 ConvRot dequant grows by about two thirds of what it charges. The worker saw 237.7 MB against the 201.3 MB charge.

Fix

Both now run through the same kind of fresh-process probe as #14579 (_HOST_PEAK_PROBE, driven by _host_peak_in_a_fresh_process). The assertion is unchanged: the charge must cover at least 90% of the measured peak. The bit-identity half of the nibble-swap test still runs in process. _rss_anon_now, now unused, is removed.

Verification

Charge over measured growth in the fresh process, three runs each:

op charge / growth
int8 ConvRot dequant 1.50, 1.50, 1.50
fp8 dequant 1.031, 1.035, 1.048
nibble swap 1.179, 1.027, 1.097

Each case stays above the 0.9 the test requires.

  • test_diffusion_comfy_block.py: 55 passed, 5 skipped (CUDA-only), serially and under -n 8.
  • Sabotage: undercharging _dequant (codes.numel() * 4 instead of the float32 intermediates) fails both float32_peak cases in the fresh process.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T05:40:46.994221Z 62c5c98 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 62c5c9879c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@danielhanchen
danielhanchen merged commit 84d45b3 into main Oct 29, 2026
0 of 33 checks passed
@danielhanchen
danielhanchen deleted the tests-int8-fp8-dequant-peak-fresh-process branch October 29, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant