loopyt 74ba468e76 fix(debug): move debug_dump out of h20_ops so other platforms can import it
The dump hooks live in five platform-neutral files -- `sampler.py`, `mlp.py`, `deepseek.py`,
`decoder_layer.py`, `model_runner.py` -- and all of them imported
`deepinfer.h20_ops.debug_dump`. That is wrong on every platform except SM90: `h20_ops/__init__.py`
calls `extend_import_patches(override=True, ...)` at module scope, so importing it from shared code
installs the SM90 import shims globally. On an SM100 machine that replaces
`flash_mla.decode_mla_mqa_sparse`, `flash_mla.prefill_attn_varlen_sparse` and
`deep_select.interface.topk` with the Hopper implementations, and on NPU it would do the same
before the Ascend shims get a chance to matter.

`debug_dump` itself has nothing platform-specific in it -- `os`, `pathlib`, `numpy`, `torch` --
so it moves to `deepinfer/debug_dump.py` and the five imports follow. Verified that importing it
no longer pulls `h20_ops` into `sys.modules`, and re-ran the end-to-end check on H20: same output
token for token, `[17607, 2793, 3139, 666, 6127, 666, 320, 1]`.

This bug is already in the open PR, so it needs to land before that PR is worth reviewing further.
2026-10-21 22:37:49 +08:00
..
__init__.py initial commit 2026-10-20 12:09:42 +08:00
base.py initial commit 2026-10-20 12:09:42 +08:00
cache_engine.py feat: add SM90 (Hopper) support for DeepSeek-V4.1 inference 2026-10-21 15:18:56 +08:00
cuda_graph_runner.py initial commit 2026-10-20 12:09:42 +08:00
decode_perf_cache.py initial commit 2026-10-20 12:09:42 +08:00
dflash_cuda_graph_runner.py initial commit 2026-10-20 12:09:42 +08:00
model_runner.py fix(debug): move debug_dump out of h20_ops so other platforms can import it 2026-10-21 22:37:49 +08:00
runtime_config.py initial commit 2026-10-20 12:09:42 +08:00
worker.py initial commit 2026-10-20 12:09:42 +08:00
zos_status.py initial commit 2026-10-20 12:09:42 +08:00