ViperEkura
cffedaad5e
perf: 消除非流式推理 CPU 空转并减少 decode GPU 张量冗余分配
- engine.py: _Result 改用 threading.Condition.wait_for 替代
Event busy-wait,非流式模式线程被内核挂起而非 1760 万次空转
- scheduler.py: _execute_decode 将 temperature/top_k/top_p 张量
移至循环外预先分配,避免每步重复 torch.tensor();input_ids
改用 torch.empty 避免不必要的 zero 初始化(两处均为完全覆盖)
- _execute_prefill: input_ids 同改为 torch.empty
2026-05-10 15:32:11 +08:00
..
2026-05-09 14:55:43 +08:00
2026-04-06 10:37:19 +08:00
2026-05-10 15:32:11 +08:00
2026-05-09 14:36:42 +08:00
2026-05-09 14:55:43 +08:00
2026-05-09 14:36:42 +08:00
2026-05-09 15:50:38 +08:00
2026-04-06 09:54:17 +08:00
2026-04-05 22:27:57 +08:00
2026-05-09 15:50:38 +08:00