File tree 3 files changed +13
-2
lines changed 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 76
76
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
77
77
source ${{ variables.poplar_sdk }}/popart-ubuntu*/enable.sh
78
78
export POPTORCH_WAIT_FOR_IPU=1
79
- python -m coverage run --source pytorch_lightning -m pytest tests/accelerators/test_ipu.py -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
79
+ export PL_RUN_IPU_TESTS=1
80
+ python -m coverage run --source pytorch_lightning -m pytest tests -vv --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
80
81
env:
81
82
MKL_THREADING_LAYER: "GNU"
82
83
displayName: 'Testing: standard'
Original file line number Diff line number Diff line change @@ -190,3 +190,11 @@ def pytest_collection_modifyitems(items):
190
190
# has `@RunIf(slow=True)`
191
191
if marker .name == "skipif" and marker .kwargs .get ("slow" )
192
192
]
193
+ elif os .getenv ("PL_RUN_IPU_TESTS" , "0" ) == "1" :
194
+ items [:] = [
195
+ item
196
+ for item in items
197
+ for marker in item .own_markers
198
+ # has `@RunIf(ipu=True)`
199
+ if marker .name == "skipif" and marker .kwargs .get ("ipu" )
200
+ ]
Original file line number Diff line number Diff line change @@ -149,8 +149,10 @@ def __new__(
149
149
reasons .append ("TPU" )
150
150
151
151
if ipu :
152
- conditions .append (not _IPU_AVAILABLE )
152
+ env_flag = os .getenv ("PL_RUN_IPU_TESTS" , "0" )
153
+ conditions .append (env_flag != "1" or not _IPU_AVAILABLE )
153
154
reasons .append ("IPU" )
155
+ kwargs ["ipu" ] = True
154
156
155
157
if horovod :
156
158
conditions .append (not _HOROVOD_AVAILABLE )
You can’t perform that action at this time.
0 commit comments