| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
| 3 | """Meta-tests for vLLM IR op infrastructure. |
| 4 | |
| 5 | Ensures all registered ops have input generators defined. |
| 6 | Per-op correctness tests live alongside their op definitions |
| 7 | (e.g. tests/kernels/ir/test_layernorm.py). |
| 8 | """ |
| 9 | |
| 10 | import pytest |
| 11 | |
| 12 | import vllm.kernels # noqa: F401 — registers provider implementations |
| 13 | from vllm.ir.op import IrOp |
| 14 | |
| 15 | pytestmark = pytest.mark.skip_global_cleanup |
| 16 | |
| 17 | |
| 18 | def test_all_ops_have_input_generator(): |
| 19 | missing = [name for name, op in IrOp.registry.items() if not op.has_input_generator] |
| 20 | assert not missing, ( |
| 21 | f"IR ops without input generators: {missing}. " |
| 22 | f"Register one with @ir.ops.<name>.register_input_generator" |
| 23 | ) |