[None][feat] Disable mamba replay by default - #14471
Conversation
Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
The CUDA kernel mamba2_mtp_ssm_cache_update requires contiguous dense inputs, but x_d_4d, B_d_4d, and C_d_4d arrive as non-contiguous views from torch.split + rearrange. Previously this was masked because the replay path (checked first) handled non-contiguous inputs via explicit Triton strides. With replay disabled by default, the custom op path is now reachable and fails on non-contiguous x. Add .contiguous() to x, B, C at the custom op call site (and keep the existing calls in the legacy/flashinfer path). Signed-off-by: tijyojwad <1127155+tijyojwad@users.noreply.github.com>
e9f0b5d to
731d779
Compare
📝 WalkthroughWalkthroughThis PR enforces tensor memory layout requirements for the Mamba 2 MTP decoder by introducing contiguous staging in the selective state update function, coordinating caller-side contiguity in the Mamba decoder, and adjusting the replay kernel default configuration to disabled. ChangesMamba tensor contiguity and state management
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 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 |
|
/bot run --disable-fail-fast |
|
PR_Github #49984 [ run ] triggered by Bot. Commit: |
Tabrizian
left a comment
There was a problem hiding this comment.
approving executor changes.
tensor.contiguous() already returns self when contiguous, so the explicit is_contiguous() check is unnecessary. Signed-off-by: tijyojwad <1127155+tijyojwad@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
|
|
/bot run --disable-fail-fast |
|
PR_Github #49993 [ run ] triggered by Bot. Commit: |
|
PR_Github #49984 [ run ] completed with state |
|
PR_Github #49993 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #50033 [ run ] triggered by Bot. Commit: |
|
PR_Github #50033 [ run ] completed with state |
Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com> Signed-off-by: tijyojwad <1127155+tijyojwad@users.noreply.github.com> Co-authored-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com> Signed-off-by: tijyojwad <1127155+tijyojwad@users.noreply.github.com> Co-authored-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
Summary by CodeRabbit
Description
This PR overrides the PR from #14439 with an additional bug fix
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.