conftest.py 491 Bytes
Newer Older
1
2
3
4
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import pytest

5
6
import vllm.model_executor.layers.batch_invariant as batch_invariant

7
8
9
10

@pytest.fixture(autouse=True)
def enable_batch_invariant_mode(monkeypatch: pytest.MonkeyPatch):
    """Automatically enable batch invariant kernel overrides for all tests."""
11
    monkeypatch.setattr(batch_invariant, "VLLM_BATCH_INVARIANT", True)
12
    monkeypatch.setenv("VLLM_BATCH_INVARIANT", "1")