[Others]【Hackathon 10th Spring No.49】【RFC】并行 N-gram 匹配 GPU Kernel 设计文档 (V2.0)#1294
Closed
cloudforge1 wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Closing: will resubmit as inline edit to the existing merged RFC file per Baidu convention. |
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.
Motivation
RFC V2.0 design document for Hackathon 10th Spring Task No.49: 为 FastDeploy 支持投机解码功能 — 并行 N-gram 匹配 GPU Kernel。
This RFC supersedes the design section (§三) of the prior RFC #1213 (NKNaN, 2026-02-07) by providing a complete parallel architecture specification that was absent from the original. The prior RFC's §三 totaled 12 lines with no thread model, no parallelism strategy, and no extreme-config performance analysis.
What this RFC adds over #1213:
<<<bsz, 1024>>>+ Phase 2<<<1, 1024>>>atomicMin64CASBlockScanprefix-sum, O(bsz) parallelparallel_ngram_search_specialized<1/2/3>with register cachingImplementation PRs (already submitted, CI-verified on SM90 H20/H100):
Context: @freeliuzc clarified that the kernel must use parallel strategies for acceleration at bsz=256, seq_len=128K — requirements not present in the original task description or #1213. This RFC formally documents the parallel architecture that meets those requirements.
Modifications
rfcs/FastDeploy/20260404_parallel_ngram_match_gpu_kernel_for_fastdeploy.mdUsage or Command
N/A — documentation only.
Accuracy Tests
N/A — design document. Implementation accuracy verified in PRs #6960 and #7136 (11/11 tests passed, GPU output bit-identical to CPU reference).
Checklist
pre-commitbefore commit.releasebranch, cherry-pick fromdevelop. N/A — targetingmaster.