mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-11-01 01:06:23 +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). |
||
|---|---|---|
| .. | ||
| eplb | ||
| input_metadata | ||
| layers | ||
| models | ||
| parallel_utils | ||
| __init__.py | ||
| layer_utils.py | ||
| model_loader.py | ||
| model_metadata_utils.py | ||
| model_output.py | ||
| sampling_inputs.py | ||
| utils.py | ||