Commit 40d3fea
authored
tests: Add batch size 1 cases to test_trtllm_gen_attention.py that fail, marked xfail (#1897)
<!-- .github/pull_request_template.md -->
## 📌 Description
<!-- What does this PR do? Briefly describe the changes and why they’re
needed. -->
Trtllm-gen's attention kernels have been discovered to fail tests when
batch size is 1.
Current PR adds batch size 1 cases to:
`test_trtllm_gen_prefill_deepseek`: that triggers an IMA with the newly
added parameters
```
## Running pytest ./tests/attention/test_trtllm_gen_attention.py::test_trtllm_gen_prefill_deepseek -v
> default_generator.manual_seed(seed)
E torch.AcceleratorError: CUDA error: an illegal memory access was encountered
E CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
E For debugging consider passing CUDA_LAUNCH_BLOCKING=1
E Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
/opt/conda/envs/py312/lib/python3.12/site-packages/torch/cuda/random.py:129: AcceleratorError
```
`test_trtllm_batch_decode`: that produces incorrect outputs with newly
added parameters
```
## Running pytest ./tests/attention/test_trtllm_gen_attention.py::test_trtllm_batch_decode -v
> torch.testing.assert_close(
output.float(),
output_wrapper.float(),
rtol=1e-1,
atol=1e-1,
)
E AssertionError: Tensor-likes are not close!
E
E Mismatched elements: 1480 / 8192 (18.1%)
E Greatest absolute difference: 64.021484375 at index (0, 46, 106) (up to 0.1 allowed)
E Greatest relative difference: 1.625 at index (0, 56, 109) (up to 0.1 allowed)
```
**These test cases have been marked as `pytest.xfail()`.** To avoid a
combinatorial growth of test parameter combinations, these batch size 1
cases were defined as separate test functions.
B200 status before PR: `2052 passed, 264 skipped in 177.80s (0:02:57)`
B200 status after PR: `2052 passed, 264 skipped, 3 xfailed in 195.14s
(0:03:15)`
Status tracked in [Issue
1898](#1898)
## 🔍 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
- [x] Tests have been added or updated as needed.
- [x] All tests are passing (`unittest`, etc.).
## Reviewer Notes
<!-- Optional: anything you'd like reviewers to focus on, concerns, etc.
-->1 parent 674843f commit 40d3fea
1 file changed
+68
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
| 567 | + | |
567 | 568 | | |
568 | 569 | | |
569 | 570 | | |
| |||
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
| 581 | + | |
580 | 582 | | |
581 | 583 | | |
582 | 584 | | |
| |||
589 | 591 | | |
590 | 592 | | |
591 | 593 | | |
592 | | - | |
593 | 594 | | |
594 | 595 | | |
595 | 596 | | |
596 | 597 | | |
597 | | - | |
| 598 | + | |
598 | 599 | | |
599 | 600 | | |
600 | 601 | | |
| |||
805 | 806 | | |
806 | 807 | | |
807 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
808 | 859 | | |
809 | 860 | | |
810 | 861 | | |
| |||
938 | 989 | | |
939 | 990 | | |
940 | 991 | | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
941 | 1007 | | |
942 | 1008 | | |
943 | 1009 | | |
0 commit comments