mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-31 08:46:21 +08:00
Groundwork for replacing TileLang with Triton on the H20 path, plus the first ported kernel. The scope is measured rather than guessed. `DEEPINFER_TRACE_KERNELS=<path>` proxies every `*_tl` factory in the dispatcher and records its first use; one full text-generation run on 8xH20 says exactly 24 kernels execute. `H20-TRITON-PLAN.md` lists them, in dependency order. `DEEPINFER_OPS_BACKEND` selects the backend package (unset keeps the platform default, so nothing changes by omission) and `DEEPINFER_OPS_FALLBACK` names individual kernels that must stay on the default. Kernels the selected backend does not export at all are taken from the default with a one-line notice, which lets a partial port run end to end the whole way through instead of only at the end. That coexistence is the reason for a parallel backend rather than an in-place rewrite: the TileLang kernel is a validated baseline, so each Triton kernel can be diffed against it on real shapes through the same public interface function, which is a much stronger check than comparing against a fresh Python reference. `scripts/h20_ops_ab.py` does that swap and reports per case. First kernel: `gather_tl`, all 9 cases bitwise identical (zeros filled for out-of-range indices, int8/bfloat16 payloads, strided rows, int32/int64 indices, empty and single-row inputs). |
||
|---|---|---|
| .. | ||
| _C | ||
| distributed | ||
| engine | ||
| entrypoints | ||
| h20_ops | ||
| hugging_face | ||
| model_executor | ||
| npu_ops | ||
| structure_output | ||
| ve | ||
| worker | ||
| __init__.py | ||
| attrdict.py | ||
| config.py | ||
| debug_dump.py | ||
| environ.py | ||
| load_class.py | ||
| logger.py | ||
| model_config_loader.py | ||
| multimodal_tokens.py | ||
| platform.py | ||
| py.typed | ||
| sampling_params.py | ||
| sequence.py | ||
| shared_memory.py | ||
| testing.py | ||
| timer.py | ||
| utils.py | ||