inference-precision-tensor-dump-compare
Installation
SKILL.md
Tensor Dump Compare
在模型 forward 过程中打点,捕获中间 tensor,用于 GPU/NPU 精度对比。
支持框架: vLLM, SGLang
⚠️ 必须环境变量
vLLM 框架
| 变量 | 必须 | 说明 |
|---|---|---|
TORCHDYNAMO_DISABLE=1 |
✅ 必须 | 禁用 torch.compile,否则 tensor dump 日志无法输出 |
TENSOR_DUMP_ENABLE=1 |
✅ 必须 | 启用 tensor dump |
ASCEND_RT_VISIBLE_DEVICES |
推荐 | 指定 NPU 设备,如 0,1,2,3,4,5,6,7 |
⚠️ 重要: vLLM 默认启用 torch.compile,会导致 tensor dump 日志不输出。必须设置 TORCHDYNAMO_DISABLE=1!