Commit b433fc7
authored
test: Change incorrect inputs in test_hopper.py (#2083)
<!-- .github/pull_request_template.md -->
## 📌 Description
Brings in some changes to `test_hopper.py` to pass more unit tests
* `test_deepseek_prefill` --> Raise tolerance for bf16 inputs
* Others: The
```
token_pos_in_items_len=torch.tensor(token_pos_in_items_len)
.to(dtype=torch.uint32)
.to(0),
```
is an incorrect API and results in invalid input errors. Change it to:
`token_pos_in_items_len=token_pos_in_items_len,` so that it matches the
correct usage in e.g.
[test_batch_prefill_kernels.py](https://github.com/flashinfer-ai/flashinfer/blob/6765cadd14fbedc9ffab428a87149a7d3f5d69f1/tests/attention/test_batch_prefill_kernels.py#L890)
After this, `test_hopper.py` result improves to `3 failed, 2865 passed,
1320 skipped in 65.26s (0:01:05) `
<!-- 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
- [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 6765cad commit b433fc7
1 file changed
+13
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
| |||
373 | 380 | | |
374 | 381 | | |
375 | 382 | | |
376 | | - | |
377 | | - | |
378 | | - | |
| 383 | + | |
379 | 384 | | |
380 | 385 | | |
381 | 386 | | |
| |||
398 | 403 | | |
399 | 404 | | |
400 | 405 | | |
401 | | - | |
402 | | - | |
403 | | - | |
| 406 | + | |
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
| |||
507 | 510 | | |
508 | 511 | | |
509 | 512 | | |
510 | | - | |
511 | | - | |
512 | | - | |
| 513 | + | |
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
| |||
532 | 533 | | |
533 | 534 | | |
534 | 535 | | |
535 | | - | |
536 | | - | |
537 | | - | |
| 536 | + | |
538 | 537 | | |
539 | 538 | | |
540 | 539 | | |
| |||
0 commit comments