[None][feat] Use XQA JIT impl by default and mitigate perf loss with sliding window#10335
Conversation
|
/bot run --add-multi-gpu-test |
|
PR_Github #30138 [ run ] triggered by Bot. Commit: |
|
PR_Github #30138 [ run ] completed with state
|
|
/bot run --add-multi-gpu-test --disable-fail-fast |
|
PR_Github #30170 [ run ] triggered by Bot. Commit: |
|
PR_Github #30170 [ run ] completed with state
|
|
/bot run --add-multi-gpu-test --disable-fail-fast |
|
PR_Github #30266 [ run ] triggered by Bot. Commit: |
|
PR_Github #30266 [ run ] completed with state |
|
/bot run --add-multi-gpu-test |
dd2f2b4 to
3997de3
Compare
|
/bot run --add-multi-gpu-test |
|
PR_Github #31889 [ run ] triggered by Bot. Commit: |
|
PR_Github #31889 [ run ] completed with state
|
Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
3997de3 to
5f55640
Compare
|
/bot run --add-multi-gpu-test |
📝 WalkthroughWalkthroughThese changes modify CUDA kernel generation and masking logic for XQA attention kernels. Updates include explicit C++ namespace declaration changes, expanded TOKENS_PER_PAGE configuration support (adding 32-token variant), introduction of a new sliding window + SPEC_DEC masking function, and simplified implementation selection logic that removes multi-branch platform-specific handling. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (5)**/*.{cpp,cc,cxx,h,hpp,hxx,cu,cuh}📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
**/*.{cpp,cc,cxx,cu}📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
**/*.{h,hpp,hxx,cpp,cc,cxx,cu,cuh}📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
**/*.{cpp,cc,cxx,h,hpp,hxx,cu,cuh,py}📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
**/*.py📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
🧠 Learnings (15)📓 Common learnings📚 Learning: 2025-08-15T06:46:54.897ZApplied to files:
📚 Learning: 2025-08-20T06:56:02.889ZApplied to files:
📚 Learning: 2025-09-23T15:01:00.070ZApplied to files:
📚 Learning: 2025-08-08T05:06:31.596ZApplied to files:
📚 Learning: 2025-08-14T21:04:50.248ZApplied to files:
📚 Learning: 2025-09-23T15:01:00.070ZApplied to files:
📚 Learning: 2025-08-06T13:58:07.506ZApplied to files:
📚 Learning: 2025-09-23T15:13:48.819ZApplied to files:
📚 Learning: 2025-09-23T14:58:05.372ZApplied to files:
📚 Learning: 2026-01-06T03:07:15.754ZApplied to files:
📚 Learning: 2025-08-22T01:54:35.850ZApplied to files:
📚 Learning: 2025-09-09T09:40:45.658ZApplied to files:
📚 Learning: 2025-08-20T07:43:36.447ZApplied to files:
📚 Learning: 2026-01-06T03:07:15.754ZApplied to files:
🧬 Code graph analysis (1)cpp/kernels/xqa/mha.cu (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (5)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
PR_Github #31960 [ run ] triggered by Bot. Commit: |
|
PR_Github #31960 [ run ] completed with state
|
jhaotingc
left a comment
There was a problem hiding this comment.
LGTM! Thanks for resolving perf issue when SLIDING_WINDOW=1!
|
/bot run --add-multi-gpu-test --disable-fail-fast |
|
PR_Github #32052 [ run ] triggered by Bot. Commit: |
|
PR_Github #32052 [ run ] completed with state
|
|
/bot run --add-multi-gpu-test --disable-fail-fast |
|
PR_Github #32077 [ run ] triggered by Bot. Commit: |
|
PR_Github #32077 [ run ] completed with state |
…sliding window (NVIDIA#10335) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
…sliding window (NVIDIA#10335) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
…gate perf loss with sliding window (#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
…d mitigate perf loss with sliding window (NVIDIA#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
…d mitigate perf loss with sliding window (NVIDIA#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…d mitigate perf loss with sliding window (NVIDIA#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…d mitigate perf loss with sliding window (NVIDIA#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…d mitigate perf loss with sliding window (NVIDIA#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…d mitigate perf loss with sliding window (NVIDIA#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…d mitigate perf loss with sliding window (NVIDIA#10954) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.
Description
This PR uses XQA JIT for all cases.
Current XQA has 2 execution path, one is to use legacy pre-compiled cubin and the other is JIT.
With most kernel has been moved to JIT after https://github.com/NVIDIA/TensorRT-LLM/pull/6078 , remaining kernel are only speculative kernel withfp/bf16 kvcache and 64 % (num_q_head / num_kv_heads) != 0. Some affected models include: Mixtral-8x22B-Instruct-v0.1, Qwen2.5-VL-7B-Instruct, Llama-3.2-3B-Instruct, ...
If fully converted to JIT, we can avoid maintaining 2 separate host invoke code, and remove hundreds of cubins.
This PR remove pre-compiled cubin path from normal execution but keep the code and knob for a release. Then we remove pre-compiled cubin completely after 1-2 releases.
Also, this PR tried to mitigate a perf issue of sliding window with speculative after #8383 . Before this PR, enabling sliding window but not using it at runtime (pass max window size with a size larger than KV lens) will suffer a 5% perf loss compared to disabling sliding window feature completely. Below are some perf data between pre-compiled version, jit version, and jit version with the fix.
Using Qwen3-8B, spec length = 3, ISL=4096, OSL=1024
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]to print this help message.See details below for each supported subcommand.
Details
run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]Launch build/test pipelines. All previously running jobs will be killed.
--reuse-test (optional)pipeline-id(OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.--disable-reuse-test(OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.--disable-fail-fast(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-PyTorch-1, xxx"(OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--test-backend "pytorch, cpp"(OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.--only-multi-gpu-test(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test(OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.--post-merge(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx"(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".--detailed-log(OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.--debug(OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in thestage-listparameter to access the appropriate container environment. Note: Does NOT update GitHub check status.For guidance on mapping tests to stage names, see
docs/source/reference/ci-overview.mdand the
scripts/test_to_stage_mapping.pyhelper.kill
killKill all running builds associated with pull request.
skip
skip --comment COMMENTSkip testing for latest commit on pull request.
--comment "Reason for skipping build/test"is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipelineReuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.