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