Repository navigation
refactor riscv gemm microkernel - #6752
Conversation
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6752 +/- ##
==========================================
- Coverage 95.19% 95.15% -0.05%
==========================================
Files 1457 1456 -1
Lines 493714 495505 +1791
==========================================
+ Hits 469996 471482 +1486
- Misses 23718 24023 +305 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0a6655f26
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Please enable github action in YOUR FORKED REPO to make code-format workflow work |
…ME2 branch 合并上游对 riscv GEMM 微内核与 SDPA 的重构(Tencent#6752,含新的 sdpa_riscv 子层实现)。 冲突文件以上游新版为基,本分支的增量(IME2 Gemm 接管块、M=1 解码快路径)在随后的提交中移植。 Merge the upstream riscv GEMM microkernel / SDPA refactor (Tencent#6752, which adds its own sdpa_riscv sub-layer implementation). The conflicting files take the upstream version as the base; this branch's additions (the IME2 Gemm takeover block and the M=1 decode fast path) are ported in the following commits.
…he upstream refactor 在上游 Tencent#6752 重构后的基线上保留本分支的 SDPA 增量: * forward_rvv_decode —— M=1 解码快速路径(QK^T 逐位置点积 + 流式 P·V + RVV 向量化 exp), 解决解码随上下文长度塌陷的问题(507 token 上下文:5.22 -> 8.07 tok/s 于该改动当时); * forward_ime2_prefill / ime2_available —— SpacemiT K3 IME2 的 flash 式预填充路径; * 与之配套的解码分段计时(NCNN_SDPA_DECODE_PROF)与 KV cache 管理。 注:上游 Tencent#6752 同时新增了一版 sdpa_riscv(子层 qk_gemm/qkv_gemm/qk_softmax 实现)。 本分支保留了自研实现,因为它额外提供 M=1 解码快路径与 IME2 预填充,并已通过三腿逐字节闸门; 若上游更希望采用子层方案,可将本文件的解码路径作为增量移植到该方案之上(接口已兼容)。 Keep this branch's SDPA additions on top of the upstream refactor (Tencent#6752): the M=1 decode fast path (per-position dot product + streaming P·V + vectorised exp, which stops decode collapsing with context length), the IME2 flash prefill path, and the accompanying decode segment timers and KV-cache handling. Upstream Tencent#6752 also added its own sdpa_riscv (sub-layer based). This branch keeps the standalone implementation because it additionally provides the M=1 decode path and IME2 prefill, and it passes the three-leg byte-identical gate. If upstream prefers the sub-layer design, the decode path here can be ported onto it (the interfaces are compatible, as verified by building against the refactored base).
合并远端自动格式化提交;冲突文件取本分支版本,因为它已包含上游 Tencent#6752 的重构, 若取远端版本会把该重构回退掉。格式由上游 CI 统一处理。 Merge the remote code-format commit. The conflicted file keeps this branch's version because it already contains the upstream Tencent#6752 refactor; taking the remote side would revert it. Formatting is left to the upstream CI.
No description provided.