Is test_device_standalone_inference_script_pytorch meant to be gpu-marked?

Author: rakhimovvCreated Sep 2, 2026Updated Sep 2, 2026

Question

Is test_device_standalone_inference_script_pytorch deliberately not marked gpu? As it stands, the CPU test command documented in CLAUDE.md collects it and it fails at its first assert.

Setup

51d4c89 (current main), fresh uv sync --all-extras, Linux, Python 3.12.13, torch 2.9.0+cu128.

What I see

test_standalone_inference.py#L219-L223 carries @pytest.mark.edge_device and @pytest.mark.timeout(1800), and opens with assert torch.cuda.is_available(), "CUDA not available". Two of the three other tests in the file — L274-275 and L286-287 — carry both gpu and edge_device.

I looked for something that deselects it and did not find one: tests/conftest.py has no edge_device handling and no pytest_collection_modifyitems, and addopts is only --import-mode=importlib.

With no GPU visible and no xdist, against unmodified 51d4c89:

bash
$ CUDA_VISIBLE_DEVICES= python -m pytest tests/scripts/deployment/test_standalone_inference.py \
    -m "not gpu and not serial" --timeout=300

FAILED tests/scripts/deployment/test_standalone_inference.py::test_device_standalone_inference_script_pytorch
1 failed, 12 deselected, 15 warnings in 16.70s

It is the only item that file contributes to that filter.

Why I'm asking instead of sending a patch

Adding @pytest.mark.gpu is the one-line change, and I notice #688 already carries exactly that hunk. But I can't tell whether the omission is deliberate:

  • pyproject.toml describes edge_device as "tests that run on edge device runners (Orin, Thor, DGX Spark)" — a runner-location axis rather than a hardware one, and two edge_device tests (tests/gr00t/utils/test_dataset_video_backend.py:253 and :306) really are GPU-free torchcodec decode tests. So edge_device is plainly not a subset of gpu by design.
  • This test has a 1800 s timeout, is the only one that pulls the full 3B weights (GROOT_SKIP_HF_MODEL_WEIGHTS=0) plus the DROID demo data, and marking it gpu would pull it into whatever job selects -m gpu. That is a scheduling call I can't see your internal CI to make — CLAUDE.md notes those jobs aren't in this tree.

If adding gpu is unwanted for that reason, turning the hard assert into pytest.skip("CUDA not available") would also make the CPU phase report SKIPPED rather than FAILED, independently of markers.

Happy to send whichever you prefer as a PR, or to leave it to #688.

Separately, and probably worth its own issue

The same failure appears on a GPU machine for a different reason: tests/conftest.py L41-L55 pins worker gwN to device N, and with CUDA_VISIBLE_DEVICES unset in the parent it sets str(idx) unconditionally. On a 4-GPU box -n auto gave me 96 workers, so gw4 through gw95 each got a device index that doesn't exist — I hit it as [gw86] AssertionError: CUDA not available. Any GPU-needing test that lands on a high-numbered worker would see the same. Let me know if you'd like that as a separate issue.