mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
Triton has supported different codegen backends for different devices, so enabling the unit test cases to support different devices also makes sense. Otherwise, the third-party backend might have to intrusively change the Triton test cases.
15 lines
238 B
Python
15 lines
238 B
Python
# content of conftest.py
|
|
|
|
import pytest
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption(
|
|
"--device", action="store", default='cuda'
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def device(request):
|
|
return request.config.getoption("--device")
|