gemini-code-assist[bot] commented on code in PR #19788:
URL: https://github.com/apache/tvm/pull/19788#discussion_r3418225819
##########
python/tvm/testing/env.py:
##########
@@ -115,9 +115,9 @@ def _device_exists(kind: str, index: int = 0) -> bool:
def _build_flag_enabled(flag: str) -> bool:
"""Return whether an optional build flag (e.g. ``USE_CUTLASS``) is on.
- Mirrors the historical ``Feature`` check: a flag counts as enabled
- unless it is explicitly disabled, so library flags carrying a path
- 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(), ...)``.
Review 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()`.
```suggestion
Callers gate on this via ``@pytest.mark.skipif(not
tvm.testing.env.has_cutlass(), ...)``.
```
##########
python/tvm/testing/env.py:
##########
@@ -343,8 +343,9 @@ def _nvcc_version() -> tuple:
def has_nvcc_version(major: int, minor: int = 0, release: int = 0) -> bool:
"""True if a CUDA device is present and nvcc is at least ``(major, minor,
release)``.
- Implies :func:`has_cuda`, matching the historical ``requires_nvcc_version``
- decorator which also required the CUDA runtime.
+ Returns False when no CUDA device is present, so it implies
:func:`has_cuda`.
+ 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).
Review 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`.
```suggestion
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 is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]