Skip to content

Commit ecd4ef1

Browse files
authored
bugfix: fix unittest error introduced in #2056 (#2136)
<!-- .github/pull_request_template.md --> ## πŸ“Œ Description In #2056 , when `world_size > available_gpus`, we should skip UT instead of raise error. cc @wenscarl for viz. ## πŸ” 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. - [ ] 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** * Enhanced test execution logic to improve reliability when handling resource constraints. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 9f13e83 commit ecd4ef1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

β€Žtests/comm/test_trtllm_mnnvl_allreduce_custom_comm.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_mnnvl_allreduce_custom_communicator(
250250

251251
available_gpus = torch.cuda.device_count()
252252
if world_size > available_gpus:
253-
raise ValueError(
253+
pytest.skip(
254254
f"world_size {world_size} is greater than available_gpus {available_gpus}"
255255
)
256256
print(f"Running test for world_size={world_size}")

0 commit comments

Comments
Β (0)