11import os
2+ from subprocess import check_call
23
34import pytest
45import torch
5- from defs .conftest import deepseek_r1_model_root # noqa: F401
6- from defs .conftest import deepseek_v3_model_root # noqa: F401
7- from defs .trt_test_alternative import check_call
86from utils .cpp_paths import llm_root # noqa: F401
7+ from utils .llm_data import llm_models_root
98
109
1110@pytest .mark .skipif (torch .cuda .device_count () < 4 ,
1211 reason = "needs 4 GPUs to run this test" )
13- @pytest .mark .parametrize ("deepseek_r1_model_root" , ["DeepSeek-R1-0528-FP4-v2" ],
14- indirect = True )
15- def test_deepseek_r1_ctx_tep (llm_root , deepseek_r1_model_root ):
12+ def test_deepseek_r1_ctx_tep (llm_root ):
13+ model_root = llm_models_root (check = True )
1614 check_call ([
1715 "./mpi_launch.sh" ,
1816 "./run_single.sh" ,
1917 "config_ctx.yaml" ,
20- "--model=" + deepseek_r1_model_root ,
18+ "--model" ,
19+ model_root / "DeepSeek-R1" / "DeepSeek-R1-0528-FP4-v2" ,
2120 "--no-enable-attention-dp" ,
2221 "--moe-backend=TRTLLM" ,
2322 ],
@@ -31,14 +30,14 @@ def test_deepseek_r1_ctx_tep(llm_root, deepseek_r1_model_root):
3130
3231@pytest .mark .skipif (torch .cuda .device_count () < 4 ,
3332 reason = "needs 4 GPUs to run this test" )
34- @pytest .mark .parametrize ("deepseek_v3_model_root" , ["DeepSeek-V3.2-Exp" ],
35- indirect = True )
36- def test_deepseek_v32_ctx_dep (llm_root , deepseek_v3_model_root ):
33+ def test_deepseek_v32_ctx_dep (llm_root ):
34+ model_root = llm_models_root (check = True )
3735 check_call ([
3836 "./mpi_launch.sh" ,
3937 "./run_single.sh" ,
4038 "config_ctx.yaml" ,
41- "--model=" + deepseek_v3_model_root ,
39+ "--model" ,
40+ model_root / "DeepSeek-V3.2-Exp-hf" ,
4241 "--tokens-per-block=64" ,
4342 "--moe-backend=DEEPGEMM" ,
4443 ],
@@ -51,14 +50,14 @@ def test_deepseek_v32_ctx_dep(llm_root, deepseek_v3_model_root):
5150
5251@pytest .mark .skipif (torch .cuda .device_count () < 4 ,
5352 reason = "needs 4 GPUs to run this test" )
54- @pytest .mark .parametrize ("deepseek_r1_model_root" , ["DeepSeek-R1-0528-FP4-v2" ],
55- indirect = True )
56- def test_deepseek_r1_gen_scaled_from_16_dep (llm_root , deepseek_r1_model_root ):
53+ def test_deepseek_r1_gen_scaled_from_16_dep (llm_root ):
54+ model_root = llm_models_root (check = True )
5755 check_call ([
5856 "./mpi_launch.sh" ,
5957 "./run_single.sh" ,
6058 "config_gen.yaml" ,
61- "--model=" + deepseek_r1_model_root ,
59+ "--model" ,
60+ model_root / "DeepSeek-R1" / "DeepSeek-R1-0528-FP4-v2" ,
6261 "--layer-indices=5,6" ,
6362 "--scaled-from=16" ,
6463 "--moe-backend=WIDEEP" ,
0 commit comments