Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .azure-pipelines/ipu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
]
4 changes: 3 additions & 1 deletion tests/helpers/runif.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ def __new__(
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)
Expand Down