2022-03-08 15:20:43 +00:00
|
|
|
# Pipeline to run the HPU tests in DL1 Instance
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
tags:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- "master"
|
|
|
|
- "release/*"
|
|
|
|
- "refs/tags/*"
|
|
|
|
pr:
|
|
|
|
- "master"
|
|
|
|
- "release/*"
|
|
|
|
|
|
|
|
jobs:
|
2022-05-04 14:06:02 +00:00
|
|
|
- job: tests
|
2022-03-08 15:20:43 +00:00
|
|
|
|
|
|
|
# how long to run the job before automatically cancelling
|
2022-05-04 14:06:02 +00:00
|
|
|
timeoutInMinutes: "10"
|
2022-03-08 15:20:43 +00:00
|
|
|
# how much time to give 'run always even if cancelled tasks' before stopping them
|
|
|
|
cancelTimeoutInMinutes: "2"
|
|
|
|
|
|
|
|
pool: intel-hpus
|
|
|
|
|
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- bash: |
|
2022-03-21 12:50:50 +00:00
|
|
|
apt-get install -y hwinfo
|
2022-03-08 15:20:43 +00:00
|
|
|
hwinfo --short
|
|
|
|
displayName: 'Instance HW info'
|
2022-03-25 10:24:52 +00:00
|
|
|
|
|
|
|
- bash: |
|
2022-05-04 14:06:02 +00:00
|
|
|
pip install . --requirement requirements/extra.txt
|
2022-03-25 10:24:52 +00:00
|
|
|
pip install . --requirement requirements/test.txt
|
|
|
|
displayName: 'Install dependencies'
|
|
|
|
|
|
|
|
- bash: |
|
2022-03-28 07:50:20 +00:00
|
|
|
python -m pytest -sv tests/accelerators/test_hpu.py --forked --junitxml=hpu1_test-results.xml
|
|
|
|
displayName: 'Single card HPU test'
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
python -m pytest -sv tests/accelerators/test_hpu.py --forked --hpus 8 --junitxml=hpu8_test-results.xml
|
|
|
|
displayName: 'Multi card(8) HPU test'
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
python -m pytest -sv tests/plugins/precision/hpu/test_hpu.py --hmp-bf16 'tests/plugins/precision/hpu/ops_bf16.txt' --hmp-fp32 'tests/plugins/precision/hpu/ops_fp32.txt' --forked --junitxml=hpu1_precision_test-results.xml
|
|
|
|
displayName: 'HPU precision test'
|
2022-03-25 10:24:52 +00:00
|
|
|
|
|
|
|
- bash: |
|
|
|
|
export PYTHONPATH="${PYTHONPATH}:$(pwd)"
|
|
|
|
python "pl_examples/hpu_examples/simple_mnist/mnist.py"
|
|
|
|
displayName: 'Testing: HPU examples'
|
|
|
|
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFiles: 'hpu*_test-results.xml'
|
|
|
|
testRunTitle: '$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)'
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
displayName: 'Publish test results'
|