Collect and run all IPU tests (#11170)
* Collect and run all ipu tests * Update azure pipeline * Increase pytest verbosity * Update RunIf Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
This commit is contained in:
parent
4651c11178
commit
089fcb91a0
|
@ -76,7 +76,8 @@ jobs:
|
|||
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
|
||||
source ${{ variables.poplar_sdk }}/popart-ubuntu*/enable.sh
|
||||
export POPTORCH_WAIT_FOR_IPU=1
|
||||
python -m coverage run --source pytorch_lightning -m pytest tests/accelerators/test_ipu.py -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
|
||||
export PL_RUN_IPU_TESTS=1
|
||||
python -m coverage run --source pytorch_lightning -m pytest tests -vv --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
|
||||
env:
|
||||
MKL_THREADING_LAYER: "GNU"
|
||||
displayName: 'Testing: standard'
|
||||
|
|
|
@ -190,3 +190,11 @@ def pytest_collection_modifyitems(items):
|
|||
# has `@RunIf(slow=True)`
|
||||
if marker.name == "skipif" and marker.kwargs.get("slow")
|
||||
]
|
||||
elif os.getenv("PL_RUN_IPU_TESTS", "0") == "1":
|
||||
items[:] = [
|
||||
item
|
||||
for item in items
|
||||
for marker in item.own_markers
|
||||
# has `@RunIf(ipu=True)`
|
||||
if marker.name == "skipif" and marker.kwargs.get("ipu")
|
||||
]
|
||||
|
|
|
@ -149,8 +149,10 @@ class RunIf:
|
|||
reasons.append("TPU")
|
||||
|
||||
if ipu:
|
||||
conditions.append(not _IPU_AVAILABLE)
|
||||
env_flag = os.getenv("PL_RUN_IPU_TESTS", "0")
|
||||
conditions.append(env_flag != "1" or not _IPU_AVAILABLE)
|
||||
reasons.append("IPU")
|
||||
kwargs["ipu"] = True
|
||||
|
||||
if horovod:
|
||||
conditions.append(not _HOROVOD_AVAILABLE)
|
||||
|
|
Loading…
Reference in New Issue