Skip to content

Studio tests: read the cudnn.benchmark opt-outs from the family catalog - #19125

Merged
danielhanchen merged 1 commit into
mainfrom
ci/cudnn-scope-test-reads-catalog
Nov 23, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/cudnn-scope-test-reads-catalog

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

studio/backend/tests/test_diffusion_backend.py::test_family_render_cudnn_scope_overrides_an_inherited_benchmark is red on main in Backend CI (Python 3.13, diffusion). It fails for every PR based on main since #19077, for example #19122:

with family_render_cudnn_scope(detect_family("krea/Krea-2-Turbo"), "cuda"):
    assert cudnn.benchmark is True  # a family that keeps the benchmark is left alone
AssertionError: assert False is True

Cause

#19077 is correct. It sets cudnn_benchmark = False on Krea-2 on purpose: the per-process VAE conv pick decoded one fixed latent three different ways across three fresh L4 homes.

The test is wrong. It used Krea-2 as its hard-coded example of a family that keeps cudnn.benchmark on, so pinning Krea-2 broke it. The same would happen whenever another family gets pinned.

Fix

Tests only. The test now reads both lists from _FAMILIES instead of naming a family:

  • for every family with cudnn_benchmark = False, the scope holds the flag off inside and restores it after;
  • for every family that keeps it, the scope leaves the flag alone;
  • the FLUX.2 Klein case and the CPU-device case are unchanged;
  • it asserts that both lists are non-empty, so it cannot pass vacuously.

Verification

  • The test passes; the whole file passes serially (694).
  • Sabotage A: make family_render_cudnn_scope ignore the family flag. The test fails, naming qwen-image-2.1, a family that keeps the benchmark.
  • Sabotage B: make the scope never hold the flag off. The test fails on the first opt-out.

#19077 turned cudnn.benchmark off for Krea-2 (its per-process VAE conv
pick decoded one latent three ways over fresh homes), but
test_family_render_cudnn_scope_overrides_an_inherited_benchmark still
used krea/Krea-2-Turbo as its family that keeps the benchmark, so the
Backend CI diffusion shard is red on main. Walk every family in
_FAMILIES instead: the scope holds the flag off for each opt-out and
leaves it alone for each family that keeps it.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 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-23T18:30:21.127231Z 8679d08 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. Chef's kiss.

Reviewed commit: 8679d08736

ℹ️ 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 ee6d37a into main Nov 23, 2026
@danielhanchen
danielhanchen deleted the ci/cudnn-scope-test-reads-catalog branch November 23, 2026 18:32
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