From f259d63930ec40f06ec4d34709f84004a9b56ecf Mon Sep 17 00:00:00 2001 From: biondizzle Date: Sat, 6 Jun 2026 07:01:52 +0000 Subject: [PATCH] =?UTF-8?q?CRITICAL=20FIX:=20SE=20swizzled=20buffers=20wer?= =?UTF-8?q?e=20allocated=20then=20overwritten=20with=20None=20=E2=80=94=20?= =?UTF-8?q?graph=20capture=20would=20fall=20through=20to=20broken=20Python?= =?UTF-8?q?=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dsv4/layers/shared_expert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsv4/layers/shared_expert.py b/dsv4/layers/shared_expert.py index afcef89a..917d8461 100644 --- a/dsv4/layers/shared_expert.py +++ b/dsv4/layers/shared_expert.py @@ -188,8 +188,8 @@ class Nvfp4SharedExpert: self._l2_gsa_buf = torch.zeros(1, dtype=torch.float32, device=self.device) # Pre-allocated swizzled scale output buffers (for CUDA graph capture) - self._padded_x_sf_swizzled_buf_l1 = None - self._padded_x_sf_swizzled_buf_l2 = None + # NOTE: _padded_x_sf_swizzled_buf_l1/l2 are allocated above (line 183-184) + # Do NOT set to None — they are required for CUDA graph capture swizzle path # Pre-allocated L1 output buffer for graph capture # L1 produces gate+up combined: 2 * intermediate_size BF16 columns