Skip to content

test(npu): add GSM8K accuracy test for CAMAsync token split on DP3TP2+EP2#154

Draft
ShwStone wants to merge 1 commit into
vllm-project:mainfrom
ShwStone:feat/async-cam-dp3tp2-ep2-e2e
Draft

test(npu): add GSM8K accuracy test for CAMAsync token split on DP3TP2+EP2#154
ShwStone wants to merge 1 commit into
vllm-project:mainfrom
ShwStone:feat/async-cam-dp3tp2-ep2-e2e

Conversation

@ShwStone

Copy link
Copy Markdown

Add GSM8K accuracy E2E coverage for CAMAsyncAFDConnector on Ascend NPU.

This PR introduces tests/e2e/accuracy/test_gsm8k_npu_async_cam.py, which mirrors the existing synchronous-connector GSM8K accuracy test (test_gsm8k_npu.py) but targets the asynchronous CAM connector.

What changed

  • New test: tests/e2e/accuracy/test_gsm8k_npu_async_cam.py

    • test_gsm8k_lm_eval_async_cam_1a1f: a minimal 1-Attention + 1-FFN (2 NPU) GSM8K accuracy baseline. This runs by default when the test file is executed.
    • test_gsm8k_lm_eval_async_cam_dp3tp2_ep2: an 8-NPU non-PCP DP+TP/SP topology test parameterized over async_moe_split="request" and "token". This test is opt-in via AFD_NPU_ASYNC_CAM_RUN_DP3TP2=1 so the heavy 8-card run is not triggered by default.
  • tests/e2e/conftest.py extensions

    • _launch_afd_server now accepts optional parameters for:
      • connector: override the default connector (e.g. CAMAsyncAFDConnector).
      • attention_tp_size / ffn_tp_size: per-role tensor parallelism.
      • afd_async: set additional_config['afd']['async']=true.
      • compute_gate_on_attention: required by CAMAsync.
      • afd_connector_extra_config: pass connector_extra_config such as async_moe_ubatching, async_moe_num_ubatches, and async_moe_split.

Topology under test

1A1F baseline (default)

  • Attention: 1 rank, TP=1
  • FFN: 1 rank, EP=1
  • async_moe_split="request"

DP3TP2 + EP2 token-split validation (opt-in)

  • Attention: DP=3, TP=2 → 6 ranks
  • FFN: DP=2, EP=2 → 2 ranks
  • async_moe_split ∈ {"request", "token"}

How to run

export AFD_NPU_E2E_MODEL=/path/to/DeepSeek-V2-Lite
export AFD_NPU_E2E_VLLM_BIN=vllm

# Default: only the 2-NPU 1A1F baseline
pytest tests/e2e/accuracy/test_gsm8k_npu_async_cam.py -v

# Opt-in: also run the 8-NPU DP3TP2+EP2 request/token comparison
export AFD_NPU_ASYNC_CAM_RUN_DP3TP2=1
pytest tests/e2e/accuracy/test_gsm8k_npu_async_cam.py -v

A staged offline GSM8K task dir is required, same as test_gsm8k_npu.py. Set AFD_NPU_GSM8K_TASK_DIR if it is not at the default sibling location.

Status

This is a draft PR. NPU E2E validation is still pending. I will mark it ready for review once the 1A1F baseline and the DP3TP2+EP2 request/token split comparison have been verified on real Ascend hardware.

…+EP2

Add tests/e2e/accuracy/test_gsm8k_npu_async_cam.py, mirroring the
existing test_gsm8k_npu.py infrastructure but targeting CAMAsyncAFDConnector
on an 8-NPU non-PCP DP+TP/SP topology:

- Attention: DP=3, TP=2 (6 ranks)
- FFN:       DP=2, EP=2 (2 ranks)

The test is parameterized over async_moe_split='request' and 'token'
so the token-balanced ubatch split path can be validated against the
legacy request-boundary path via lm-eval GSM8K accuracy.

Extend tests/e2e/conftest.py::_launch_afd_server with optional parameters
for connector selection, per-role TP sizes, async mode, gate-on-attention,
and connector_extra_config so it can launch CAMAsync topologies in
addition to the default synchronous connectors.
@jiangkuaixue123

Copy link
Copy Markdown
Collaborator

Great. I will merge until test e2e pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants