Skip to content

Commit a269ed1

Browse files
authored
Merge branch 'master' into bugfix/dali-iterator
2 parents 9ee6903 + d786985 commit a269ed1

File tree

62 files changed

+689
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+689
-476
lines changed

.azure/hpu-tests.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,61 +14,59 @@ pr:
1414
- "master"
1515
- "release/*"
1616

17-
variables:
18-
- name: continue
19-
value: '1'
20-
2117
jobs:
2218
- job: testing
2319
# how long to run the job before automatically cancelling
2420
timeoutInMinutes: "10"
2521
# how much time to give 'run always even if cancelled tasks' before stopping them
2622
cancelTimeoutInMinutes: "2"
27-
pool: intel-hpus
23+
pool: habana-gaudi-hpus
24+
container:
25+
image: "vault.habana.ai/gaudi-docker/1.5.0/ubuntu20.04/habanalabs/pytorch-installer-1.11.0:latest"
26+
options: "--runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host --shm-size=4g --name cd-container -v /usr/bin/docker:/tmp/docker:ro"
2827
workspace:
2928
clean: all
3029

3130
steps:
32-
- bash: |
33-
CHANGED_FILES=$(git diff --name-status origin/master -- . | awk '{print $2}')
34-
FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*'
35-
echo $CHANGED_FILES > changed_files.txt
36-
MATCHES=$(cat changed_files.txt | grep -E $FILTER)
37-
echo $MATCHES
38-
if [ -z "$MATCHES" ]; then
39-
echo "Skip"
40-
echo "##vso[task.setvariable variable=continue]0"
41-
else
42-
echo "Continue"
43-
echo "##vso[task.setvariable variable=continue]1"
44-
fi
45-
displayName: Skipper
31+
- script: |
32+
/tmp/docker exec -t -u 0 cd-container \
33+
sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" -y install sudo"
34+
displayName: 'Install Sudo in container (thanks Microsoft!)'
4635
4736
- bash: |
48-
apt-get install -y hwinfo
37+
sudo apt-get install -y hwinfo
4938
hwinfo --short
39+
python --version
40+
sudo pip install pip -U
5041
displayName: 'Instance HW info'
51-
condition: eq(variables['continue'], '1')
5242
5343
- bash: |
54-
pip install -e .[extra] -r requirements/pytorch/test.txt
44+
set -e
45+
pip --version
46+
sudo pip uninstall -y lightning pytorch-lightning
47+
pip install fire
48+
python .actions/assistant.py requirements-prune-pkgs torch,torchvision,torchtext
49+
pip install ".[extra,test]"
50+
pip list
5551
env:
5652
PACKAGE_NAME: pytorch
5753
FREEZE_REQUIREMENTS: 1
5854
displayName: 'Install dependencies'
59-
condition: eq(variables['continue'], '1')
55+
56+
- bash: |
57+
hl-smi -L
58+
lsmod | grep habanalabs
59+
displayName: 'Check the driver status'
6060
6161
- bash: |
6262
python -m pytest -sv accelerators/test_hpu.py --forked --junitxml=hpu1_test-results.xml
6363
workingDirectory: tests/tests_pytorch
6464
displayName: 'Single card HPU test'
65-
condition: eq(variables['continue'], '1')
6665
6766
- bash: |
6867
python -m pytest -sv accelerators/test_hpu.py --forked --hpus 8 --junitxml=hpu8_test-results.xml
6968
workingDirectory: tests/tests_pytorch
7069
displayName: 'Multi card(8) HPU test'
71-
condition: eq(variables['continue'], '1')
7270
7371
- bash: |
7472
python -m pytest -sv plugins/precision/hpu/test_hpu.py --hmp-bf16 \
@@ -77,18 +75,16 @@ jobs:
7775
--junitxml=hpu1_precision_test-results.xml
7876
workingDirectory: tests/tests_pytorch
7977
displayName: 'HPU precision test'
80-
condition: eq(variables['continue'], '1')
8178
8279
- bash: |
8380
export PYTHONPATH="${PYTHONPATH}:$(pwd)"
8481
python "pl_hpu/mnist_sample.py"
8582
workingDirectory: examples
8683
displayName: 'Testing: HPU examples'
87-
condition: eq(variables['continue'], '1')
8884
8985
- task: PublishTestResults@2
9086
inputs:
9187
testResultsFiles: 'hpu*_test-results.xml'
9288
testRunTitle: '$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)'
93-
condition: and(succeededOrFailed(), eq(variables['continue'], '1'))
89+
condition: succeededOrFailed()
9490
displayName: 'Publish test results'

