File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
third_party/intel/python/test Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ run_core_tests() {
203203
204204 TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=tools \
205205 pytest --verbose tools/
206+
207+ cd $TRITON_PROJ /third_party/intel/python/test
208+ TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=third_party \
209+ pytest --device xpu .
206210}
207211
208212run_regression_tests () {
Original file line number Diff line number Diff line change 1+ import os
2+ import pytest
3+ import tempfile
4+
5+
6+ def pytest_addoption (parser ):
7+ parser .addoption ("--device" , action = "store" , default = "cuda" )
8+
9+
10+ @pytest .fixture
11+ def device (request ):
12+ return request .config .getoption ("--device" )
13+
14+
15+ @pytest .fixture
16+ def fresh_triton_cache ():
17+ try :
18+ with tempfile .TemporaryDirectory () as tmpdir :
19+ try :
20+ os .environ ["TRITON_CACHE_DIR" ] = tmpdir
21+ yield tmpdir
22+ finally :
23+ os .environ .pop ("TRITON_CACHE_DIR" , None )
24+ except OSError :
25+ # Ignore errors, such as PermissionError, on Windows
26+ pass
File renamed without changes.
You can’t perform that action at this time.
0 commit comments