执行摘要
NPU 上 support_triton 误将 ascend 排除,修复 MTP 性能
修复 support_triton bug,该 bug 影响 MTP 性能。compute_position 应该使用 Triton。
值得合入,修复性能回退。审查简单,风险低。
无 review 评论。
修复 support_triton bug,该 bug 影响 MTP 性能。compute_position 应该使用 Triton。
值得合入,修复性能回退。审查简单,风险低。
无 review 评论。
修改 python/sglang/srt/utils/common.py 中的 support_triton 函数,从排除列表中移除 "ascend"。变更仅一行,将 return backend not in ["torch_native", "intel_amx", "ascend"] 改为 return backend not in ["torch_native", "intel_amx"]。
| 文件 | 模块 | 状态 | 重要度 |
|---|---|---|---|
python/sglang/srt/utils/common.py |
工具函数 | modified | 5.12 |
python/sglang/srt/utils/common.py
core-logic
修改了 support_triton 函数,从排除列表中移除 "ascend",修复 NPU 性能 bug。
def support_triton(backend: str) -> bool:
# 之前在 #21507 中错误地将 "ascend" 加入了排除列表,
# 导致 Ascend NPU 后端无法使用 Triton 内核,
# 进而影响 compute_position 等操作的性能。
# 本 PR 将其移除,恢复 Ascend 对 Triton 的支持。
return backend not in ["torch_native", "intel_amx"]
当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。
低风险。变更简单,仅影响 Ascend NPU 后端。需要确保其他使用 support_triton 的地方不会因为 "ascend" 不被排除而产生问题。
影响:主要面向 NPU 用户,修复 MTP 性能回退。影响范围限于 Ascend 后端。
当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。
参与讨论