sskj/platforms/patches/kunlun_p800/sitecustomize_xpu.py
Quantong Qiu 227ef603a6 refactor: experiments/ + platforms/ layout and P800 SGLang support
- Restructure repo around experiments/<name>/ and platforms/<chip>.env.
- Add shared scripts under scripts/common/ for platform/server/bench-client logic.
- Add Kunlun P800 platform config and runtime patches.
- Add dsv4_p800_sglang experiment with INT8 smoke-test support.
- Update BENCHMARK_WORKFLOW.md and README.md with chip/engine recording rules.
- Add scripts/analysis/compare_experiments.py for cross-experiment comparison.
- Ignore experiments/*/results/ raw output directories by default.
2026-07-08 05:15:59 +00:00

8 lines
344 B
Python

import torch
# DeepSeek-V4-Flash safetensors contain F8_E8M0FN dtype metadata, but
# PyTorch 2.5.1 does not define this dtype. Alias it to uint8 so that
# safetensors deserialization can load the scales; sglang reinterprets
# them on P800 via its own FP8 kernels.
if not hasattr(torch, "float8_e8m0fnu"):
torch.float8_e8m0fnu = torch.uint8