.azure/ipu-tests.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ pr:
1515
variables:
1616
- name: poplar_sdk
1717
value: "poplar_sdk-ubuntu_20_04-2.3.1+793-89796d462d"
18-
- name: continue
19-
value: '1'
2018

2119
jobs:
2220
- job: testing
@@ -27,31 +25,14 @@ jobs:
2725
clean: all
2826

2927
steps:
30-
- bash: |
31-
CHANGED_FILES=$(git diff --name-status origin/master -- . | awk '{print $2}')
32-
FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*'
33-
echo $CHANGED_FILES > changed_files.txt
34-
MATCHES=$(cat changed_files.txt | grep -E $FILTER)
35-
echo $MATCHES
36-
if [ -z "$MATCHES" ]; then
37-
echo "Skip"
38-
echo "##vso[task.setvariable variable=continue]0"
39-
else
40-
echo "Continue"
41-
echo "##vso[task.setvariable variable=continue]1"
42-
fi
43-
displayName: Skipper
44-
4528
- script: tar -xvzf /opt/poplar/${{ variables.poplar_sdk }}.tar.gz
4629
displayName: "Extract Poplar SDK"
47-
condition: eq(variables['continue'], '1')
4830

4931
- script: |
5032
set -eux
5133
pip debug --verbose
5234
pip install ${{ variables.poplar_sdk }}/poptorch-*ubuntu*.whl
5335
displayName: "Install poptorch"
54-
condition: eq(variables['continue'], '1')
5536
5637
- script: |
5738
set -eux
@@ -68,7 +49,6 @@ jobs:
6849
i=$((i + 1))
6950
done
7051
displayName: "Reset IPU devices"
71-
condition: eq(variables['continue'], '1')
7252
7353
- bash: |
7454
export GIT_TERMINAL_PROMPT=1
@@ -80,21 +60,18 @@ jobs:
8060
PACKAGE_NAME: pytorch
8161
FREEZE_REQUIREMENTS: 1
8262
displayName: 'Install dependencies'
83-
condition: eq(variables['continue'], '1')
8463
8564
- bash: |
8665
python requirements/collect_env_details.py
8766
python -c "import torch"
8867
displayName: 'Env details'
89-
condition: eq(variables['continue'], '1')
9068
9169
- script: |
9270
set -eux
9371
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
9472
source ${{ variables.poplar_sdk }}/popart-ubuntu*/enable.sh
9573
python -c "import poptorch; print(poptorch.__version__)"
9674
displayName: "Check poptorch installation"
97-
condition: eq(variables['continue'], '1')
9875
9976
- bash: |
10077
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
@@ -105,4 +82,3 @@ jobs:
10582
POPTORCH_WAIT_FOR_IPU: 1
10683
PL_RUN_IPU_TESTS: 1
10784
displayName: 'Testing: PyTorch standard'
108-
condition: eq(variables['continue'], '1')

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
*.yml @borda @carmocca @akihironitta @tchaton
1414

