Skip to content

[Docs] Modernize test-gating documentation#19788

Open
tlopex wants to merge 1 commit into
apache:mainfrom
tlopex:docs-test-gating
Open

[Docs] Modernize test-gating documentation#19788
tlopex wants to merge 1 commit into
apache:mainfrom
tlopex:docs-test-gating

Conversation

@tlopex

@tlopex tlopex commented Jun 16, 2026

Copy link
Copy Markdown
Member

This pr updates the contributor guide and tvm.testing docstrings/comments to describe the current gating API

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread python/tvm/testing/env.py
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(), ...)``.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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().

Suggested change
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(), ...)``.

Comment thread python/tvm/testing/env.py
Comment on lines +347 to +348
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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant