Skip to content

Repair four checks that are red on main (ROCm tag guard, H3 offload, DMD diffusers skip, risky loader lint) - #18824

Merged
danielhanchen merged 1 commit into
mainfrom
fix/main-diffusion-reds-nov22
Nov 22, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/main-diffusion-reds-nov22

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Four checks are red on main itself, so every open PR currently inherits them in the Backend CI shards and the risky loader lint. Each was reproduced on a clean main checkout before fixing.

Failing check Introduced by Which side was wrong Fix
tests/test_diffusion_rocm_tag_detect.py::test_no_diffusion_or_video_gate_reads_version_hip_directly #18793 (diffusion_regional_compile.py) and #18792 (diffusion_vae_strips.py) Code. Both new gates read torch.version.hip directly, which the ROCm tag guard exists to forbid (a CUDA wheel with a stray hip attribute, or a ROCm wheel reporting it differently, takes the wrong branch). Route both through the shared is_rocm_torch(torch) helper from rocm_bf16. Behaviour on CUDA and ROCm is unchanged.
tests/test_h3_quantised_offload.py::test_a_streamed_torchao_render_runs_under_no_grad_and_the_rest_keep_inference_mode #18780 added draft_ctx to the denoise with Test. The invariant (the denoise loop enters grad_ctx together with its progress context) still holds; the test pinned one exact spelling of the with line. Parse the with statements and assert grad_ctx and progress_ctx() are entered together, regardless of what other contexts join them. Verified it still fails when grad_ctx is dropped from the statement.
tests/test_video_dmd.py::test_dmd_scheduler_reseeds_per_render, ::test_renoise_stream_is_independent_of_the_initial_latent_noise #18779 Test. make_dmd_scheduler builds on a diffusers scheduler, but these two tests only skipped on missing torch, so they error with No module named 'diffusers' in the shard that runs without diffusers. pytest.importorskip("diffusers"), matching the existing scheduler test in the same file.
scripts/lint_risky_loaders.py (diffusion_ddp.py:440 [dynamic-import] __import__) #18771 Code. The rank bootstrap imported two fixed modules through __import__ in a loop. Import utils.native_tls and utils.happy_eyeballs by name, each in its own try, so a failure in one still does not stop the rank or skip the other. No baseline entry needed.

Testing

  • tests/test_diffusion_rocm_tag_detect.py, tests/test_h3_quantised_offload.py, tests/test_video_dmd.py, tests/test_diffusion_ddp.py, tests/test_diffusion_training.py, the native TLS and happy eyeballs suites, and the regional compile and VAE strip suites: all pass.
  • tests/test_video_dmd.py with diffusers blocked from import: 26 passed, 7 skipped (previously 2 errors).
  • python scripts/lint_risky_loaders.py: all call sites recorded.
  • Sabotage: restoring either original torch.version.hip read makes the ROCm tag guard fail; restoring the __import__ loop makes the risky loader lint fail.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T02:18:21.888729Z 0c44637 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.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 0c446379d5

ℹ️ 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 f63869b into main Nov 22, 2026
@danielhanchen
danielhanchen deleted the fix/main-diffusion-reds-nov22 branch November 22, 2026 02:56
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