1515
# Docs
16-
/docs/ @edenlightning @tchaton @borda @awaelchli @RobertLaurella
16+
/docs/ @edenlightning @tchaton @borda @awaelchli @RobertLaurella @Felonious-Spellfire
1717
/.github/*.md @edenlightning @williamfalcon @borda
1818
/.github/ISSUE_TEMPLATE/ @edenlightning @borda @tchaton
1919
/docs/source-pytorch/conf.py @borda @awaelchli @carmocca
2020
/docs/source-pytorch/index.rst @williamfalcon
2121
/docs/source-pytorch/levels @williamfalcon @RobertLaurella
2222
/docs/source-pytorch/expertise_levels @williamfalcon @RobertLaurella
23-
/docs/source-app/ @williamfalcon @RobertLaurella @tchaton @awaelchli
23+
/docs/source-app/ @williamfalcon @Felonious-Spellfire @RobertLaurella @tchaton @awaelchli
2424
/docs/source-app/conf.py @borda @awaelchli @carmocca
2525
/docs/source-app/index.rst @williamfalcon
26-
/docs/source-app/expertise_levels @williamfalcon @RobertLaurella
26+
/docs/source-app/expertise_levels @williamfalcon @Felonious-Spellfire @RobertLaurella
2727

2828
# Packages
2929
/src/pytorch_lightning/accelerators @williamfalcon @tchaton @SeanNaren @awaelchli @justusschock @kaushikb11

.github/labeler.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
app:
2-
- any: ['src/lightning*/**/*', 'tests/tests_app*/**/*', 'docs/source-app/**/*', 'requirements/app/*']
2+
- any: ['src/lightning/**/*']
3+
all: ['!src/pytorch_lightning/**/*', '!tests/tests_pytorch/**/*', '!docs/source-pytorch/**/*', '!requirements/pytorch/*']
4+
- any: ['src/lightning_app/**/*']
5+
all: ['!src/pytorch_lightning/**/*', '!tests/tests_pytorch/**/*', '!docs/source-pytorch/**/*', '!requirements/pytorch/*']
6+
- any: ['tests/tests_app/**/*']
7+
all: ['!src/pytorch_lightning/**/*', '!tests/tests_pytorch/**/*', '!docs/source-pytorch/**/*', '!requirements/pytorch/*']
8+
- any: ['tests/tests_app_examples/**/*']
9+
all: ['!src/pytorch_lightning/**/*', '!tests/tests_pytorch/**/*', '!docs/source-pytorch/**/*', '!requirements/pytorch/*']
10+
- any: ['examples/app_*/**/*']
11+
all: ['!src/pytorch_lightning/**/*', '!tests/tests_pytorch/**/*', '!docs/source-pytorch/**/*', '!requirements/pytorch/*']
12+
- any: ['docs/source-app/**/*']
13+
all: ['!src/pytorch_lightning/**/*', '!tests/tests_pytorch/**/*', '!docs/source-pytorch/**/*', '!requirements/pytorch/*']
14+
- any: ['requirements/app/*']
315
all: ['!src/pytorch_lightning/**/*', '!tests/tests_pytorch/**/*', '!docs/source-pytorch/**/*', '!requirements/pytorch/*']
416

517
pl:
6-
- any: ['src/pytorch_lightning/**/*', 'tests/tests_pytorch/**/*', 'docs/source-pytorch/**/*', 'requirements/pytorch/*']
7-
all: ['!src/lightning*/**/*', '!tests/tests_app*/**/*', '!docs/source-app/**/*', '!requirements/app/*']
18+
- any: ['src/pytorch_lightning/**/*']
19+
all: ['!src/lightning/**/*', '!src/lightning_app/**/*', '!tests/tests_app/**/*', '!tests/tests_app_examples/**/*', '!docs/source-app/**/*', '!requirements/app/*']
20+
- any: ['examples/*pl_*/**/*']
21+
all: ['!src/lightning/**/*', '!src/lightning_app/**/*', '!tests/tests_app/**/*', '!tests/tests_app_examples/**/*', '!docs/source-app/**/*', '!requirements/app/*']
22+
- any: ['tests/tests_pytorch/**/*']
23+
all: ['!src/lightning/**/*', '!src/lightning_app/**/*', '!tests/tests_app/**/*', '!tests/tests_app_examples/**/*', '!docs/source-app/**/*', '!requirements/app/*']
24+
- any: ['docs/source-pytorch/**/*']
25+
all: ['!src/lightning/**/*', '!src/lightning_app/**/*', '!tests/tests_app/**/*', '!tests/tests_app_examples/**/*', '!docs/source-app/**/*', '!requirements/app/*']
26+
- any: ['requirements/pytorch/*']
27+
all: ['!src/lightning/**/*', '!src/lightning_app/**/*', '!tests/tests_app/**/*', '!tests/tests_app_examples/**/*', '!docs/source-app/**/*', '!requirements/app/*']

