Skip to content

Commit ccc0486

Browse files
authored
Merge branch 'master' into ci-all/bfloat16-cuda-tests
2 parents 8c3d31f + b9275a4 commit ccc0486

File tree

3,903 files changed

+226108
-117709
lines changed

Some content is hidden

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

3,903 files changed

+226108
-117709
lines changed

.azure_pipelines/job_templates/build-verify-publish-template-unix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
is_official_build: ${{ parameters.is_official_build}}
4545

4646
# Sync and update PyTorch submodules
47-
- bash: git submodule update --init --recursive
47+
- bash: git submodule update --init --recursive --jobs 0
4848
displayName: Update PyTorch submodules
4949

5050
# Build PyTorch and run unit tests - no packaging

.azure_pipelines/job_templates/build-verify-publish-template-win.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
is_official_build: ${{ parameters.is_official_build}}
4848

4949
# Sync and update PyTorch submodules
50-
- script: git submodule update --init --recursive
50+
- script: git submodule update --init --recursive --jobs 0
5151
displayName: Update PyTorch submodules
5252

5353
# Build PyTorch and run unit tests - no packaging
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
parameters:
2+
name: ''
3+
pool: ''
4+
customMatrixes: ''
5+
6+
jobs:
7+
- job: ${{parameters.name}}
8+
timeoutInMinutes: 600
9+
strategy:
10+
matrix:
11+
${{ insert }}: ${{parameters.customMatrixes}}
12+
pool:
13+
name: ${{ parameters.pool}}
14+
steps:
15+
# Clone PyTorch Tests repository
16+
- bash: |
17+
B64_PAT=$(echo -n ":$_ADOTOKEN" | base64)
18+
git -c http.extraHeader="Authorization: Basic ${B64_PAT}" clone $(AZURE_DEVOPS_PYTORCH_TESTS_REPO_URL)
19+
cd pytorch_tests
20+
git checkout $(PYTORCH_TESTS_CHECKOUT_BRANCH)
21+
env:
22+
_ADOTOKEN: $(AZURE_DEVOPS_CLI_PAT)
23+
displayName: Clone PyTorch Tests repo
24+
- bash: |
25+
bash $(Build.SourcesDirectory)/pytorch_tests/webapp/notify_webapp.sh
26+
displayName: Notify Webapp
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# PyTorch build steps template with Unix images Azure DevOps Instances
2+
#
3+
# This build depends on 5 parameters set as an environment variables in the pipeline:
4+
# - AZURE_DEVOPS_CLI_PAT: Secret var for authenticating to Azure DevOps
5+
# - AZURE_STORAGE_KEY: Secret var for authenticating to Azure Storage
6+
# - _TS_CLONE_P, _TS_P, _TS_SM_P: Secret vars for specific unit tests
7+
8+
parameters:
9+
name: ''
10+
pool: ''
11+
container_endpoint: ''
12+
customMatrixes: ''
13+
14+
jobs:
15+
- job: ${{parameters.name}}
16+
timeoutInMinutes: 600
17+
strategy:
18+
matrix:
19+
${{ insert }}: ${{parameters.customMatrixes}}
20+
pool:
21+
name: ${{ parameters.pool}}
22+
variables:
23+
DECODE_PERCENTS: false
24+
25+
steps:
26+
# Don't checkout repo contents to save time and CPU compute. Environment variables
27+
# related to checkout branch such as $(BUILD_SOURCEBRANCH) are still available.
28+
- checkout: none
29+
30+
# Delete pytorch_tests repo from previous builds if exists
31+
- bash: rm -rf pytorch_tests/
32+
displayName: Delete pytorch_tests repo from previous builds if exists
33+
34+
# Clone PyTorch Tests repository
35+
- bash: |
36+
B64_PAT=$(echo -n ":$_ADOTOKEN" | base64)
37+
git -c http.extraHeader="Authorization: Basic ${B64_PAT}" clone $(AZURE_DEVOPS_PYTORCH_TESTS_REPO_URL)
38+
cd pytorch_tests
39+
git checkout $(PYTORCH_TESTS_CHECKOUT_BRANCH)
40+
env:
41+
_ADOTOKEN: $(AZURE_DEVOPS_CLI_PAT)
42+
displayName: Clone PyTorch Tests repo
43+
44+
# Run PyTorch Unit Tests
45+
- bash: bash $(Build.SourcesDirectory)/pytorch_tests/scripts/linux/run.sh
46+
env:
47+
_AZURE_STORAGE_KEY: $(AZURE_STORAGE_KEY)
48+
_TS_CLONE_P: $(TS_CLONE_PASSWORD)
49+
_TS_P: $(TS_PAT)
50+
_TS_SM_P: $(TS_SM_PAT)
51+
_AZUREML_CLONE_PASSWORD: $(AZUREML_CLONE_PASSWORD)
52+
_SPPASSWORD: $(SPPASSWORD)
53+
displayName: Run PyTorch Unit Tests
54+
55+
# Tests results are available outside the docker container since
56+
# the current directory is mounted as a volume of the container.
57+
- task: PublishTestResults@2
58+
condition: always()
59+
inputs:
60+
testResultsFiles: '**/test-*.xml'
61+
testRunTitle: 'Publish test results for Python'
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# PyTorch build steps template with Windows images Azure DevOps Instances
2+
#
3+
# This build depends on 5 parameters set as an environment variables in the pipeline:
4+
# - AZURE_DEVOPS_CLI_PAT: Secret var for authenticating to Azure DevOps
5+
# - AZURE_STORAGE_KEY: Secret var for authenticating to Azure Storage
6+
# - _TS_CLONE_P, _TS_P, _TS_SM_P: Secret vars for specific unit tests
7+
8+
parameters:
9+
name: ''
10+
pool: ''
11+
customMatrixes: ''
12+
13+
jobs:
14+
- job: ${{parameters.name}}
15+
timeoutInMinutes: 600
16+
strategy:
17+
matrix:
18+
${{ insert }}: ${{parameters.customMatrixes}}
19+
pool:
20+
name: ${{ parameters.pool}}
21+
22+
steps:
23+
# Don't checkout repo contents to save time and CPU compute. Environment variables
24+
# related to checkout branch such as $(BUILD_SOURCEBRANCH) are still available.
25+
- checkout: none
26+
27+
# Delete pytorch_tests repo from previous builds if exists
28+
- script: if exist "pytorch_tests/" rmdir "pytorch_tests/" /q /s
29+
displayName: Delete pytorch_tests repo from previous builds if exists
30+
31+
# Clone PyTorch Tests repository
32+
- powershell: |
33+
$env:B64Pat = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$env:_ADOTOKEN"))
34+
git -c http.extraHeader="Authorization: Basic $env:B64Pat" clone $env:AZURE_DEVOPS_pytorch_tests_REPO_URL
35+
cd pytorch_tests
36+
git checkout $(PYTORCH_TESTS_CHECKOUT_BRANCH)
37+
env:
38+
_ADOTOKEN: $(AZURE_DEVOPS_CLI_PAT)
39+
displayName: Clone PyTorch Tests repo
40+
41+
# Run PyTorch Unit Tests
42+
- script: call $(Build.SourcesDirectory)\pytorch_tests\scripts\windows\run.bat
43+
env:
44+
_ADOTOKEN: $(AZURE_DEVOPS_CLI_PAT)
45+
_AZURE_STORAGE_KEY: $(AZURE_STORAGE_KEY)
46+
_TS_CLONE_P: $(TS_CLONE_PASSWORD)
47+
_TS_P: $(TS_PAT)
48+
_TS_SM_P: $(TS_SM_PAT)
49+
displayName: Run PyTorch Unit Tests
50+
51+
# Tests results are available outside the docker container since
52+
# the current directory is mounted as a volume of the container.
53+
- task: PublishTestResults@2
54+
condition: always()
55+
inputs:
56+
testResultsFiles: '**\test-*.xml'
57+
testRunTitle: 'Publish test results for Python'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Main logic to initiate wait for PR artifact to be ready
2+
3+
steps:
4+
- task: InvokeRESTAPI@1
5+
displayName: 'Wait for job success and wheel ready'
6+
timeoutInMinutes: 60
7+
inputs:
8+
connectionType: 'connectedServiceName'
9+
serviceConnection: circleciconn
10+
method: 'POST'
11+
headers: '{"Content-Type":"application/json", "BranchName":"$(_TARGET_BRANCH_TO_CHECK)", "JobName":"$(TARGET_CIRCLECI_BUILD_PR)", "PRNumber":"$(_TARGET_PR_NUMBER)", "TargetCommit":"$(_TARGET_COMMIT)", "PlanUrl":"$(System.CollectionUri)", "ProjectId":"$(System.TeamProjectId)", "HubName":"$(System.HostType)", "PlanId":"$(System.PlanId)", "JobId":"$(System.JobId)", "TimelineId":"$(System.TimelineId)", "TaskInstanceId":"$(System.TaskInstanceId)", "AuthToken":"$(System.AccessToken)"}'
12+
body: ''
13+
urlSuffix: 'api/JobStatus'
14+
waitForCompletion: true
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Initiate 5 agentless-server waiting jobs to check on the
2+
# status of PR artifact builds, for a maximum wait time of
3+
# 11*60 min=660 mins. These jobs will pass immediately
4+
# once targeted CircleCI build is ready.
5+
6+
jobs:
7+
- job: checkjob1
8+
pool: server
9+
timeoutInMinutes: 60
10+
continueOnError: true
11+
steps:
12+
- template: wheel-wait-job-template.yml
13+
14+
- job: checkjob2
15+
pool: server
16+
timeoutInMinutes: 60
17+
dependsOn: checkjob1
18+
continueOnError: true
19+
steps:
20+
- template: wheel-wait-job-template.yml
21+
22+
- job: checkjob3
23+
pool: server
24+
timeoutInMinutes: 60
25+
dependsOn: checkjob2
26+
continueOnError: true
27+
steps:
28+
- template: wheel-wait-job-template.yml
29+
30+
- job: checkjob4
31+
pool: server
32+
timeoutInMinutes: 60
33+
dependsOn: checkjob3
34+
continueOnError: true
35+
steps:
36+
- template: wheel-wait-job-template.yml
37+
38+
- job: checkjob5
39+
pool: server
40+
timeoutInMinutes: 60
41+
dependsOn: checkjob4
42+
continueOnError: true
43+
steps:
44+
- template: wheel-wait-job-template.yml
45+
46+
- job: checkjob6
47+
pool: server
48+
timeoutInMinutes: 60
49+
dependsOn: checkjob5
50+
continueOnError: true
51+
steps:
52+
- template: wheel-wait-job-template.yml
53+
54+
- job: checkjob7
55+
pool: server
56+
timeoutInMinutes: 60
57+
dependsOn: checkjob6
58+
continueOnError: true
59+
steps:
60+
- template: wheel-wait-job-template.yml
61+
62+
- job: checkjob8
63+
pool: server
64+
timeoutInMinutes: 60
65+
dependsOn: checkjob7
66+
continueOnError: true
67+
steps:
68+
- template: wheel-wait-job-template.yml
69+
70+
- job: checkjob9
71+
pool: server
72+
timeoutInMinutes: 60
73+
dependsOn: checkjob8
74+
continueOnError: true
75+
steps:
76+
- template: wheel-wait-job-template.yml
77+
78+
- job: checkjob10
79+
pool: server
80+
timeoutInMinutes: 60
81+
dependsOn: checkjob9
82+
continueOnError: true
83+
steps:
84+
- template: wheel-wait-job-template.yml
85+
86+
- job: checkjob11
87+
pool: server
88+
timeoutInMinutes: 60
89+
dependsOn: checkjob10
90+
continueOnError: true
91+
steps:
92+
- template: wheel-wait-job-template.yml
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# PyTorch Nightly PyTorch Tests Builds Pipeline on Azure DevOps
2+
#
3+
# This pipeline runs custom PyTorch unit-tests on nightly
4+
# PyTorch wheels.
5+
6+
stages:
7+
- stage: 'NightlyCustomTests'
8+
displayName: 'Run custom unit tests on PyTorch wheels'
9+
jobs:
10+
- template: job_templates/pytorch-template-unix.yml
11+
parameters:
12+
name: ubuntu_1804_CPU_docker
13+
pool: $(BUILD_POOL_LIN_1)
14+
customMatrixes:
15+
Nightly_Custom_Tests:
16+
_DOCKER_IMAGE: $(DOCKER_IMAGE_LIN_1)
17+
_PYTHON_VERSION: $(PYTHON_VERSION_LIN_1)
18+
_CUDA_BUILD_VERSION: $(CUDA_BUILD_VERSION_LIN_1)
19+
_RUN_TESTS: $(RUN_TESTS_LIN)
20+
21+
- template: job_templates/pytorch-template-unix.yml
22+
parameters:
23+
name: ubuntu_1804_GPU_docker
24+
pool: $(BUILD_POOL_LIN_2)
25+
customMatrixes:
26+
Nightly_Custom_Tests:
27+
_DOCKER_IMAGE: $(DOCKER_IMAGE_LIN_2)
28+
_PYTHON_VERSION: $(PYTHON_VERSION_LIN_2)
29+
_CUDA_BUILD_VERSION: $(CUDA_BUILD_VERSION_LIN_2)
30+
_RUN_TESTS: $(RUN_TESTS_LIN)
31+
32+
- template: job_templates/pytorch-template-win.yml
33+
parameters:
34+
name: windows_2019_CPU
35+
pool: $(BUILD_POOL_WIN_1)
36+
customMatrixes:
37+
Nightly_Custom_Tests:
38+
_PYTHON_VERSION: $(PYTHON_VERSION_WIN_1)
39+
_CUDA_BUILD_VERSION: $(CUDA_BUILD_VERSION_WIN_1)
40+
_RUN_TESTS: $(RUN_TESTS_WIN)
41+
42+
- template: job_templates/pytorch-template-win.yml
43+
parameters:
44+
name: windows_2019_GPU
45+
pool: $(BUILD_POOL_WIN_2)
46+
customMatrixes:
47+
Nightly_Custom_Tests:
48+
_PYTHON_VERSION: $(PYTHON_VERSION_WIN_2)
49+
_CUDA_BUILD_VERSION: $(CUDA_BUILD_VERSION_WIN_2)
50+
_RUN_TESTS: $(RUN_TESTS_WIN)
51+
52+
- stage: 'NotifyWebapp'
53+
displayName: 'Notify Webapp that pipeline is finished'
54+
dependsOn: NightlyCustomTests
55+
condition: succeededOrFailed()
56+
jobs:
57+
- template: job_templates/notify-webapp-template.yml
58+
parameters:
59+
name: ubuntu_1804_CPU
60+
pool: $(BUILD_POOL_LIN_1)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# PyTorch PR PyTorch Tests Builds Pipeline on Azure DevOps
2+
#
3+
# This pipeline:
4+
# 1) ensures that CircleCI builds for a given PR
5+
# have finished, and that its artifacts are
6+
# ready for download
7+
# 2) runs custom PyTorch unit-tests on PyTorch
8+
# wheels generated during PR builds.
9+
10+
resources:
11+
webhooks:
12+
- webhook: GitHubPyTorchPRTrigger
13+
connection: GitHubPyTorchPRTriggerConnection
14+
filters:
15+
- path: repositoryName
16+
value: pytorch_tests
17+
18+
stages:
19+
- stage: 'EnsureArtifactsReady'
20+
displayName: 'Ensure PyTorch PR Artifacts are ready'
21+
jobs:
22+
- template: job_templates/wheel-wait-template.yml
23+
variables:
24+
_TARGET_BRANCH_TO_CHECK: ${{parameters.GitHubPyTorchPRTrigger.TARGET_BRANCH_TO_CHECK_AZ_DEVOPS_PR}}
25+
_TARGET_PR_NUMBER: ${{parameters.GitHubPyTorchPRTrigger.PR_NUMBER}}
26+
_TARGET_COMMIT: ${{parameters.GitHubPyTorchPRTrigger.TARGET_COMMIT}}
27+
28+
- stage: 'PRCustomTests'
29+
displayName: 'Run custom unit tests on PyTorch wheels'
30+
dependsOn: EnsureArtifactsReady
31+
condition: succeeded()
32+
jobs:
33+
- template: job_templates/pytorch-template-unix.yml
34+
parameters:
35+
name: ubuntu_1804_GPU_docker
36+
pool: $(BUILD_POOL_PR)
37+
customMatrixes:
38+
PR_Custom_Tests:
39+
_PYTHON_VERSION: $(PYTHON_VERSION_PR)
40+
_CUDA_BUILD_VERSION: $(CUDA_BUILD_VERSION_PR)
41+
_TARGET_CIRCLECI_BUILD: $(TARGET_CIRCLECI_BUILD_PR)
42+
_TARGET_BRANCH_TO_CHECK: ${{parameters.GitHubPyTorchPRTrigger.TARGET_BRANCH_TO_CHECK_AZ_DEVOPS_PR}}
43+
_TARGET_PR_NUMBER: ${{parameters.GitHubPyTorchPRTrigger.PR_NUMBER}}
44+
_TARGET_COMMIT: ${{parameters.GitHubPyTorchPRTrigger.TARGET_COMMIT}}
45+
_DOCKER_IMAGE: $(DOCKER_IMAGE_PR)
46+
_RUN_TESTS: $(RUN_TESTS_PR)
47+
48+
- stage: 'NotifyWebapp'
49+
displayName: 'Notify Webapp that pipeline is finished'
50+
dependsOn: PRCustomTests
51+
condition: succeededOrFailed()
52+
jobs:
53+
- template: job_templates/notify-webapp-template.yml
54+
parameters:
55+
name: ubuntu_1804_CPU
56+
pool: $(BUILD_POOL_LIN_1)
57+
customMatrixes:
58+
PR_Notify_WebApp:
59+
_TARGET_CIRCLECI_BUILD: $(TARGET_CIRCLECI_BUILD_PR)
60+
_TARGET_BRANCH_TO_CHECK: ${{parameters.GitHubPyTorchPRTrigger.TARGET_BRANCH_TO_CHECK_AZ_DEVOPS_PR}}
61+
_TARGET_PR_NUMBER: ${{parameters.GitHubPyTorchPRTrigger.PR_NUMBER}}
62+
_TARGET_COMMIT: ${{parameters.GitHubPyTorchPRTrigger.TARGET_COMMIT}}

0 commit comments

Comments
 (0)