This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 23d9c24dba [Tests] Drop tautological env-probe implication tests 
(#19811)
23d9c24dba is described below

commit 23d9c24dba8e2f06f34071b457bc36f2f8cb124d
Author: Shushi Hong <[email protected]>
AuthorDate: Wed Jun 17 08:02:51 2026 -0400

    [Tests] Drop tautological env-probe implication tests (#19811)
    
    test_env.py asserted "derived probe implies parent" for several probes,
    but each derived probe is defined as `parent() and <flag>`, so the
    implication holds by construction and the assertion can never fail.
    Remove these no-op guards:
    - test_tensorcore_implies_cuda (has_tensorcore = has_cuda() and ...)
    - test_cudagraph_implies_cuda (has_cudagraph = has_cuda() and ...)
    - test_library_probe_implies_parent_device (cudnn/cublas/nccl =
    has_cuda(); hipblas = has_rocm())
    - test_runtime_hexagon_run_implies_toolchain (has_hexagon =
    has_hexagon_toolchain() and ...)
---
 tests/python/testing/test_env.py | 34 ----------------------------------
 1 file changed, 34 deletions(-)

diff --git a/tests/python/testing/test_env.py b/tests/python/testing/test_env.py
index c6d381c965..24277a2c9e 100644
--- a/tests/python/testing/test_env.py
+++ b/tests/python/testing/test_env.py
@@ -104,18 +104,6 @@ def 
test_target_enabled_respects_tvm_test_targets(monkeypatch):
         env._target_enabled.cache_clear()  # pylint: disable=protected-access
 
 
-def test_tensorcore_implies_cuda():
-    """Tensor Core support cannot be reported without a CUDA device."""
-    if env.has_tensorcore():
-        assert env.has_cuda()
-
-
-def test_cudagraph_implies_cuda():
-    """CUDA Graph support cannot be reported without a CUDA device."""
-    if env.has_cudagraph():
-        assert env.has_cuda()
-
-
 def test_cuda_compute_is_monotonic():
     """has_cuda_compute is monotone in the requested version."""
     if not env.has_cuda():
@@ -151,22 +139,6 @@ def test_build_flag_probe_matches_libinfo(probe, flag):
     assert probe() == env._build_flag_enabled(flag)  # pylint: 
disable=protected-access
 
 
[email protected](
-    "probe,parent",
-    [
-        (env.has_cudnn, env.has_cuda),
-        (env.has_cublas, env.has_cuda),
-        (env.has_nccl, env.has_cuda),
-        (env.has_hipblas, env.has_rocm),
-    ],
-    ids=lambda v: v.__name__,
-)
-def test_library_probe_implies_parent_device(probe, parent):
-    """A CUDA/ROCm library cannot be reported without its parent device."""
-    if probe():
-        assert parent()
-
-
 def test_llvm_min_version_is_monotone():
     if not env.has_llvm():
         assert not env.has_llvm_min_version(1)
@@ -175,12 +147,6 @@ def test_llvm_min_version_is_monotone():
     assert env.has_llvm_min_version(1)
 
 
-def test_runtime_hexagon_run_implies_toolchain():
-    """Full Hexagon support implies the compile-time toolchain is present."""
-    if env.has_hexagon():
-        assert env.has_hexagon_toolchain()
-
-
 def test_probes_are_memoized():
     """Probes are cached so the driver/subprocess is hit once per process."""
     env.has_cuda()

Reply via email to