Repository navigation
fix: chunk MiniMax-H3 MLP to respect backend buffer limits - #2257
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Backend-aware MLP forward pass src/model/diffusion/minimax_h3.hpp |
MLP stores ffn_hidden_size. When a backend is present, forward derives a chunk limit from the aligned maximum buffer size and activation widths. Oversized inputs are sliced along dimension 1, made contiguous when needed, processed, and concatenated. Other inputs use one pass. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- [Bug] MiniMax-H3 DiT: MLP fc1 output exceeds Vulkan's 4 GiB buffer limit above 37,449 tokens; the MLP of every layer falls back to CPU #2242: This change chunks MiniMax-H3 MLP activations along the token axis to keep them within the backend buffer limit described in the issue.
Possibly related PRs
- leejet/stable-diffusion.cpp#2240: This PR extends the MiniMax-H3 MLP implementation changed in PR
#2240, adding token-axis chunking when backend buffer limits would be exceeded.
Merge Risk: 
Minimal · up to 792cd
-
No concrete merge-blocking issue was established for the chunked MLP.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Summary
Related Issue / Discussion
Addresses #2242.
Additional Information
N/A
Checklist
Summary by CodeRabbit