perf(nvidia): reduce refactored inference overhead - #565
Merged
voltjia merged 12 commits intoSep 9, 2026
Merged
Conversation
voltjia
marked this pull request as ready for review
September 8, 2026 08:09
Ziminli
reviewed
Sep 8, 2026
voltjia
force-pushed
the
perf/cache-default-infiniops-implementation
branch
from
September 8, 2026 09:36
bf423c4 to
326cd45
Compare
Ziminli
approved these changes
Sep 9, 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.
Summary
Motivation
The modern Infini stack refactor introduced material inference latency regressions in several NVIDIA workloads. This PR collects the focused optimizations developed from per-case profiling, while keeping the fast paths narrowly gated by device, model configuration, tensor shape, layout, and dtype.
This PR targets
refactor/adopt-modern-infini-stack; no issue is linked.Type of Change
feat- new feature / new modelfix- bug fixperf- performance improvement (no behavioral change)refactor- code restructuring without behavior changetest- adding or fixing tests onlydocs- documentation onlybuild/ci- build system or CI configurationchore- tooling, formatting, or other non-code changesTest Results of Involved Models on Supported Platforms (Please attach screenshots)
python -m unittest discover -s test/static -p "test_*.py" -vpython -m unittest test/scripts/test_build_infini_stack.py -v326cd456_infinilmbuilt in 47.857 s using the recorded modern-stack prefixScreenshots are not attached yet. The focused runs retained structured logs, output hashes, telemetry, and result archives outside this source branch.
Benchmark / Performance Impact
All measurements used NVIDIA A100-SXM4-80GB GPUs. Negative deltas mean the later candidate was faster. These are separate causal stage comparisons and must not be added together. Except for the P03 cache result, they are two-pair order-balanced screening estimates rather than formal confidence intervals.
The focused measurements were made while developing individual stages. The branch is rebased onto
7c393761and ends at326cd456; a fresh A100 Release build passes. Focused inference confirmation remains pending.Notes for Reviewers
574ee4edadds the P12 ChatGLM graph eligibility as an intentionally isolated candidate commit. Its predicates are exact, but it is not yet claimed as a measured improvement.CI / ChatOps
PR-triggered
Check Formatandruffchecks pass at326cd456. The fullcijob is intentionally limited toworkflow_dispatch; focused P12 inference validation and an explicitly requested full CI run remain pending.Checklist
Title, Branch, and Commits
<type>/xxx-yyyy-zzzzand matches theperfPR type.refactor/adopt-modern-infini-stack, notmain; the branch is rebased on its current7c393761tip with no merge commits.fixup!/squash!/wipcommits remain.Scope and Design
General Code Hygiene (applies to all languages)
scripts/format.pyvalidation passes in a clean LF checkout with the CI formatter versions.git diff --check origin/refactor/adopt-modern-infini-stack..HEADpasses.C++ Specific (if C++ files changed)
clang-format 21.1.8validation passes for the changed C++ files.scripts/format.pyand the PRCheck Formatjob pass with the CI tool versions.csrc/models/llama_legacy/.Python Specific (if Python files changed)
ruff 0.15.20 checkandruff format --checkpass for the changed Python files.scripts/format.pyand the PRruffjob pass with the CI tool versions.python/infinilm/auto_config.py.Testing
test/bench/test_benchmark.pysanity coverage was not rerun in this focused iteration.Build, CI, and Tooling
326cd456passed a fresh-directory NVIDIA A100 Release_infinilmbuild.cijob requires an explicitworkflow_dispatchrun.Documentation
Security and Safety