Skip to content

Instantly share code, notes, and snippets.

View wenscarl's full-sized avatar

Shu Wang wenscarl

View GitHub Profile
@wenscarl
wenscarl / analyze_mnnvl_dump.py
Last active May 13, 2026 16:17
Script for analyzing the input for debugging mnnvl allreduce hang
#!/usr/bin/env python3
"""Analyze MNNVL hang dumps for FTZ subnormal victims (enhanced).
Same dump format as /mis/analyze_mnnvl_dump.py — reads
``mnnvl_hang_rank{R}_call{N}.pt`` files produced by ``flashinfer_comm_fusion``
when ``SGLANG_MNNVL_HANG_DUMP=1``. This version additionally prints, per tensor:
* range stats (min / max / |x|>0 min / |x| max / exact-zero count)
* the K smallest-magnitude elements with their bit patterns and tensor coords
(so you can SEE where the tensor sits relative to the subnormal boundary