Skip to content

Commit 02ed5b9

Browse files
committed
Merge remote-tracking branch 'origin' into karenc/distributed_blocks
2 parents 42a5a3e + fb4432e commit 02ed5b9

39 files changed

+715
-58
lines changed

.github/actions/pytest/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,16 @@ runs:
5454
# Run pytest with detailed output and JUnit XML
5555
set +e # Don't exit on test failures
5656
57-
docker run --runtime=nvidia --gpus all -w /workspace \
57+
# Detect GPU availability and conditionally add GPU flags
58+
GPU_FLAGS=""
59+
if command -v nvidia-smi &> /dev/null && nvidia-smi &> /dev/null; then
60+
echo "GPU detected, enabling GPU runtime"
61+
GPU_FLAGS="--runtime=nvidia --gpus all"
62+
else
63+
echo "No GPU detected, running in CPU-only mode"
64+
fi
65+
66+
docker run ${GPU_FLAGS} --rm -w /workspace \
5867
--cpus=${NUM_CPUS} \
5968
--network host \
6069
--name ${{ env.CONTAINER_ID }}_pytest \

.github/workflows/container-validation-backends.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ jobs:
318318
uses: ./.github/actions/pytest
319319
with:
320320
image_tag: ${{ steps.build-image.outputs.image_tag }}
321-
pytest_marks: "unit and trtllm_marker and gpu_1"
321+
pytest_marks: "unit and trtllm and gpu_1"
322322
framework: "trtllm"
323323
test_type: "unit"
324324
platform_arch: ${{ matrix.platform.arch }}
@@ -327,7 +327,7 @@ jobs:
327327
uses: ./.github/actions/pytest
328328
with:
329329
image_tag: ${{ steps.build-image.outputs.image_tag }}
330-
pytest_marks: "e2e and trtllm_marker and gpu_1 and not slow"
330+
pytest_marks: "e2e and trtllm and gpu_1 and not slow"
331331
framework: "trtllm"
332332
test_type: "e2e, gpu_1"
333333
platform_arch: ${{ matrix.platform.arch }}

.github/workflows/container-validation-dynamo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
docker compose down
6666
- name: Run pytest (parallel tests with xdist)
6767
env:
68-
PYTEST_MARKS: "pre_merge and parallel"
68+
PYTEST_MARKS: "pre_merge and parallel and not (vllm or trtllm or sglang or k8s)"
6969
run: |
7070
docker run -w /workspace \
7171
--name ${{ env.CONTAINER_ID }}_pytest_parallel \
@@ -77,7 +77,7 @@ jobs:
7777
docker cp ${{ env.CONTAINER_ID }}_pytest_parallel:/workspace/${{ env.PYTEST_PARALLEL_XML_FILE }} . || echo "No parallel test report found"
7878
- name: Run pytest (sequential tests)
7979
env:
80-
PYTEST_MARKS: "(pre_merge and not parallel) or mypy"
80+
PYTEST_MARKS: "(pre_merge and not parallel and not (vllm or trtllm or sglang or k8s)) or mypy"
8181
run: |
8282
docker run -w /workspace \
8383
--name ${{ env.CONTAINER_ID }}_pytest \

components/src/dynamo/sglang/tests/test_sglang_prometheus_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
pytestmark = [
1313
pytest.mark.unit,
14+
pytest.mark.sglang,
15+
pytest.mark.gpu_0,
16+
pytest.mark.post_merge,
1417
]
1518

1619

components/src/dynamo/sglang/tests/test_sglang_unit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919
JINJA_TEMPLATE_PATH = str(
2020
REPO_ROOT / "tests" / "serve" / "fixtures" / "custom_template.jinja"
2121
)
22+
2223
pytestmark = [
2324
pytest.mark.unit,
2425
pytest.mark.sglang,
2526
pytest.mark.gpu_1,
27+
pytest.mark.pre_merge,
2628
]
2729

28-
2930
# Create SGLang-specific CLI args fixture
3031
# This will use monkeypatch to write to argv
3132
mock_sglang_cli = make_cli_args_fixture("dynamo.sglang")

components/src/dynamo/trtllm/tests/test_trtllm_autodeploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
pytestmark = [
1616
pytest.mark.unit,
17-
pytest.mark.trtllm_marker,
17+
pytest.mark.trtllm,
1818
# NOTE: these tests do not actually require a GPU, but the workflow validation
1919
# `.github/workflows/container-validation-backends.yml` does not make use of
2020
# the `gpu_0` marker.

components/src/dynamo/trtllm/tests/test_trtllm_main_init.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
import pytest
1111

1212
# Mark all tests in this module to run only in TensorRT-LLM container
13-
pytestmark = pytest.mark.trtllm
13+
pytestmark = [
14+
pytest.mark.unit,
15+
pytest.mark.trtllm,
16+
pytest.mark.gpu_1,
17+
pytest.mark.pre_merge,
18+
]
1419

1520

1621
def test_tensorrt_llm_metrics_collector_import():

components/src/dynamo/trtllm/tests/test_trtllm_prometheus_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
pytestmark = [
1313
pytest.mark.unit,
14+
pytest.mark.trtllm,
15+
pytest.mark.gpu_0,
16+
pytest.mark.post_merge,
1417
]
1518

1619

components/src/dynamo/trtllm/tests/test_trtllm_unit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
pytestmark = [
2323
pytest.mark.unit,
24-
pytest.mark.trtllm_marker,
24+
pytest.mark.trtllm,
2525
pytest.mark.gpu_1,
2626
]
2727

components/src/dynamo/vllm/tests/test_vllm_prometheus_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
pytestmark = [
1313
pytest.mark.unit,
14+
pytest.mark.vllm,
15+
pytest.mark.gpu_0,
16+
pytest.mark.post_merge,
1417
]
1518

1619

0 commit comments

Comments
 (0)