Commit efd8554
fix flaky xqa test (#2126)
<!-- .github/pull_request_template.md -->
## 📌 Description
WIP. Do not merge, see if this could fix xqa flaky test.
<!-- What does this PR do? Briefly describe the changes and why they’re
needed. -->
## 🔍 Related Issues
<!-- Link any related issues here -->
## 🚀 Pull Request Checklist
Thank you for contributing to FlashInfer! Before we review your pull
request, please make sure the following items are complete.
### ✅ Pre-commit Checks
- [x] I have installed `pre-commit` by running `pip install pre-commit`
(or used your preferred method).
- [x] I have installed the hooks with `pre-commit install`.
- [x] I have run the hooks manually with `pre-commit run --all-files`
and fixed any reported issues.
> If you are unsure about how to set up `pre-commit`, see [the
pre-commit documentation](https://pre-commit.com/).
## 🧪 Tests
- [ ] Tests have been added or updated as needed.
- [ ] All tests are passing (`unittest`, etc.).
## Reviewer Notes
<!-- Optional: anything you'd like reviewers to focus on, concerns, etc.
-->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Default test seed changed to improve reproducibility; tests now use
batched K/V handling, batched reference comparisons, expanded
sequence-length cases, device-based scaling tensors, seeded shuffling,
and batch-level validation with adjusted tolerances.
* Over-provisioned GPU runs now skip instead of failing.
* **Bug Fixes**
* More consistent attention scaling and more robust GPU attention
validation across batched and device-based test paths.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Qidi Sang <[email protected]>
Co-authored-by: Zihao Ye <[email protected]>1 parent ecd4ef1 commit efd8554
File tree
4 files changed
+259
-188
lines changed- csrc/xqa
- tests/attention
4 files changed
+259
-188
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
1330 | | - | |
1331 | | - | |
| 1330 | + | |
| 1331 | + | |
1332 | 1332 | | |
1333 | 1333 | | |
1334 | 1334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
644 | | - | |
| 643 | + | |
| 644 | + | |
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1564 | 1564 | | |
1565 | 1565 | | |
1566 | 1566 | | |
1567 | | - | |
1568 | | - | |
| 1567 | + | |
| 1568 | + | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
| |||
0 commit comments