.github/workflows/ci-app_cloud_e2e_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ name: cloud-testing
44

55
on: # Trigger the workflow on push or pull request, but only for the master branch
66
push:
7-
branches:
8-
- "master"
7+
branches: [master, "release/*"]
98
pull_request:
9+
branches: [master, "release/*"]
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}

.github/workflows/ci-app_examples.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@ name: Test App - examples
33
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
44
on: # Trigger the workflow on push or pull request, but only for the master branch
55
push:
6-
branches:
7-
- "master"
6+
branches: [master, "release/*"]
87
pull_request:
9-
paths:
10-
- "src/lightning_app/**"
11-
- "tests/tests_app_examples/**"
12-
- "requirements/app/**"
13-
- "setup.py"
8+
branches: [master, "release/*"]
149

1510
concurrency:
1611
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}

.github/workflows/ci-app_tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Test App
33
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
44
on: # Trigger the workflow on push or pull request, but only for the master branch
55
push:
6-
branches:
7-
- "master"
6+
branches: [master, "release/*"]
87
pull_request:
98
paths:
109
- "src/lightning_app/**"

.github/workflows/ci_pkg-install.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on: # Trigger the workflow on push or pull request, but only for the master bra
66
branches: [master, "release/*"]
77
pull_request:
88
branches: [master, "release/*"]
9-
paths-ignore:
10-
- "src/lightning_app/**" # todo: implement job skip
119

1210
concurrency:
1311
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}

.github/workflows/ci_pr-gatekeeper.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
id: touched
2626
run: |
2727
patterns = ('docs/source-${{ matrix.pkg }}', 'src/lightning_${{ matrix.pkg }}', 'tests/tests_${{ matrix.pkg }}')
28-
changed = any(p in "${{steps.changed-files.outputs.all_changed_and_modified_files}}" for p in patterns):
29-
print('::set-output name=files::' + int(changed))
28+
changed = any(p in "${{steps.changed-files.outputs.all_changed_and_modified_files}}" for p in patterns)
29+
print(f'::set-output name=files::{int(changed)}')
3030
shell: python
3131
- uses: octodemo/pr-gatekeeper@main
3232
if: steps.touched.outputs.files == 1

.github/workflows/cicd-pytorch_dockers.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ on:
88
paths:
99
- "dockers/**"
1010
- "!dockers/README.md"
11-
- "requirements/*"
11+
- "requirements/**"
1212
- "requirements.txt"
1313
- "environment.yml"
1414
- ".github/workflows/*docker*.yml"
15-
- ".github/workflows/events-nightly.yml"
1615
- "setup.py"
1716
schedule:
1817
- cron: "0 0 * * *" # at the end of every day
@@ -226,7 +225,7 @@ jobs:
226225
build-args: |
227226
DIST=latest
228227
GAUDI_VERSION=${{ matrix.gaudi_version }}
229-
PYTORCH_VERSION=${{ matrix.pytorch_version }}
228+
PYTORCH_INSTALLER_VERSION=${{ matrix.pytorch_version }}
230229
file: dockers/ci-runner-hpu/Dockerfile
231230
push: ${{ env.PUSH_TO_HUB }}
232231
tags: pytorchlightning/pytorch_lightning:hpu-ci-runner-gaudi${{ matrix.gaudi_version }}

0 commit comments

Comments
 (0)