Repository navigation
Studio diffusion: latch failed fused fp16 RoPE and AdaLN launches for the load - #14583
Conversation
… the load A failing launch of the fp16 FLUX.2 RoPE kernel or the opt-in fused AdaLN modulation kernel was retried on every call. The first failure now turns that fused path off for the rest of the load (stock output, bit-identical), logs one warning, and the next load or uninstall re-arms it, matching the fused FLUX RoPE latch.
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. Already looking forward to the next diff. 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". |
Problem
Follow-up to #14566, which made the fused FLUX RoPE in
diffusion_rocm_fused.pyturn itself off for the rest of the load after its first failed launch. Two sibling wrappers still retried a failing launch on every call, so a broken JIT / driver / PTX path paid the failed launch once per RoPE or AdaLN call for the whole render:diffusion_flux2_rope.pyUNSLOTH_DIFFUSION_FUSED_ADALN=1) indiffusion_rocm_fused.pyFix
Same latch as the fused FLUX RoPE:
uninstall()and the next load's install clear the flag, so a new load tries the kernel again._adaln_eligible(no behaviour change) so the latch is testable without a GPU.Tests
test_a_failed_launch_disables_the_fused_path_for_the_load(test_diffusion_flux2_rope.py) andtest_a_failed_adaln_launch_disables_the_fused_path_for_the_load(test_diffusion_rocm_fused.py): a raising launcher, four calls, exactly one launch attempt, stock output after the failure, re-armed after reload. Both fail on main and pass here.Not verified