[Docs] Modernize test-gating documentation#19788
Conversation
Update the contributor guide and tvm.testing docstrings/comments to describe the current gating API (@pytest.mark.gpu + tvm.testing.env.has_*() + skipif, and pytest.importorskip for optional packages) instead of the removed Feature class and @tvm.testing.requires_*/uses_gpu decorators.
There was a problem hiding this comment.
Code Review
This pull request updates the documentation and docstrings across the codebase to reflect the transition from per-target decorators to capability-based gating probes (such as tvm.testing.env.has_cuda()) and @pytest.mark.gpu for GPU tests. The review feedback suggests improving consistency in the docstrings of python/tvm/testing/env.py by using the full namespace tvm.testing.env for capability probes instead of abbreviated versions.
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.
| still register as present. | ||
| A flag counts as enabled unless it is explicitly disabled, so library | ||
| flags carrying a path (rather than a boolean) still register as present. | ||
| Callers gate on this via ``@pytest.mark.skipif(not has_cutlass(), ...)``. |
There was a problem hiding this comment.
For consistency with the recommended usage in the contributor guide and other docstrings, please use the full namespace tvm.testing.env.has_cutlass() instead of has_cutlass().
| Callers gate on this via ``@pytest.mark.skipif(not has_cutlass(), ...)``. | |
| Callers gate on this via ``@pytest.mark.skipif(not tvm.testing.env.has_cutlass(), ...)``. |
| Gate a test with ``@pytest.mark.skipif(not env.has_nvcc_version(11, 4), | ||
| reason="need nvcc >= 11.4")`` (add ``@pytest.mark.gpu`` for GPU selection). |
There was a problem hiding this comment.
For consistency with the recommended usage in the contributor guide and other docstrings, please use the full namespace tvm.testing.env.has_nvcc_version instead of env.has_nvcc_version.
| Gate a test with ``@pytest.mark.skipif(not env.has_nvcc_version(11, 4), | |
| reason="need nvcc >= 11.4")`` (add ``@pytest.mark.gpu`` for GPU selection). | |
| Gate a test with ``@pytest.mark.skipif(not tvm.testing.env.has_nvcc_version(11, 4), | |
| reason="need nvcc >= 11.4")`` (add ``@pytest.mark.gpu`` for GPU selection). |
This pr updates the contributor guide and tvm.testing docstrings/comments to describe the current gating API