Skip to content

Commit fb4293f

Browse files
authored
refactor: Test reorganization phase 2 (#1778)
<!-- .github/pull_request_template.md --> ## 📌 Description This is the second phase of the test reorganization: 1. Rather than using test lists, tests are now organized into directories, allowing to use simply pytest tests/ 2. Any required pip packages are now installed through docker ## 🔍 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 b1b4549 commit fb4293f

File tree

101 files changed

+2056
-2050
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2056
-2050
lines changed

benchmarks/routines/moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ def run_fp4_moe():
796796

797797
def testCutlassFusedMoe(args):
798798
"""
799-
Benchmark cutlass_fused_moe (CUTLASS MoE) with variants mirroring tests in tests/test_trtllm_cutlass_fused_moe.py
799+
Benchmark cutlass_fused_moe (CUTLASS MoE) with variants mirroring tests in tests/moe/test_trtllm_cutlass_fused_moe.py
800800
Variants:
801801
- base: no quantization
802802
- fp8: per-tensor fp8 for weights and activation scale

flashinfer/comm/trtllm_ar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ def trtllm_allreduce_fusion(
810810
- residual_out: the residual output tensor. [token_num, hidden_dim]
811811
- norm_out: the norm output tensor. [token_num, hidden_dim]
812812
- quant_out: the quant output tensor. [token_num, hidden_dim]
813-
- scale_out: the scale output tensor. Initialization referece: tests/test_trtllm_allreduce_fusion.py
813+
- scale_out: the scale output tensor. Initialization referece: tests/comm/test_trtllm_allreduce_fusion.py
814814
- rms_gamma: the rms gamma tensor. [hidden_dim]
815815
- rms_eps: the rms epsilon value.
816816
- scale_factor: the scale factor. For cudaGraphs safety, it should be a tensor.
@@ -913,7 +913,7 @@ def trtllm_moe_allreduce_fusion(
913913
- residual_out: the residual output tensor. [token_num, hidden_dim]
914914
- norm_out: the norm output tensor. [token_num, hidden_dim]
915915
- quant_out: the quant output tensor. [token_num // 4, hidden_dim], fp16/bf16 -> fp4
916-
- scale_out: the scale output tensor. Initialization referece: tests/test_trtllm_moe_allreduce_fusion.py
916+
- scale_out: the scale output tensor. Initialization referece: tests/comm/test_trtllm_moe_allreduce_fusion.py
917917
"""
918918

919919
required_lamport_comm_size = moe_reduction_token_input.numel() * 2 * world_size

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pytest]
2+
norecursedirs = test_helpers, unlisted

scripts/run_test_blackwell_attention_kernels.sh

Lines changed: 0 additions & 53 deletions
This file was deleted.

scripts/run_test_blackwell_comm_kernels.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

scripts/run_test_blackwell_gemm_kernels.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

scripts/run_test_blackwell_moe_kernels.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

scripts/run_test_blackwell_utils_kernels.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

scripts/task_jit_run_tests_part1.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ set -x
77

88
pip install -e . -v
99

10-
# pytest -s tests/test_group_gemm.py
11-
pytest -s tests/test_logits_cap.py
12-
pytest -s tests/test_sliding_window.py
13-
pytest -s tests/test_tensor_cores_decode.py
14-
pytest -s tests/test_batch_decode_kernels.py
15-
#pytest -s tests/test_alibi.py
10+
# pytest -s tests/GEMM/test_group_gemm.py
11+
pytest -s tests/attention/test_logits_cap.py
12+
pytest -s tests/attention/test_sliding_window.py
13+
pytest -s tests/attention/test_tensor_cores_decode.py
14+
pytest -s tests/attention/test_batch_decode_kernels.py
15+
# pytest -s tests/attention/test_alibi.py

scripts/task_jit_run_tests_part2.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ set -x
77

88
pip install -e . -v
99

10-
pytest -s tests/test_block_sparse.py
11-
pytest -s tests/test_jit_example.py
12-
pytest -s tests/test_jit_warmup.py
13-
pytest -s tests/test_norm.py
14-
pytest -s tests/test_rope.py
15-
pytest -s tests/test_mla_page.py
16-
pytest -s tests/test_quantization.py
10+
pytest -s tests/utils/test_block_sparse.py
11+
pytest -s tests/utils/test_jit_example.py
12+
pytest -s tests/utils/test_jit_warmup.py
13+
pytest -s tests/utils/test_norm.py
14+
pytest -s tests/attention/test_rope.py
15+
pytest -s tests/attention/test_mla_page.py
16+
pytest -s tests/utils/test_quantization.py

0 commit comments

Comments
 (0)