import pytest | |
def pytest_addoption(parser): | |
parser.addoption("--device", action="store", default="cuda") | |
def device(request): | |
return request.config.getoption("--device") | |
def fresh_knobs(monkeypatch): | |
from triton._internal_testing import _fresh_knobs_impl | |
fresh_function, reset_function = _fresh_knobs_impl(monkeypatch) | |
try: | |
yield fresh_function() | |
finally: | |
reset_function() | |