Open
Description
Note: Setup test environment: https://vllm-ascend.readthedocs.io/en/latest/developer_guide/contribution/testing.html
Motivation
This issue attempt to reduce the gap of unit tests to cover the code. There is a brief architecture of ut in tests/ut/
already. We need to add more to cover all the code in vllm-ascend, and there are several principles to follow:
- The overall file tree should be consistent with
vllm_ascend
- The file name should be the original file name with a prefix
test_
- Use
unittest
framework, make good use of mock - The UTs are all running on cpu node, mock the function related to device to host
Please refer to the official doc on contributing and testing to develop, thanks!
Unit tests need to add
- |-- test__version.py
- |-- test_ascend_config.py
- |-- test_attention
- | |-- test_attention.py
- | |-- test_attention_v1.py
- | `-- test_mla_v1.py
- |-- compilation
- | `-- test_piecewise_backend.py
- |-- core
- | |-- test_schedule_config.py @nuclearwu
- | `-- test_scheduler.py
- |-- device_allocator
- | `-- test_camem.py
- |-- distributed
- | |-- test_communicator.py @FieeFlip
- | |-- test_device_communicators @Agonixiaoxiao add device communitor unit test #1601
- | | |-- test_pyhccl.py
- | | `-- test_pyhccl_wrapper.py
- | |-- kv_transfer @Agonixiaoxiao
- | | |-- test_simple_buffer.py add ut for kv tansfer module #1531
- | | |-- test_simple_connector.py add ut for kv tansfer module #1531
- | | |-- test_simple_pipe.py add ut for kv tansfer module #1531
- | | `-- test_utils.py
- | |-- test_llmdatadist_connector.py
- | `-- test_parallel_state.py @wangyanhui-cmss [CI/UT] Add ut for parallel_state.py #1460
- |-- test_envs.py @YuanCheng-coder
- |-- lora
- | `-- punica_wrapper @hongfugui
- | `-- test_punica_npu.py @hongfugui
- |-- models
- | |-- test_deepseek_dbo.py
- | |-- test_deepseek_mtp.py
- | |-- test_deepseek_v2.py
- | |-- test_qwen2_5_vl.py @Ronald1995
- | |-- test_qwen2_5_vl_without_padding.py @Ronald1995
- | |-- test_qwen2_vl.py @Ronald1995
- | `-- test_qwen3_moe.py
- |-- multistream
- | |-- test_base.py
- | |-- test_context.py
- | |-- test_decorator.py
- | |-- test_layers.py
- | |-- test_metadata.py @SunnyLee151064
- | `-- test_ms_split.py @SunnyLee151064
- |-- ops
- | |-- test_activation.py @MengqingCao
- | |-- test_attention.py @SunnyLee151064
- | |-- test_cache.py
- | |-- test_common_fused_moe.py @MengqingCao
- | |-- test_expert_load_balancer.py
- | |-- test_fused_moe.py
- | |-- test_layernorm.py @MengqingCao
- | |-- test_rotary_embedding.py @MengqingCao
- | `-- test_vocab_parallel_embedding.py @YuanCheng-coder
- |-- patch
- | |-- platform
- | | |-- patch_0_9_1
- | | |-- patch_common
- | | | `-- test_test_patch_distributed.py
- | | `-- patch_main
- | `-- worker
- | |-- patch_0_9_1
- | |-- patch_common
- | | |-- test_patch_distributed.py @Pr0Wh1teGivee
- | | |-- test_patch_eagle.py @Pr0Wh1teGivee
- | | |-- test_patch_minicpm.py @Pr0Wh1teGivee
- | | |-- test_patch_multi_step_worker.py @Pr0Wh1teGivee
- | | |-- test_patch_sampler.py
- | | |-- test_patch_spec_decode_worker.py @Pr0Wh1teGivee
- | | `-- test_patch_utils.py @Pr0Wh1teGivee
- | `-- patch_main
- |-- test_platform.py @zhanghw0354 [Test]Add unit test for platform.py #1476
- |-- quantization
- | |-- test_func_wrapper.py
- | |-- test_quant_config.py @nuclearwu
- | |-- test_quantizer.py
- | |-- test_w8a8.py
- | `-- test_w8a8_dynamic.py
- |-- sample
- | |-- ops
- | `-- test_rejection_sampler.py
- |-- test_utils.py
- `-- worker
- |-- test_cache_engine.py @machenglong2025
- |-- test_draft_model_runner.py
- |-- test_model_runner.py
- |-- test_model_runner_v1.py
- |-- test_mtp_proposer_v1.py @machenglong2025
- |-- test_multi_step_runner.py
- |-- test_multi_step_worker.py
- |-- test_pooling_model_runner.py @wangyanhui-cmss Add ut for test_pooling_model_runner.py #1640
- |-- test_worker.py @zhanghw0354
- `-- test_worker_v1.py @zhanghw0354