From 7114c485750eb3f881be0587c9ddae7dbc97a07d Mon Sep 17 00:00:00 2001 From: biondizzle Date: Tue, 2 Jun 2026 02:56:13 +0000 Subject: [PATCH] fix: parenthesize profile_detail condition --- single_shot_inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/single_shot_inference.py b/single_shot_inference.py index 50abe2aa..ff3af73f 100644 --- a/single_shot_inference.py +++ b/single_shot_inference.py @@ -567,7 +567,7 @@ def forward_layer(X_l, w, li, cfg, rope_cos, rope_sin, f"|X_l|={X_l.abs().max().item():.1f} " f"|X_mid|={X_mid.abs().max().item():.1f} " f"|X_next|={X_next.abs().max().item():.1f}", flush=True) - if _profile_detail and li < 3 or li == 30 or li >= 58: + if _profile_detail and (li < 3 or li == 30 or li >= 58): torch.cuda.synchronize() attn_ms = (t_attn1 - t_attn0) * 1000 ffn_ms = (t_ffn1 - t_ffn0) * 1000