Skip to content

Commit ed4ef36

Browse files
anmyachevJokeren
andauthored
[UT] Generalize Proton tests by providing device fixture (triton-lang#9351)
The same approach as with other unit tests. --------- Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com> Co-authored-by: Keren Zhou <kerenzhou@openai.com>
1 parent bb75a87 commit ed4ef36

2 files changed

Lines changed: 87 additions & 77 deletions

File tree

third_party/proton/test/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import pytest
22

33

4+
def pytest_addoption(parser):
5+
parser.addoption("--device", action="store", default="cuda")
6+
7+
8+
@pytest.fixture
9+
def device(request):
10+
return request.config.getoption("--device")
11+
12+
413
@pytest.fixture
514
def fresh_knobs():
615
from triton._internal_testing import _fresh_knobs_impl

0 commit comments

Comments
 (0)