5 Commits

Author SHA1 Message Date
Shushi Hong f2a584a5b8 [Tests] Remove dead helpers and unused probes from tvm.testing (#19821)
Drop accumulated dead code in the test-support package: helpers with
zero call sites, unused capability probes, dead FFI re-exports, and
orphaned pytest plumbing. Verified by repo-wide grep that nothing
references any of these.
2026-06-18 16:14:31 -04:00
Shushi Hong 244499a4cd [Tests] Inline thin gating helpers in the pytest plugin and tvm.testing.env (#19819)
tvm.testing's test-gating layer had a number of one-line helper
functions that add a name but no behavior. Inline the thin ones so call
sites name the underlying flag/feature/condition directly.

Pytest plugin (plugin.py): _target_to_requirement built its skip / gpu
marks through two one-line wrappers (_gpu_mark_and_skip / _skip_only)
plus a per-kind if ladder. Replace them with two frozensets (GPU- vs
CPU-family kinds) and resolve the skip probe by name:

marks.append(pytest.mark.skipif(not getattr(env, f"has_{kind}")(),
reason=f"need {kind}"))

The cuda+cudnn / cuda+cublas accelerator-library cases are remapped
inline (cudnn before cublas). Adds two direct unit tests for the
cudnn/cublas special-case and the unknown-kind ([]) fallback.

tvm.testing.env (env.py): inline the pure probe wrappers that just
forwarded to a primitive --

* build-flag (5): has_cutlass/rpc/nnapi/openclml/mrvl ->
env.build_flag_enabled ("USE_X"). The private _build_flag_enabled is
promoted to the public build_flag_enabled; the composed probes
(has_cudnn/cublas/nccl/hipblas) and the hexagon/adreno probes call it
too.
* cpu-feature (5 pure):
has_arm_dot/arm_fp16/aarch64_sve/aarch64_sme/x86_amx ->
env.has_cpu_feature("..."). The composed has_x86_vnni (avx512vnni OR
avxvnni) and has_x86_avx512 (a five-feature set) are kept -- not thin
wrappers.

Also drops the obsolete test_build_flag_probe_matches_libinfo self-test
and the matching _BOOL_PROBES entries.

The runtime device probes (has_cuda/has_rocm/...) are intentionally left
as-is: the pytest plugin resolves env.has_<kind>() from each target
kind, so those names are load-bearing rather than thin wrappers.
2026-06-17 20:26:28 -04:00
Shushi Hong 23d9c24dba [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 ...)
2026-06-17 08:02:51 -04:00
Tianqi Chen 54b7e4dad0 [REFACTOR][HEXAGON] Phase out Hexagon app and test wrappers (#19796)
## Summary

The old Hexagon app and test wrappers depend on RPC helper artifacts
that are no longer part of the supported app flow. This PR removes those
wrappers and related helper references while keeping the core Hexagon
target, codegen, and runtime implementation in place.

## Changes

- Remove the obsolete Hexagon app wrapper directories.
- Remove the Hexagon contrib test directory and its dedicated pytest/RPC
launcher helpers.
- Drop stale CI/docs references to the removed app and test helper
paths.
2026-06-16 12:04:07 -04:00
Shushi Hong e4da848e57 [Tests] Modernize test gating (#19777)
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`
2026-06-15 18:50:57 -04:00