Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions tests/integration/defs/accuracy/test_llm_api_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,139 @@ def test_nvfp4_multi_gpus(self, tp_size, pp_size, ep_size, mtp_nextn, fp8kv,
# task.evaluate(llm,
# extra_evaluator_kwargs=dict(apply_chat_template=True))

@skip_pre_blackwell
@pytest.mark.parametrize(
"tp_size,pp_size,ep_size,mtp_nextn,fp8kv,attention_dp,cuda_graph,overlap_scheduler,max_batch_size,moe_backend",
[
# Use a larger batch_size to speed up the tests
pytest.param(8,
1,
4,
3,
False,
False,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_mpi_world_size(8)),
pytest.param(8,
1,
4,
3,
False,
False,
True,
True,
32,
"TRTLLM",
marks=pytest.mark.skip_less_mpi_world_size(8)),
pytest.param(8,
1,
8,
0,
True,
True,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_mpi_world_size(8)),
pytest.param(8,
1,
1,
0,
True,
True,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_mpi_world_size(8)),
pytest.param(4,
1,
1,
0,
True,
True,
True,
True,
16,
"CUTLASS",
marks=pytest.mark.skip_less_mpi_world_size(4)),
pytest.param(8,
1,
8,
1,
True,
True,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_mpi_world_size(8)),
pytest.param(8,
1,
8,
1,
True,
True,
True,
True,
8,
"CUTLASS",
marks=pytest.mark.skip_less_mpi_world_size(8)),
],
ids=[
"latency", "latency_trtllmgen", "throughput", "throughput_tp8",
"throughput_tp4", "throughput_mtp", "throughput_bs8_mtp"
])
def test_nvfp4_multi_gpus_sm120(self, tp_size, pp_size, ep_size, mtp_nextn,
fp8kv, attention_dp, cuda_graph,
overlap_scheduler, max_batch_size,
moe_backend):
if moe_backend == "TRTLLM" and (get_sm_version() == 120
or get_sm_version() == 121):
pytest.skip(
"MOE TRTLLM backend does not support SM version 120 or 121")

kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.70)
pytorch_config = dict(
disable_overlap_scheduler=not overlap_scheduler,
cuda_graph_config=CudaGraphConfig() if cuda_graph else None,
moe_config=MoeConfig(backend=moe_backend))

if fp8kv:
kv_cache_config.dtype = "fp8"

mtp_config = None
if mtp_nextn > 0:
mtp_config = MTPDecodingConfig(num_nextn_predict_layers=mtp_nextn)
with LLM(f"{llm_models_root()}/DeepSeek-R1/DeepSeek-R1-0528-FP4-v2",
max_batch_size=max_batch_size,
tensor_parallel_size=tp_size,
pipeline_parallel_size=pp_size,
moe_expert_parallel_size=ep_size,
kv_cache_config=kv_cache_config,
**pytorch_config,
enable_attention_dp=attention_dp,
speculative_config=mtp_config) as llm:

assert llm.args.moe_config.backend == moe_backend
assert llm.args.quant_config.quant_algo == QuantAlgo.NVFP4

task = MMLU(self.MODEL_NAME)
task.evaluate(llm)
task = GSM8K(self.MODEL_NAME)
task.evaluate(llm)
# This covers the case with relatively large seqlen in the generation phase.
task = CnnDailymail(self.MODEL_NAME)
task.evaluate(llm)
# Commented out because GPQA takes too long to run
# task = GPQADiamond(self.MODEL_NAME)
# task.evaluate(llm,
# extra_evaluator_kwargs=dict(apply_chat_template=True))

@skip_pre_blackwell
@pytest.mark.parametrize(
"tp_size,pp_size,ep_size,mtp_nextn,fp8kv,attention_dp,cuda_graph,overlap_scheduler,max_batch_size,moe_backend",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_lists/qa/llm_function_rtx6k.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ accuracy/test_llm_api_pytorch.py::TestQwen3_30B_A3B::test_nvfp4[latency_moe_trtl
accuracy/test_llm_api_pytorch.py::TestQwen3_235B_A22B::test_nvfp4[latency_moe_cutlass]
accuracy/test_llm_api_pytorch.py::TestQwen3_235B_A22B::test_nvfp4[latency_moe_trtllm]
accuracy/test_llm_api_pytorch.py::TestQwen3_235B_A22B::test_nvfp4[latency_moe_trtllm_eagle3]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus[throughput_tp8]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus_sm120[throughput_tp8]
test_e2e.py::test_ptp_quickstart_advanced_mixed_precision
test_e2e.py::test_ptp_quickstart_advanced[Llama3.1-8B-BF16-llama-3.1-model/Meta-Llama-3.1-8B]
test_e2e.py::test_ptp_quickstart_advanced[Llama3.1-8B-FP8-llama-3.1-model/Llama-3.1-8B-Instruct-FP8]
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/test_lists/waives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ triton_server/test_triton_llm.py::test_llmapi_backend[1-0-disableDecoupleMode-te
triton_server/test_triton_llm.py::test_llmapi_backend[1-0-enableDecoupleMode-tensorrt_llm] SKIP (https://nvbugs/5461874)
cpp/test_e2e.py::test_benchmarks[gpt-80] SKIP (https://nvbugs/5601670)
disaggregated/test_disaggregated.py::test_disaggregated_benchmark_on_diff_backends[llama-v3-8b-hf] SKIP (https://nvbugs/5587574)
full:H20-3e/accuracy/test_llm_api_pytorch.py::TestNemotronUltra::test_auto_dtype[tp8ep4-cuda_graph=True] SKIP (slow I/O)
full:H20-3e/accuracy/test_llm_api_pytorch.py::TestKimiK2::test_fp8_blockscale[latency] SKIP (slow I/O)
full:H20-3e/test_e2e.py::test_ptp_quickstart_advanced_multi_gpus[DeepSeek-V3-671B-FP8-DeepSeek-V3-0324-8] SKIP (slow I/O)
disaggregated/test_disaggregated_single_gpu.py::test_disaggregated_spec_dec_batch_slot_limit[False-False-EAGLE3-LLaMA3.1-Instruct-8B-Llama-3.1-8B-Instruct] SKIP (https://nvbugs/5608743)
accuracy/test_cli_flow.py::TestMinitron4BBase::test_fp8 SKIP (https://nvbugs/5606233)
examples/test_gpt.py::test_llm_minitron_fp8_with_pseudo_loras[4b] SKIP (https://nvbugs/5606233)
Expand Down