Adjust resource-sensitive MACA examples for contiguous inputs and smaller launch configurations#35
Open
VitalyAnkh wants to merge 3 commits into
Open
Conversation
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
7af1244 to
0143a59
Compare
0143a59 to
b72cfe6
Compare
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.
Fixes #29.
Review note
This branch now carries only the shared MACA backend prerequisite from #33 plus the resource-portability changes below. It no longer includes the low-precision example work from #34.
Problem
A separate group of MACA failures is caused by resource assumptions at the example layer. The algorithms are sound, but some examples pass non-contiguous inputs into TileLang kernels or use launch settings that exceed practical MACA limits.
What this PR changes
Solution
The fix is to make the examples portable with respect to layout and resource usage. By ensuring contiguity and choosing MACA-safe launch parameters, the same kernels can execute correctly without inflating the example logic with hidden assumptions about a larger CUDA/Hopper resource budget.
Alternatives considered
One alternative was to leave the examples unchanged and attempt to compensate in backend scheduling. That would have obscured the true issue, namely that these examples had been tuned for a larger CUDA/Hopper resource budget. Another option was to skip the offending cases on MACA, but that would have left straightforward portability work unresolved.
Verification
python -m pytest -q examples/maca/attention_sink/test_example_attention_sink.py::test_example_gqa_sink_varlen examples/maca/convolution/test_example_convolution.py::test_example_convolution examples/maca/deepseek_mla/test_example_mla_decode.py::test_example_mla_decode examples/maca/flash_attention/test_example_flash_attention.py::test_example_gqa_bwd_tma_reduce_varlen examples/maca/gdn/test_example_gdn_compilation.py