vllm
171eb482 - [Kernel] Add pluggable NaN/Inf tensor checks to NaN detector

Commit
245 days ago
[Kernel] Add pluggable NaN/Inf tensor checks to NaN detector Add check_tensor() to NaNDetector for checking arbitrary tensors at any point in the forward pass. Uses torch.isfinite() — all ops stay on GPU, CUDA-graph compatible, writes to the same per-token flag array as the RMSNorm kernel checks. Any module can register checkpoints via register() and call check_tensor(tensor, idx) in its forward. update_layer_names() picks up _nan_detect_indices dicts for readable names. Wire into DeepseekV2Attention to check attn_output before o_proj, distinguishing "attention produced NaN" from "o_proj produced NaN". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Author
Parents
Loading