Skip to content

Commit

Permalink
Update base for Update on "Factor vector intrinsics out of SumKernel.…
Browse files Browse the repository at this point in the history
…cpp"


This will make it simpler to support AVX512 which is upcoming in #56992, see #56992 (comment) for reference.

Differential Revision: [D29753536](https://our.internmc.facebook.com/intern/diff/D29753536)

[ghstack-poisoned]
  • Loading branch information
peterbell10 committed Jul 19, 2021
2 parents d531bed + 1b0a7f3 commit d6c5321
Show file tree
Hide file tree
Showing 446 changed files with 15,202 additions and 6,876 deletions.
22 changes: 12 additions & 10 deletions .circleci/cimodel/data/pytorch_build_data.py
Expand Up @@ -40,21 +40,23 @@
('shard_test', [XImportant(True)]),
]),
]),
("libtorch", [
(True, [
('build_only', [X(True)]),
]),
]),
# UNCOMMENT THE BELOW TO REENABLE LIBTORCH
# ("libtorch", [
# (True, [
# ('build_only', [X(True)]),
# ]),
# ]),
]),
]),
("11.1", [
("3.8", [
("shard_test", [XImportant(True)]),
("libtorch", [
(True, [
('build_only', [X(True)]),
]),
]),
# UNCOMMENT THE BELOW TO REENABLE LIBTORCH
# ("libtorch", [
# (True, [
# ('build_only', [X(True)]),
# ]),
# ]),
]),
]),
]),
Expand Down
1 change: 1 addition & 0 deletions .circleci/cimodel/data/windows_build_definitions.py
Expand Up @@ -78,6 +78,7 @@ def gen_tree(self):
props_dict = {
"build_environment": build_environment_string,
"python_version": miniutils.quote(python_version),
"vs_version": miniutils.quote("16.8.6"),
"vc_version": miniutils.quote(self.vscode_spec.dotted_version()),
"vc_year": miniutils.quote(str(self.vscode_spec.year)),
"vc_product": self.vscode_spec.get_product(),
Expand Down
111 changes: 24 additions & 87 deletions .circleci/config.yml
Expand Up @@ -212,7 +212,7 @@ commands:
cd ~/project
export ANDROID_BUILD_TYPE="<< parameters.build_type >>"
export COMMIT_TIME=$(git log --max-count=1 --format=%ct || echo 0)
python3 tools/stats/upload_binary_size_to_scuba.py android
python3 -m tools.stats.upload_binary_size_to_scuba android
##############################################################################
# Binary build (nightlies nightly build) defaults
Expand Down Expand Up @@ -357,6 +357,9 @@ pytorch_windows_params: &pytorch_windows_params
python_version:
type: string
default: "3.8"
vs_version:
type: string
default: "16.8.6"
vc_version:
type: string
default: "14.16"
Expand All @@ -374,6 +377,7 @@ pytorch_windows_params: &pytorch_windows_params
SCCACHE_BUCKET: "ossci-compiler-cache"
CUDA_VERSION: <<parameters.cuda_version>>
PYTHON_VERSION: <<parameters.python_version>>
VS_VERSION: <<parameters.vs_version>>
VC_VERSION: <<parameters.vc_version>>
VC_YEAR: <<parameters.vc_year>>
VC_PRODUCT: <<parameters.vc_product>>
Expand Down Expand Up @@ -547,7 +551,7 @@ jobs:
cd /pytorch && export COMMIT_TIME=$(git log --max-count=1 --format=%ct || echo 0)
python3 -mpip install requests && \
SCRIBE_GRAPHQL_ACCESS_TOKEN=${SCRIBE_GRAPHQL_ACCESS_TOKEN} \
python3 tools/stats/upload_binary_size_to_scuba.py || exit 0
python3 -m tools.stats.upload_binary_size_to_scuba || exit 0
- store_artifacts:
path: /home/circleci/project/dist

Expand Down Expand Up @@ -689,8 +693,7 @@ jobs:
export JOB_BASE_NAME="$CIRCLE_JOB"
export CIRCLE_WORKFLOW_ID="$CIRCLE_WORKFLOW_ID"
cd workspace
export PYTHONPATH="\${PWD}"
python tools/stats/print_test_stats.py --upload-to-s3 --compare-with-s3 test
python -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
EOL
echo "(cat docker_commands.sh | docker exec -u jenkins -e LANG=C.UTF-8 -i "$id" bash) 2>&1" > command.sh
unbuffer bash command.sh | ts
Expand Down Expand Up @@ -720,6 +723,9 @@ jobs:
python_version:
type: string
default: "3.8"
vs_version:
type: string
default: "16.8.6"
vc_version:
type: string
default: "14.16"
Expand Down Expand Up @@ -787,6 +793,9 @@ jobs:
python_version:
type: string
default: "3.8"
vs_version:
type: string
default: "16.8.6"
vc_version:
type: string
default: "14.16"
Expand Down Expand Up @@ -842,9 +851,8 @@ jobs:
set -ex
export AWS_ACCESS_KEY_ID=${CIRCLECI_AWS_ACCESS_KEY_FOR_WIN_BUILD_V1}
export AWS_SECRET_ACCESS_KEY=${CIRCLECI_AWS_SECRET_KEY_FOR_WIN_BUILD_V1}
export PYTHONPATH="$PWD"
pip install typing_extensions boto3
python tools/stats/print_test_stats.py --upload-to-s3 --compare-with-s3 test
python -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
when: always
- store_test_results:
path: test/test-reports
Expand Down Expand Up @@ -881,7 +889,7 @@ jobs:
cd /pytorch && export COMMIT_TIME=$(git log --max-count=1 --format=%ct || echo 0)
python3 -mpip install requests && \
SCRIBE_GRAPHQL_ACCESS_TOKEN=${SCRIBE_GRAPHQL_ACCESS_TOKEN} \
python3 /pytorch/tools/stats/upload_binary_size_to_scuba.py || exit 0
python3 -m tools.stats.upload_binary_size_to_scuba || exit 0
- persist_to_workspace:
root: /
paths: final_pkgs
Expand Down Expand Up @@ -1454,12 +1462,11 @@ jobs:
set -ex
source /Users/distiller/workspace/miniconda3/bin/activate
pip install boto3
export PYTHONPATH="$PWD"
# Using the same IAM user to write stats to our OSS bucket
export AWS_ACCESS_KEY_ID=${CIRCLECI_AWS_ACCESS_KEY_FOR_SCCACHE_S3_BUCKET_V4}
export AWS_SECRET_ACCESS_KEY=${CIRCLECI_AWS_SECRET_KEY_FOR_SCCACHE_S3_BUCKET_V4}
python tools/stats/print_test_stats.py --upload-to-s3 --compare-with-s3 test
python -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
when: always
- store_test_results:
path: test/test-reports
Expand Down Expand Up @@ -7055,19 +7062,6 @@ workflows:
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- pytorch_linux_build:
name: pytorch_libtorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
filters:
branches:
only:
- master
- /ci-all\/.*/
- /release\/.*/
build_environment: "pytorch-libtorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
build_only: "1"
- pytorch_linux_build:
name: pytorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_build
requires:
Expand All @@ -7090,19 +7084,6 @@ workflows:
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- pytorch_linux_build:
name: pytorch_libtorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
filters:
branches:
only:
- master
- /ci-all\/.*/
- /release\/.*/
build_environment: "pytorch-libtorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
build_only: "1"
- pytorch_linux_build:
name: pytorch_linux_bionic_py3_6_clang9_noarch_build
requires:
Expand Down Expand Up @@ -7624,6 +7605,7 @@ workflows:
vc_product: BuildTools
vc_version: ""
vc_year: "2019"
vs_version: "16.8.6"
- pytorch_windows_test:
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
cuda_version: "10.1"
Expand All @@ -7642,6 +7624,7 @@ workflows:
vc_product: BuildTools
vc_version: ""
vc_year: "2019"
vs_version: "16.8.6"
- update_s3_htmls:
context: org-member
filters:
Expand Down Expand Up @@ -8950,9 +8933,6 @@ workflows:
- docker_build_job:
name: "docker-pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
image_name: "pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
- docker_build_job:
name: "docker-pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
image_name: "pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
- docker_build_job:
name: "docker-pytorch-linux-xenial-py3-clang5-android-ndk-r19c"
image_name: "pytorch-linux-xenial-py3-clang5-android-ndk-r19c"
Expand Down Expand Up @@ -9059,20 +9039,6 @@ workflows:
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- pytorch_linux_build:
name: pytorch_libtorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
build_environment: "pytorch-libtorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
build_only: "1"
- pytorch_linux_build:
name: pytorch_libtorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
build_environment: "pytorch-libtorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
build_only: "1"
- pytorch_linux_build:
build_environment: "pytorch-linux-xenial-py3-clang5-android-ndk-r19c-x86_32-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c"
Expand Down Expand Up @@ -9182,6 +9148,7 @@ workflows:
vc_product: BuildTools
vc_version: ""
vc_year: "2019"
vs_version: "16.8.6"
- pytorch_windows_test:
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
cuda_version: "10.1"
Expand All @@ -9194,6 +9161,7 @@ workflows:
vc_product: BuildTools
vc_version: ""
vc_year: "2019"
vs_version: "16.8.6"
when: << pipeline.parameters.run_master_build >>
slow_gradcheck_build:
jobs:
Expand All @@ -9220,41 +9188,7 @@ workflows:
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
when: << pipeline.parameters.run_slow_gradcheck_build >>
scheduled-ci:
triggers:
- schedule:
# runs every 4 hours on the 45th minute
cron: "45 0,4,8,12,16,20 * * *"
filters:
branches:
only:
- master
jobs:
- docker_build_job:
name: "docker-pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7"
image_name: "pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7"
- pytorch_linux_build:
name: periodic_pytorch_xenial_cuda11_3_cudnn8_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7"
build_environment: "pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7"
- pytorch_linux_test:
name: periodic_pytorch_xenial_cuda11_3_cudnn8_gcc7_test
requires:
- periodic_pytorch_xenial_cuda11_3_cudnn8_gcc7_build
build_environment: "pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7-test"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- pytorch_linux_build:
name: periodic_libtorch_xenial_cuda11_3_cudnn8_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7"
build_environment: "pytorch-libtorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.3-cudnn8-py3-gcc7"

# The following allows these jobs to run on ci-all and release branches
# The following allows the equivalent periodic jobs on GHA to run on CircleCI ci-all and release branches
debuggable-scheduled-ci:
jobs:
- docker_build_job:
Expand Down Expand Up @@ -9307,6 +9241,7 @@ workflows:
python_version: "3.8"
use_cuda: "1"
vc_product: BuildTools
vs_version: "16.8.6"
vc_version: "14.28.29333"
vc_year: "2019"
filters:
Expand All @@ -9325,6 +9260,7 @@ workflows:
test_name: pytorch-windows-test1
use_cuda: "1"
vc_product: BuildTools
vs_version: "16.8.6"
vc_version: "14.28.29333"
vc_year: "2019"
filters:
Expand All @@ -9343,6 +9279,7 @@ workflows:
test_name: pytorch-windows-test2
use_cuda: "1"
vc_product: BuildTools
vs_version: "16.8.6"
vc_version: "14.28.29333"
vc_year: "2019"
filters:
Expand Down
45 changes: 27 additions & 18 deletions .circleci/scripts/vs_install.ps1
@@ -1,8 +1,8 @@
# https://developercommunity.visualstudio.com/t/install-specific-version-of-vs-component/1142479
# https://docs.microsoft.com/en-us/visualstudio/releases/2019/history#release-dates-and-build-numbers
# Where to find the links: https://docs.microsoft.com/en-us/visualstudio/releases/2019/history#release-dates-and-build-numbers

# 16.8.6 BuildTools
$VS_DOWNLOAD_LINK = "https://s3.amazonaws.com/ossci-windows/vs16.8.6_BuildTools.exe"
# BuildTools from S3
$VS_DOWNLOAD_LINK = "https://s3.amazonaws.com/ossci-windows/vs${env:VS_VERSION}_BuildTools.exe"
$COLLECT_DOWNLOAD_LINK = "https://aka.ms/vscollect.exe"
$VS_INSTALL_ARGS = @("--nocache","--quiet","--wait", "--add Microsoft.VisualStudio.Workload.VCTools",
"--add Microsoft.Component.MSBuild",
Expand All @@ -18,39 +18,48 @@ if (${env:INSTALL_WINDOWS_SDK} -eq "1") {
$VS_INSTALL_ARGS += "--add Microsoft.VisualStudio.Component.Windows10SDK.19041"
}

if (Test-Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe") {
$VS_VERSION_major = [int] ${env:VS_VERSION}.split(".")[0]
$existingPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -products "Microsoft.VisualStudio.Product.BuildTools" -version "[${env:VS_VERSION}, ${env:VS_VERSION_major + 1})" -property installationPath
if (($existingPath -ne $null) -and (!${env:CIRCLECI})) {
echo "Found correctly versioned existing BuildTools installation in $existingPath"
exit 0
}
$pathToRemove = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -products "Microsoft.VisualStudio.Product.BuildTools" -property installationPath
}

echo "Downloading VS installer from S3."
curl.exe --retry 3 -kL $VS_DOWNLOAD_LINK --output vs_installer.exe
if ($LASTEXITCODE -ne 0) {
echo "Download of the VS 2019 Version 16.8.6 installer failed"
echo "Download of the VS 2019 Version ${env:VS_VERSION} installer failed"
exit 1
}

if (Test-Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe") {
$existingPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -products "Microsoft.VisualStudio.Product.BuildTools" -version "[16, 17)" -property installationPath
if ($existingPath -ne $null) {
echo "Found existing BuildTools installation in $existingPath"
$VS_UNINSTALL_ARGS = @("uninstall", "--installPath", "`"$existingPath`"", "--quiet","--wait")
$process = Start-Process "${PWD}\vs_installer.exe" -ArgumentList $VS_UNINSTALL_ARGS -NoNewWindow -Wait -PassThru
$exitCode = $process.ExitCode
if (($exitCode -ne 0) -and ($exitCode -ne 3010)) {
echo "Original BuildTools uninstall failed with code $exitCode"
exit 1
}
echo "Original BuildTools uninstalled"
if ($pathToRemove -ne $null) {
echo "Uninstalling $pathToRemove."
$VS_UNINSTALL_ARGS = @("uninstall", "--installPath", "`"$pathToRemove`"", "--quiet","--wait")
$process = Start-Process "${PWD}\vs_installer.exe" -ArgumentList $VS_UNINSTALL_ARGS -NoNewWindow -Wait -PassThru
$exitCode = $process.ExitCode
if (($exitCode -ne 0) -and ($exitCode -ne 3010)) {
echo "Original BuildTools uninstall failed with code $exitCode"
exit 1
}
echo "Other versioned BuildTools uninstalled."
}

echo "Installing Visual Studio version ${env:VS_VERSION}."
$process = Start-Process "${PWD}\vs_installer.exe" -ArgumentList $VS_INSTALL_ARGS -NoNewWindow -Wait -PassThru
Remove-Item -Path vs_installer.exe -Force
$exitCode = $process.ExitCode
if (($exitCode -ne 0) -and ($exitCode -ne 3010)) {
echo "VS 2017 installer exited with code $exitCode, which should be one of [0, 3010]."
echo "VS 2019 installer exited with code $exitCode, which should be one of [0, 3010]."
curl.exe --retry 3 -kL $COLLECT_DOWNLOAD_LINK --output Collect.exe
if ($LASTEXITCODE -ne 0) {
echo "Download of the VS Collect tool failed."
exit 1
}
Start-Process "${PWD}\Collect.exe" -NoNewWindow -Wait -PassThru
New-Item -Path "C:\w\build-results" -ItemType "directory" -Force
Copy-Item -Path "C:\Users\circleci\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\"
Copy-Item -Path "${env:TEMP}\vslogs.zip" -Destination "C:\w\build-results\"
exit 1
}

0 comments on commit d6c5321

Please sign in to comment.