Repository navigation
fix(deepseek_v4): avoid TileLang boolx8 backward codegen - #3467
Merged
Merged
Conversation
Signed-off-by: Huiying Li <huiyingl@nvidia.com>
HuiyingLi
marked this pull request as ready for review
August 11, 2026 21:09
Contributor
Author
|
/claude review |
Contributor
Author
|
/ok to test 77b0a5c |
Contributor
|
LGTM Reviewed the single changed file Verified numerical equivalence to the prior behavior:
No gradient-determinism or dKV-accumulation behavior changed. As a Blackwell-specific codegen workaround with unchanged numerics, the absence of a new CPU unit test is appropriate. |
akoumpa
approved these changes
Aug 11, 2026
akoumpa
reviewed
Aug 11, 2026
Contributor
|
/ok to test 0ffbfc2 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do ?
Fix DeepSeek-V4 TileLang sparse-MLA backward compilation on Blackwell GPUs.
TileLang 0.1.11 vectorizes the per-block mask fragment. When the fragment is
stored as
bool, CUDA code generation attempts to materializeboolx8, whichhas no supported CUDA storage type. The Python interface already normalizes the
validity mask to 0/1
int32, so this change preserves that representation inthe kernel and forms scalar predicates only where they are consumed.
Changelog
int32instead ofbool.Validation
python3 -m pytest -q -s tests/unit_tests/models/deepseek_v4/test_dsv4_layers.py -k "test_sparse_attention_tilelang_backend_matches_torch"sparse_mqa_bwd_kerneland compared forward output plus Q, KV, and attention-sink gradients against the torch reference.5987874.ruff check,ruff format --check, andgit diff --check: passed.Before your PR is "Ready for review"
Pre checks:
Additional Information