feat: support Ascend950 attention and paged KV cache. - #2083
Open
wuyifan2017 wants to merge 2 commits into
Open
Conversation
wuyifan2017
requested review from
Clement-Wang26,
DongheJin,
DragonFive,
JimHsiung,
Kang-Meng,
RobbieLeung,
XuZhang99,
liujinguang0125,
liutongxuan,
walsonyang,
xiao-yu-chen,
yingxudeng,
yq33victor and
zhang-minchao
as code owners
July 30, 2026 06:54
wuyifan2017
force-pushed
the
codex/a5-attention-reshape-cache
branch
from
July 31, 2026 03:40
cb2c2a9 to
eef9c22
Compare
yingxudeng
reviewed
Jul 31, 2026
|
|
||
| constexpr int64_t kSwaIntMax = 2147483647; | ||
|
|
||
| bool is_ascend950() { |
Collaborator
There was a problem hiding this comment.
is_ascend950() 和 expand_kv_heads 不同文件完全重复定义。可以考虑放到 core/kernels/npu/utils.h 或者其他合适位置
wuyifan2017
force-pushed
the
codex/a5-attention-reshape-cache
branch
from
August 3, 2026 03:02
afe5924 to
222ddc0
Compare
yingxudeng
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ReshapeAndCacheA5wrapper and register the wrapper in the NPU kernel target.Related Issues
Depends on xLLM-AI/xllm-ops#31.
Change Type
Pull Request Checklist
PR Title and Commit Messages
<type>: <subject>.Pre-commit Checks
pre-commitby runningpip install pre-commitor an equivalent command.pre-commit install.pre-commit run --all-filesand fixed any reported issues.Self Review
.agents/skills/code-review/references/custom-code-style.md, especially code written or assisted by AI.mainbranch.Build and Test Coverage
python setup.py build testhas passed on a CUDA machine.python setup.py build testhas passed on an NPU machine.python setup.py build testhas passed on an MLU machine.Reviewer Notes
pre-commit run --all-filespasses.