From 2717bafc30896dbf54c6f23d164b6ab37c56bc0b Mon Sep 17 00:00:00 2001 From: project6-dev Date: Thu, 13 Aug 2026 15:30:25 +0000 Subject: [PATCH] fix(OOM): skip flash_attn_varlen during profiling Only patch_xformers_sdpa_seq.py changed. No yaml changes. --- qwen3_6_scripts/patch_xformers_sdpa_seq.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qwen3_6_scripts/patch_xformers_sdpa_seq.py b/qwen3_6_scripts/patch_xformers_sdpa_seq.py index 8de1565a..af7037c2 100644 --- a/qwen3_6_scripts/patch_xformers_sdpa_seq.py +++ b/qwen3_6_scripts/patch_xformers_sdpa_seq.py @@ -200,6 +200,10 @@ FALLBACK_METHOD = ''' max_seqlen = max(seq_lens_list) try: + # Skip flash_attn during profiling — OOMs on large dummy batch + import os + if os.environ.get("BI100_IN_STARTUP_PROFILE") == "1": + raise RuntimeError("skip flash_attn during profiling") out = _ixf.flash_attn_varlen_func( q_flat.to(torch.float16), k_flat.to(torch.float16),