[TRTLLM-15314][feat] Add FP8 LoRA support for B200 - #17521
Conversation
dd28d1b to
2ca0da5
Compare
|
/bot run |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughFP8 grouped GEMM now supports SM90 and SM100 through architecture-specific CUTLASS implementations. LoRA capability detection queries kernel availability and controls FP8 initialization, weight retention, and dtype fallback. ChangesFP8 LoRA support
Estimated code review effort: 4 (Complex) | ~45 minutes Mergeability Score: ⚪ Minimal · up to The PR adds B200 FP8 LoRA support with documented regression coverage, and no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant LoRAManager
participant TorchOperator
participant GroupedGemm
participant Sm90ConfigOrSm100Config
LoRAManager->>TorchOperator: query native FP8 support
TorchOperator->>GroupedGemm: pass SM version
GroupedGemm->>Sm90ConfigOrSm100Config: select architecture configuration
Sm90ConfigOrSm100Config-->>GroupedGemm: return compiled-kernel capability
GroupedGemm-->>TorchOperator: return FP8 availability
TorchOperator-->>LoRAManager: retain FP8 or use dtype fallback
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #65451 [ run ] triggered by Bot. Commit: |
|
PR_Github #65451 [ run ] completed with state
|
|
/bot run |
|
PR_Github #65482 [ run ] triggered by Bot. Commit: |
|
PR_Github #65482 [ run ] completed with state
|
|
/bot run |
|
PR_Github #65579 [ run ] triggered by Bot. Commit: |
|
PR_Github #65579 [ run ] completed with state
|
2ca0da5 to
3d3fb70
Compare
|
/bot run |
|
PR_Github #65627 [ run ] triggered by Bot. Commit: |
brnguyen2
left a comment
There was a problem hiding this comment.
The feature ticket slot is [None] — extending FP8 LoRA to a new architecture is a nontrivial feature and should carry a TRTLLM JIRA for tracking, especially with the autotuning follow-up already planned.
Two non-blocking notes:
docs/source/features/lora.mddoesn't document native FP8 adapter support at all (the gap predates this PR, from #16810). Since the supported-architecture story is now SM90+SM100 with explicit SM120/121 rejection, this is a good point to add a row to the support matrix — fine as a follow-up.- The capability plumbing is well done:
supports_native_fp8_loragates on what the binary actually compiled (via the new torch op) rather than device SM alone, so a build withEXCLUDE_SM_100Fdegrades to the bf16 conversion path instead of aborting inside the GEMM at runtime.
Main pre-merge ask is the CI test-list registration (see inline comments): as it stands, none of the SM100 kernel or manager tests execute in any CI stage.
|
PR_Github #65627 [ run ] completed with state
|
f3e4131 to
ddd5a05
Compare
|
/bot run |
|
PR_Github #67964 [ run ] triggered by Bot. Commit: |
|
PR_Github #67964 [ run ] completed with state
|
|
/bot run |
|
PR_Github #68101 [ run ] triggered by Bot. Commit: |
|
PR_Github #68101 [ run ] completed with state
|
|
/bot run |
|
PR_Github #68392 [ run ] triggered by Bot. Commit: |
|
PR_Github #68392 [ run ] completed with state
|
|
/bot run |
|
PR_Github #68435 [ run ] triggered by Bot. Commit: |
|
PR_Github #68435 [ run ] completed with state
|
Add native SM100 FP8 grouped GEMM dispatch for eager and CUDA graph LoRA paths, mirror CUTLASS cluster settings, and size persistent grids using active clusters. Share the runtime kernel capability gate between adapter loading and cache initialization, preserve compute-dtype fallback for unsupported builds, and warn when the capability query is unavailable. Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
ddd5a05 to
a4483f2
Compare
|
/bot run |
|
PR_Github #68440 [ run ] triggered by Bot. Commit: |
|
PR_Github #68440 [ run ] completed with state
|
|
/bot run |
|
PR_Github #68539 [ run ] triggered by Bot. Commit: |
|
PR_Github #68539 [ run ] completed with state |
Dev Engineer Review
supportsFp8GroupedGemmandlora_grouped_gemm_supports_fp8capability queries.QA Engineer Review
test_supports_native_fp8_loratest_missing_native_fp8_lora_capability_query_warns_oncetest_native_fp8_lora_initializes_fp8_cachetest_device_without_native_kernels_does_not_initialize_fp8_cachetest_missing_native_fp8_lora_kernels_do_not_initialize_fp8_cachetest_non_fp8_lora_does_not_query_device_capabilitytest_lora_manager.pyand_torch/loratotests/integration/test_lists/test-db/l0_b200.yml.Description
Extends dense native-FP8 LoRA support from Hopper SM90 to B200 SM100 while preserving the existing SM90 path and continuing to reject unsupported SM120/SM121 devices.
The eager and CUDA-graph grouped-GEMM paths now dispatch a dedicated CUTLASS SM100 collective with a 128x256x128 tile, a 1-SM Blackwell schedule, and CUTLASS's preferred
(4, 2, 1)plus fallback(2, 1, 1)cluster shapes. The LoRA manager accepts SM100 FP8 adapters, and regression coverage verifies the architecture gates and both dispatch paths.This change retains the existing dense-only, homogeneous E4M3 PEFT-cache contract and alignment requirements. Routed-expert MoE FP8 LoRA and SM120/SM121 support remain out of scope. Kernel tactic and cluster-shape autotuning is also left for a separate performance follow-up.
Test Coverage
Validated on one NVIDIA B200:
Incremental Release build of
tensorrt_llm,bindings, andgtest_maintargets.Eager FP8 grouped GEMM matches its reference on SM100.
CUDA-graph FP8 grouped GEMM matches its reference after graph replay on SM100.
Full FP8 LoRA regression suite plus dense Qwen3 BF16-control and FP8-adapter end-to-end tests:
The warnings are existing environment warnings for the ModelOpt/Transformers version combination and an unknown pytest
xdist_start_methodoption.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.