Skip to content

Commit 6bae76d

Browse files
authored
[fix][ci] move torch tests to run under torch stage (#5473)
Signed-off-by: Omer Ullman Argov <[email protected]>
1 parent 1633bd2 commit 6bae76d

File tree

4 files changed

+38
-21
lines changed

4 files changed

+38
-21
lines changed

tests/integration/defs/test_e2e.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,34 +1371,46 @@ def test_trtllm_serve_multimodal_example(llm_root, llm_venv):
13711371
])
13721372

13731373

1374-
def test_openai_misc_example(llm_root, llm_venv):
1374+
@pytest.mark.parametrize("backend", ["pytorch", "trt"])
1375+
def test_openai_misc_example(llm_root, llm_venv, backend: str):
13751376
test_root = unittest_path() / "llmapi" / "apps"
1376-
llm_venv.run_cmd(["-m", "pytest", str(test_root / "_test_openai_misc.py")])
1377+
llm_venv.run_cmd([
1378+
"-m", "pytest",
1379+
str(test_root / "_test_openai_misc.py"), "-k", backend
1380+
])
13771381

13781382

1379-
def test_openai_completions_example(llm_root, llm_venv):
1383+
@pytest.mark.parametrize("backend", ["pytorch", "trt"])
1384+
def test_openai_completions_example(llm_root, llm_venv, backend: str):
13801385
test_root = unittest_path() / "llmapi" / "apps"
1381-
llm_venv.run_cmd(
1382-
["-m", "pytest",
1383-
str(test_root / "_test_openai_completions.py")])
1386+
llm_venv.run_cmd([
1387+
"-m", "pytest",
1388+
str(test_root / "_test_openai_completions.py"), "-k", backend
1389+
])
13841390

13851391

1386-
def test_openai_chat_example(llm_root, llm_venv):
1392+
@pytest.mark.parametrize("backend", ["pytorch", "trt"])
1393+
def test_openai_chat_example(llm_root, llm_venv, backend: str):
13871394
example_root = Path(os.path.join(llm_root, "examples", "apps"))
13881395
test_root = unittest_path() / "llmapi" / "apps"
13891396
llm_venv.run_cmd([
13901397
"-m", "pip", "install", "-r",
13911398
os.path.join(example_root, "requirements.txt")
13921399
])
13931400

1394-
llm_venv.run_cmd(["-m", "pytest", str(test_root / "_test_openai_chat.py")])
1401+
llm_venv.run_cmd([
1402+
"-m", "pytest",
1403+
str(test_root / "_test_openai_chat.py"), "-k", backend
1404+
])
13951405

13961406

1397-
def test_openai_reasoning(llm_root, llm_venv):
1407+
@pytest.mark.parametrize("backend", ["pytorch", "trt"])
1408+
def test_openai_reasoning(llm_root, llm_venv, backend: str):
13981409
test_root = unittest_path() / "llmapi" / "apps"
1399-
llm_venv.run_cmd(
1400-
["-m", "pytest",
1401-
str(test_root / "_test_openai_reasoning.py")])
1410+
llm_venv.run_cmd([
1411+
"-m", "pytest",
1412+
str(test_root / "_test_openai_reasoning.py"), "-k", backend
1413+
])
14021414

14031415

14041416
def test_openai_chat_multimodal_example(llm_root, llm_venv):

