[Tests] Modernize test gating#19777
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the test gating mechanism by replacing the dynamic tvm.testing.Feature class with static pytest markers declared in pyproject.toml and thin capability probes in a new tvm.testing.env module. This change is propagated across the test suite, replacing decorators like @tvm.testing.requires_cuda with standard @pytest.mark.cuda and @pytest.mark.skipif combinations. The review feedback highlights two important robustness improvements in the new env.py module: explicitly checking has_cuda() in has_cuda_compute to prevent incorrect True returns when no CUDA device is present, and casting the build flag value to a string in _build_flag_enabled to avoid potential AttributeErrors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
dbe8b4d to
369bad4
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the test gating mechanism by introducing a new tvm.testing.env module containing memoized capability probes (has_* predicates). It removes the complex Feature class and its decorators from tvm.testing.utils, replacing them with standard pytest markers combined with @pytest.mark.skipif conditions. Numerous test files are updated to adopt this new idiom. Feedback on the changes points out that the GPU-only test scripts (task_python_integration_gpuonly.sh and task_python_unittest_gpuonly.sh) are missing several GPU-related markers (multi_gpu, OpenCLML, and adreno_opencl_real) in their -m filters, which would cause those tests to be incorrectly skipped.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@tvm-bot rerun |
4ee28de to
baaf00e
Compare
Replace the heavy tvm.testing.Feature machinery with a thin tvm.testing.env module of has_*() capability probes, used via standard @pytest.mark + skipif. Markers move to pyproject.toml. BREAKING: tvm.testing.requires_* / Feature are removed (requires_package kept).
baaf00e to
e8b7457
Compare
This pr modernizes test gating. It replaces the heavy `tvm.testing.Feature` machinery with a thin `tvm.testing.env` module of `has_*()` capability probes, used via standard pytest.mark + skipif. And markers move to `pyproject.toml`
This pr modernizes test gating. It replaces the heavy
tvm.testing.Featuremachinery with a thintvm.testing.envmodule ofhas_*()capability probes, used via standard pytest.mark + skipif. And markers move topyproject.toml