[None][perf] Fuse FlashInfer GDN prefill state I/O into Triton kernels#14548
Conversation
Signed-off-by: nv-guomingz <137257613+nv-guomingz@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #50277 [ run ] triggered by Bot. Commit: |
📝 WalkthroughWalkthroughThis PR introduces fused Triton kernels for efficient bidirectional tensor layout conversion between TRT-LLM's ChangesFused State I/O and Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tensorrt_llm/_torch/modules/fla/fused_state_io.py (1)
1-24: 💤 Low valueAdd
__all__to document the public interface.Per coding guidelines, despite the prohibition on wildcard imports,
__all__should be kept updated to document the public interface. This module exports two public functions.Suggested addition after imports
import triton import triton.language as tl +__all__ = [ + "gather_cast_transpose_kv_to_fp32_vk", + "transpose_cast_scatter_fp32_vk_to_kv", +] + `@triton.jit`As per coding guidelines: "Despite the prohibition on wildcard imports, keep
__all__updated to document the public interface"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tensorrt_llm/_torch/modules/fla/fused_state_io.py` around lines 1 - 24, Add a module-level __all__ immediately after the imports to document the public API: include "gather_cast_transpose_kv_to_fp32_vk" and the other exported function name(s) from this module (i.e., the two public functions implemented in this file) as string entries in the __all__ list so tooling and readers know the intended public interface and keep it updated when exports change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tensorrt_llm/_torch/modules/fla/fused_state_io.py`:
- Around line 1-24: Add a module-level __all__ immediately after the imports to
document the public API: include "gather_cast_transpose_kv_to_fp32_vk" and the
other exported function name(s) from this module (i.e., the two public functions
implemented in this file) as string entries in the __all__ list so tooling and
readers know the intended public interface and keep it updated when exports
change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7b0abdba-9f30-40d1-80c7-7897200842f7
📒 Files selected for processing (4)
tensorrt_llm/_torch/modules/fla/flashinfer_chunk.pytensorrt_llm/_torch/modules/fla/fused_state_io.pytensorrt_llm/_torch/modules/mamba/gdn_mixer.pytests/unittest/_torch/modules/mamba/test_fused_state_io.py
|
PR_Github #50277 [ run ] completed with state |
NVIDIA#14548) Signed-off-by: nv-guomingz <137257613+nv-guomingz@users.noreply.github.com>
Summary by CodeRabbit
New Features
Improvements
Tests
Description
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)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.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
To see a list of available CI bot commands, please comment
/bot help.