tests/integration/test_lists/test-db/l0_a10.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ l0_a10:
2222
- stress_test/stress_test.py::test_run_stress_test[llama-v3-8b-instruct-hf_tp1-stress_time_300s_timeout_450s-MAX_UTILIZATION-pytorch-stress-test]
2323
- stress_test/stress_test.py::test_run_stress_test[llama-v3-8b-instruct-hf_tp1-stress_time_300s_timeout_450s-GUARANTEED_NO_EVICT-pytorch-stress-test]
2424
- test_e2e.py::test_openai_chat_structural_tag_example
25+
- test_e2e.py::test_openai_chat_multimodal_example
26+
- test_e2e.py::test_trtllm_serve_multimodal_example
27+
- test_e2e.py::test_openai_misc_example[pytorch]
28+
- test_e2e.py::test_openai_reasoning[pytorch]
29+
- test_e2e.py::test_openai_completions_example[pytorch]
30+
- test_e2e.py::test_openai_chat_example[pytorch]
2531
- condition:
2632
ranges:
2733
system_gpu_count:
@@ -72,12 +78,10 @@ l0_a10:
7278
- llmapi/test_llm_e2e.py::test_llmapi_exit
7379
- llmapi/test_llm_examples.py::test_llmapi_server_example
7480
- test_e2e.py::test_trtllm_serve_example
75-
- test_e2e.py::test_trtllm_serve_multimodal_example
76-
- test_e2e.py::test_openai_misc_example
77-
- test_e2e.py::test_openai_completions_example
78-
- test_e2e.py::test_openai_chat_example
79-
- test_e2e.py::test_openai_reasoning
80-
- test_e2e.py::test_openai_chat_multimodal_example
81+
- test_e2e.py::test_openai_misc_example[trt]
82+
- test_e2e.py::test_openai_completions_example[trt]
83+
- test_e2e.py::test_openai_chat_example[trt]
84+
- test_e2e.py::test_openai_reasoning[trt]
8185
- test_e2e.py::test_trtllm_bench_sanity[--non-streaming-FP16-meta-llama/Llama-3.1-8B-llama-3.1-model/Meta-Llama-3.1-8B]
8286
- test_e2e.py::test_trtllm_bench_latency_sanity[FP16-meta-llama/Llama-3.1-8B-llama-3.1-model/Meta-Llama-3.1-8B]
8387
- test_e2e.py::test_trtllm_bench_request_rate_and_concurrency[enable_concurrency-]

tests/integration/test_lists/waives.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ examples/test_multimodal.py::test_llm_multimodal_general[video-neva-pp:1-tp:1-bf
4343
examples/test_whisper.py::test_llm_whisper_general[large-v3-enable_gemm_plugin-enable_attention_plugin-disable_weight_only-float16-nb:1-use_python_runtime] SKIP (https://nvbugs/4866931)
4444
examples/test_nemotron.py::test_llm_nemotron_3_8b_1gpu[bfloat16-fp8] SKIP (https://nvbugs/4961624)
4545
examples/test_mistral.py::test_llm_mistral_v1_1gpu[mistral-7b-v0.1-float16-max_attention_window_size_4096-chunked_summarization_long] SKIP (https://nvbugs/5321371)
46-
test_e2e.py::test_openai_completions_example SKIP (https://nvbugspro.nvidia.com/bug/5004744)
46+
test_e2e.py::test_openai_completions_example[pytorch] SKIP (https://nvbugspro.nvidia.com/bug/5004744)
47+
test_e2e.py::test_openai_completions_example[trt] SKIP (https://nvbugspro.nvidia.com/bug/5004744)
4748
cpp/test_e2e.py::test_model[fp8-chatglm-90] SKIP (https://nvbugs/5034830)
4849
full:B200_PCIe/examples/test_mamba.py::test_llm_mamba_1gpu[mamba2-130m-float16-enable_gemm_plugin] SKIP (Disable for Blackwell)
4950
full:B200_PCIe/examples/test_mamba.py::test_llm_mamba_1gpu[mamba2-130m-float16-disable_gemm_plugin] SKIP (Disable for Blackwell)

tests/unittest/llmapi/apps/_test_openai_misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def model_name():
1515
return "llama-models-v2/TinyLlama-1.1B-Chat-v1.0"
1616

1717

18-
@pytest.fixture(scope="module", params=[None, 'pytorch'])
18+
@pytest.fixture(scope="module", params=["trt", 'pytorch'])
1919
def backend(request):
2020
return request.param
2121

@@ -35,7 +35,7 @@ def server(model_name: str, backend: str, max_batch_size: str,
3535
max_seq_len: str):
3636
model_path = get_model_path(model_name)
3737
args = []
38-
if backend is not None:
38+
if backend == "pytorch":
3939
args.append("--backend")
4040
args.append(backend)
4141
if backend != "pytorch":

0 commit comments

Comments
 (0)