Skip to content

perf(ascend): vectorize RoPE AscendC kernel - #1559

Open
porcelina62 wants to merge 1 commit into
InfiniTensor:mainfrom
porcelina62:rope-ascend-perf
Open

porcelina62 wants to merge 1 commit into
InfiniTensor:mainfrom
porcelina62:rope-ascend-perf

Conversation

@porcelina62

Copy link
Copy Markdown

Summary

  • Optimize AscendC RoPE kernel from PR fix rope op to adapt with ascend #1217 (rope_ascend_kernel.cpp only)
  • GPT-J: vector Gather path instead of scalar interleave writeback
  • NeoX: half-slice Mul/Sub/Add; soft double-buffer on seq loop

Note

Targets AscendC RoPE at 099cc3e (PR #1217). Current main moved ops to InfiniOps (ACLNN). Single-file review vs 099cc3e:
099cc3e...porcelina62:rope-ascend-perf

Test plan

  • Built via InfiniCore Ascend CMake into libascend_kernels.a
  • rope_kernel_*_launch vs test/infiniop/rope.py cases: 54/54 PASS
  • Perf on 910B3 NeoX BF16: ~1.69×–4.81× (geo ~2.44×) vs PR baseline

Made with Cursor

Replace GPT-J scalar interleave writeback with Gather-based vector path,
use NeoX half-slice Mul/Sub/Add, and soft-double-buffer the token loop.
@porcelina62
porcelina62 requested a review from a team September 16, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant