Repository navigation
issue/1573 perf(kunlun): parallelize RoPE and bound native positions - #1574
Closed
JoeZhang-0x000 wants to merge 1 commit into
Closed
JoeZhang-0x000 wants to merge 1 commit into
JoeZhang-0x000 wants to merge 1 commit into
Conversation
JoeZhang-0x000
force-pushed
the
issue/1573
branch
from
October 10, 2026 08:17
12d9738 to
6379179
Compare
This was referenced Oct 10, 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.
Superseded by InfiniRT #48 (runtime prerequisite) and InfiniOps #1001 (minimal Kunlun RoPE backend). This legacy InfiniCore PR is closed; fresh modern-API correctness and performance results are in the InfiniOps PR description.
Improve Kunlun RoPE utilization on P800 by striping workers across clusters and querying up to 12 available clusters. Bound native integer positions inside the kernel, reject empty tables, and expose an optional capability bit so callers can skip cast/clamp. Rotation arithmetic is preserved.
Closes #1573. Targets the experiment's legacy
InfiniLM-v0.2.9cbranch.Validation on one P800 OAM: 96 correctness cases and 192 changed-input/position Graph replays passed per build, covering BF16/FP16/FP32, I32/I64/U32/U64, both layouts, packed strides, in-place and batched inputs; candidate boundary/extrema checks passed. All 24 benchmark Q/K hash pairs match across four runs.
Median kernel-only Q+K latency, BF16, 8192 tokens, head dimension 128. TP labels are per-rank shapes measured on one XPU.
Timing uses 8 Q+K pairs/Graph × 20 synchronized replays/sample, median of 5 samples. Removing caller cast/clamp gives 1.311–1.563x across 24 shapes (1–8192 tokens); adoption of the capability is required. Small kernel-only inputs regress by up to 0.65 us (6.0%).
Both RoPE translation units were freshly compiled against target-branch headers and relinked with identical pinned runtime/objects; a full branch rebuild was not run. Kernel bytes are unchanged from the validated version. Prior downstream integration achieved a 0 pp GSM8K gap and all 40 static-throughput cases ≥90% native with combined plugin optimizations.