refactor(runtime)!: adopt the modern Infini stack - #506
Draft
voltjia wants to merge 33 commits into
Draft
Conversation
voltjia
force-pushed
the
refactor/adopt-modern-infini-stack
branch
3 times, most recently
from
August 13, 2026 15:26
7c36e2f to
077867b
Compare
BREAKING CHANGE: legacy InfiniCore runtime and inference APIs are removed in favor of InfiniRT, InfiniOps, and the migrated InfiniLM runtime.
Carry segmented P2P graph replay, graph-aware tensor initializers, runtime compatibility helpers, and long-context chunking into the InfiniLM-owned runtime. Preserve the stronger migrated graph ownership, cancellation, and allocation lease semantics while reconciling current InfiniLM attention behavior.
voltjia
force-pushed
the
refactor/adopt-modern-infini-stack
branch
from
August 25, 2026 05:12
9439ea6 to
9d64e14
Compare
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.
Summary
mainat80bb09ecebc9aabf198b9b866a89456bca1df946.master, then unlock the NVIDIA capabilities whose complete provider and InfiniLM execution paths are now validated.The refreshed branch contains 32 commits on top of current
main; the final head is8c2d3f5acc845481d4aff5767881ec0d5d1bc1c9.Related to InfiniTensor/InfiniCore#1373.
Rebase and InfiniCore delta audit
The original migration source ended at InfiniCore
d616d4f032e65f901287cbf4e1e6ec4b551703f9. That source and the audited InfiniCore line diverge at1590de7b0b469af45af5e073996d5a3fab277041; the migration synchronization endpoint was9855c0c6227093dc35b5a49c3b24792e9d99171e.The post-migration audit produced four effective synchronization groups:
Parameterloading, and improved tensor-view diagnostics.Tensor::onesandTensor::zerosimplemented through canonical Fill/InfiniRT paths.No fifth effective synchronization group was found after excluding changes already migrated, superseded by stronger InfiniLM behavior, or unrelated to this migration boundary.
Current upstream capability audit
The component contract still follows InfiniCore #1406:
55cfe5e6761c4ebb5e8eb77b65301479a7b6032c0cdbb16967e15f2e055dea1ec9641617bf3b6cf6f890afb4b2327f13ccdd3c1b6b0d49567c5fe00de8ccc0cb23ca5b1b1d63be29ba61ea031de72807The current upstream heads were also audited:
master:6b256e0ab0853d9e2a7ef059bac22c847bd02251. Its only delta from the pin is a Mars header fix.master:2d05aca88dc12a79a6aec26caef5bf2251752978. Its deltas from the pin are Ascend fixes, CMake package export, and native example repair; none changes the NVIDIA operator/API surface used here.No dependency pin bump is needed for this refresh. The selected InfiniOps closure now contains 24 operators, including Add plus the linked FlashAttention prefill/decode providers and paged-cache write provider.
Newly unlocked
Explicit FlashAttention
--attn=flash-attnnow selects the existingFLASH_ATTNbackend instead of throwing.flash_attn_varlen_funcandflash_attn_with_kvcache, plusreshape_and_cache_flash.Linear bias
beta=0and compose broadcast Add for bias.Dense model factory
The modern backend now compiles and enables:
baichuan,chatglm,fm9g,fm9g7b,glm4,internlm3,llama,minicpm,minicpm4,qwen2, andqwen3.The public MiniCPM4 checkpoint keeps its raw
model_type=minicpm; the Python reader intentionally normalizes it tominicpm4, which is now selected, linked, and covered by a cross-layer contract.Pre-transposed weights
--pre-transposeis not Ascend-only. Its CLI description now reflects the validated one-time pre-transposition and packed-Gemm behavior on NVIDIA.Gates intentionally retained
sliding_window; a short prompt completing is not sufficient semantic coverage.masterhas no NVIDIAcausal_conv1d, selective-scan, or gated-delta-rule provider chain required by these models.Validation
Repository and native build
git diff --check: passed.2d05aca8configured, built, and installed with the complete 24-operator manifest.[3, 7] + [7]: output aliases the destination andmax_abs_error=0.Real-weight dense models
Two-token NVIDIA eager smokes passed for:
minicpm4implementationThe
fm9g7band nativeminicpmkeys share the already compiled FM9G registrar; they did not receive separate checkpoint smokes.FlashAttention
Bias, TP, and pre-transposition
A Qwen3-0.6B overlay enabled nonzero attention Q/K/V bias, attention-output bias, and MLP gate/up/down bias:
Preserved migration baseline
Type of change
Landing order
This PR remains draft until the remaining upstream dependencies land.