Skip to content

Commit

Permalink
[IPU] Add special tests for IPUs 2/n (#7833)
Browse files Browse the repository at this point in the history
* Add special tests for IPUs, run nvprof only if cuda available

* Add missing min_gpu
  • Loading branch information
Sean Naren authored Jun 4, 2021
1 parent 7c7182d commit 1083937
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .azure-pipelines/ipu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,11 @@ jobs:
env:
MKL_THREADING_LAYER: "GNU"
displayName: 'Testing: standard'
- bash: |
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
source ${{ variables.poplar_sdk }}/popart-ubuntu*/enable.sh
bash tests/special_tests.sh
env:
MKL_THREADING_LAYER: "GNU"
displayName: 'Testing: special'
2 changes: 1 addition & 1 deletion tests/callbacks/test_pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_pruning_callback(
)


@RunIf(special=True)
@RunIf(special=True, min_gpus=2)
@pytest.mark.parametrize("parameters_to_prune", [False, True])
@pytest.mark.parametrize("use_global_unstructured", [False, True])
def test_pruning_callback_ddp(tmpdir, use_global_unstructured: bool, parameters_to_prune: bool):
Expand Down
4 changes: 3 additions & 1 deletion tests/special_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ for i in "${!files_arr[@]}"; do
done < <(echo "$test_code")
done

nvprof --profile-from-start off -o trace_name.prof -- python ${defaults} tests/test_profiler.py::test_pytorch_profiler_nested_emit_nvtx
if nvcc --version; then
nvprof --profile-from-start off -o trace_name.prof -- python ${defaults} tests/test_profiler.py::test_pytorch_profiler_nested_emit_nvtx
fi

# echo test report
printf '=%.s' {1..80}
Expand Down

0 comments on commit 1083937

Please sign in to comment.