Skip to content

Commit bb2c7f4

Browse files
committed
Update on "Actually run backward criterion tests."
These were (apparently) accidentally turned off two years ago in #9287. Differential Revision: [D23408987](https://our.internmc.facebook.com/intern/diff/D23408987)
2 parents ab2ffb7 + a81d447 commit bb2c7f4

File tree

321 files changed

+42263
-2283
lines changed

Some content is hidden

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

321 files changed

+42263
-2283
lines changed

.circleci/cimodel/data/pytorch_build_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
("xenial", [
66
("rocm", [
77
("3.5.1", [
8-
X("3.6"),
8+
("3.6", [
9+
('build_only', [XImportant(True)]),
10+
]),
911
]),
1012
]),
1113
("gcc", [

.circleci/cimodel/data/pytorch_build_definitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def instantiate_configs():
307307
parallel_backend = fc.find_prop("parallel_backend") or None
308308
build_only = fc.find_prop("build_only") or False
309309
is_coverage = fc.find_prop("is_coverage") or False
310-
if build_only and restrict_phases is None:
310+
if build_only:
311311
restrict_phases = ["build"]
312312
if is_coverage and restrict_phases is None:
313313
restrict_phases = ["build", "coverage_test"]

.circleci/cimodel/data/simple/mobile_definitions.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ def gen_tree(self):
5757
[DOCKER_REQUIREMENT_ASAN],
5858
["build"]
5959
),
60-
MobileJob(
61-
DOCKER_IMAGE_ASAN,
62-
[DOCKER_REQUIREMENT_ASAN],
63-
["custom", "build", "static"]
64-
),
6560

6661
# Use LLVM-DEV toolchain in android-ndk-r19c docker image
6762
MobileJob(

.circleci/config.yml

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6120,54 +6120,9 @@ workflows:
61206120
name: pytorch_linux_xenial_rocm3_5_1_py3_6_build
61216121
requires:
61226122
- "docker-pytorch-linux-xenial-rocm3.5.1-py3.6"
6123-
filters:
6124-
branches:
6125-
only:
6126-
- master
6127-
- /ci-all\/.*/
6128-
- /release\/.*/
61296123
build_environment: "pytorch-linux-xenial-rocm3.5.1-py3.6-build"
61306124
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-rocm3.5.1-py3.6"
61316125
resource_class: xlarge
6132-
- pytorch_linux_test:
6133-
name: pytorch_linux_xenial_rocm3_5_1_py3_6_test1
6134-
requires:
6135-
- pytorch_linux_xenial_rocm3_5_1_py3_6_build
6136-
filters:
6137-
branches:
6138-
only:
6139-
- master
6140-
- /ci-all\/.*/
6141-
- /release\/.*/
6142-
build_environment: "pytorch-linux-xenial-rocm3.5.1-py3.6-test1"
6143-
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-rocm3.5.1-py3.6"
6144-
resource_class: pytorch/amd-gpu
6145-
- pytorch_linux_test:
6146-
name: pytorch_linux_xenial_rocm3_5_1_py3_6_test2
6147-
requires:
6148-
- pytorch_linux_xenial_rocm3_5_1_py3_6_build
6149-
filters:
6150-
branches:
6151-
only:
6152-
- master
6153-
- /ci-all\/.*/
6154-
- /release\/.*/
6155-
build_environment: "pytorch-linux-xenial-rocm3.5.1-py3.6-test2"
6156-
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-rocm3.5.1-py3.6"
6157-
resource_class: pytorch/amd-gpu
6158-
- pytorch_linux_test:
6159-
name: pytorch_linux_xenial_rocm3_5_1_py3_6_caffe2_test
6160-
requires:
6161-
- pytorch_linux_xenial_rocm3_5_1_py3_6_build
6162-
filters:
6163-
branches:
6164-
only:
6165-
- master
6166-
- /ci-all\/.*/
6167-
- /release\/.*/
6168-
build_environment: "pytorch-linux-xenial-rocm3.5.1-py3.6-caffe2_test"
6169-
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-rocm3.5.1-py3.6"
6170-
resource_class: pytorch/amd-gpu
61716126
- pytorch_linux_build:
61726127
name: pytorch_linux_xenial_py3_6_gcc5_4_build
61736128
requires:
@@ -6652,13 +6607,6 @@ workflows:
66526607
name: pytorch_linux_xenial_py3_clang5_mobile_build
66536608
requires:
66546609
- docker-pytorch-linux-xenial-py3-clang5-asan
6655-
- pytorch_linux_build:
6656-
build_environment: pytorch-linux-xenial-py3-clang5-mobile-custom-build-static
6657-
build_only: "1"
6658-
docker_image: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-asan
6659-
name: pytorch_linux_xenial_py3_clang5_mobile_custom_build_static
6660-
requires:
6661-
- docker-pytorch-linux-xenial-py3-clang5-asan
66626610
- pytorch_linux_build:
66636611
build_environment: pytorch-linux-xenial-py3-clang5-mobile-custom-build-dynamic
66646612
build_only: "1"

.circleci/docker/build.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ case "$image" in
160160
KATEX=yes
161161
;;
162162
pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7)
163-
UBUNTU_VERSION=16.04-rc
164163
CUDA_VERSION=11.0
165164
CUDNN_VERSION=8
166165
ANACONDA_PYTHON_VERSION=3.6
@@ -230,7 +229,6 @@ case "$image" in
230229
VISION=yes
231230
;;
232231
pytorch-linux-bionic-cuda11.0-cudnn8-py3.6-gcc9)
233-
UBUNTU_VERSION=18.04-rc
234232
CUDA_VERSION=11.0
235233
CUDNN_VERSION=8
236234
ANACONDA_PYTHON_VERSION=3.6
@@ -241,7 +239,6 @@ case "$image" in
241239
KATEX=yes
242240
;;
243241
pytorch-linux-bionic-cuda11.0-cudnn8-py3.8-gcc9)
244-
UBUNTU_VERSION=18.04-rc
245242
CUDA_VERSION=11.0
246243
CUDNN_VERSION=8
247244
ANACONDA_PYTHON_VERSION=3.8

.circleci/docker/common/install_conda.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
8686
conda_install magma-cuda101 -c pytorch
8787
elif [[ "$CUDA_VERSION" == 10.2* ]]; then
8888
conda_install magma-cuda102 -c pytorch
89+
elif [[ "$CUDA_VERSION" == 11.0* ]]; then
90+
conda_install magma-cuda110 -c pytorch
8991
fi
9092

9193
# TODO: This isn't working atm

.circleci/scripts/binary_upload.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ do_backup() {
3030
(
3131
pushd /tmp/workspace
3232
set -x
33-
${AWS_S3_CP} --recursive . "${BACKUP_BUCKET}/${CIRCLE_TAG}/${backup_dir}"
33+
${AWS_S3_CP} --recursive . "${BACKUP_BUCKET}/${CIRCLE_TAG}/${backup_dir}/"
3434
)
3535
}
3636

@@ -52,7 +52,7 @@ s3_upload() {
5252
local pkg_type
5353
extension="$1"
5454
pkg_type="$2"
55-
s3_dir="${UPLOAD_BUCKET}/${pkg_type}/${UPLOAD_CHANNEL}/${UPLOAD_SUBFOLDER}"
55+
s3_dir="${UPLOAD_BUCKET}/${pkg_type}/${UPLOAD_CHANNEL}/${UPLOAD_SUBFOLDER}/"
5656
(
5757
for pkg in ${PKG_DIR}/*.${extension}; do
5858
(

.jenkins/pytorch/build-mobile.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ retry pip install --pre torch torchvision \
2222

2323
# Run end-to-end process of building mobile library, linking into the predictor
2424
# binary, and running forward pass with a real model.
25-
if [[ "$BUILD_ENVIRONMENT" == *-mobile-custom-build-static* ]]; then
26-
TEST_CUSTOM_BUILD_STATIC=1 test/mobile/custom_build/build.sh
27-
elif [[ "$BUILD_ENVIRONMENT" == *-mobile-custom-build-dynamic* ]]; then
25+
if [[ "$BUILD_ENVIRONMENT" == *-mobile-custom-build-dynamic* ]]; then
2826
export LLVM_DIR="$(llvm-config-5.0 --prefix)"
2927
echo "LLVM_DIR: ${LLVM_DIR}"
3028
TEST_CUSTOM_BUILD_DYNAMIC=1 test/mobile/custom_build/build.sh

BUILD.bazel

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@bazel_skylib//lib:paths.bzl", "paths")
22
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
33
load("@rules_proto//proto:defs.bzl", "proto_library")
44
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_proto_library", "cc_test")
5-
load("//third_party:substitution.bzl", "template_rule")
5+
load("//third_party:substitution.bzl", "header_template_rule")
66
load("//:tools/build_variables.bzl", "torch_cpp_srcs", "libtorch_python_core_sources", "libtorch_core_sources", "libtorch_distributed_sources", "libtorch_extra_sources", "jit_core_sources")
77
load("//tools/rules:cu.bzl", "cu_library")
88
load("//tools/config:defs.bzl", "if_cuda")
@@ -27,19 +27,18 @@ COMMON_COPTS = [
2727
])
2828

2929
# c10
30-
template_rule(
30+
header_template_rule(
3131
name = "cmake_macros_h",
3232
src = "c10/macros/cmake_macros.h.in",
3333
out = "c10/macros/cmake_macros.h",
3434
substitutions = {
3535
"cmakedefine": "define",
3636
"#define FEATURE_TORCH_MOBILE": "/* #undef FEATURE_TORCH_MOBILE */",
37-
"#define USE_STATIC_DISPATCH": "/* #undef USE_STATIC_DISPATCH */",
3837
"#define C10_USE_NUMA": "/* #undef C10_USE_NUMA */",
3938
},
4039
)
4140

42-
template_rule(
41+
header_template_rule(
4342
name = "cuda_cmake_macros_h",
4443
src = "c10/cuda/impl/cuda_cmake_macros.h.in",
4544
out = "c10/cuda/impl/cuda_cmake_macros.h",
@@ -58,13 +57,12 @@ cc_library(
5857
"c10/macros/*.h",
5958
"c10/util/*.h",
6059
"c10/util/*.hpp",
61-
]) + [
62-
"c10/macros/cmake_macros.h",
63-
"c10/cuda/impl/cuda_cmake_macros.h",
64-
],
60+
]),
6561
deps = [
6662
"@com_github_gflags_gflags//:gflags",
6763
"@com_github_glog//:glog",
64+
":cmake_macros_h",
65+
":cuda_cmake_macros_h",
6866
],
6967
)
7068

@@ -531,7 +529,7 @@ filegroup(
531529
],
532530
)
533531

534-
template_rule(
532+
header_template_rule(
535533
name = "aten_src_ATen_config",
536534
src = "aten/src/ATen/Config.h.in",
537535
out = "aten/src/ATen/Config.h",
@@ -547,7 +545,7 @@ template_rule(
547545
},
548546
)
549547

550-
template_rule(
548+
header_template_rule(
551549
name = "aten_src_ATen_cuda_config",
552550
src = "aten/src/ATen/cuda/CUDAConfig.h.in",
553551
out = "aten/src/ATen/cuda/CUDAConfig.h",
@@ -558,7 +556,7 @@ template_rule(
558556
},
559557
)
560558

561-
template_rule(
559+
header_template_rule(
562560
name = "aten_src_TH_THGeneral",
563561
src = "aten/src/TH/THGeneral.h.in",
564562
out = "aten/src/TH/THGeneral.h",
@@ -570,7 +568,7 @@ template_rule(
570568
},
571569
)
572570

573-
template_rule(
571+
header_template_rule(
574572
name = "aten_src_THC_THCGeneral",
575573
src = "aten/src/THC/THCGeneral.h.in",
576574
out = "aten/src/THC/THCGeneral.h",
@@ -582,8 +580,6 @@ template_rule(
582580
cc_library(
583581
name = "aten_headers",
584582
hdrs = [
585-
"aten/src/TH/THGeneral.h",
586-
"aten/src/THC/THCGeneral.h",
587583
"torch/csrc/WindowsTorchApiMacro.h",
588584
"torch/csrc/jit/frontend/function_schema_parser.h",
589585
] + glob([
@@ -605,6 +601,8 @@ cc_library(
605601
],
606602
deps = [
607603
":c10_headers",
604+
":aten_src_TH_THGeneral",
605+
":aten_src_THC_THCGeneral",
608606
],
609607
)
610608

@@ -766,7 +764,7 @@ cc_proto_library(
766764
deps = [":caffe2_proto_source"],
767765
)
768766

769-
template_rule(
767+
header_template_rule(
770768
name = "caffe2_core_macros_h",
771769
src = "caffe2/core/macros.h.in",
772770
out = "caffe2/core/macros.h",
@@ -1586,7 +1584,6 @@ filegroup(
15861584
cc_library(
15871585
name = "caffe2_for_aten_headers",
15881586
hdrs = [
1589-
"caffe2/core/macros.h",
15901587
"caffe2/core/common.h",
15911588
"caffe2/core/logging.h",
15921589
"caffe2/core/types.h",
@@ -1604,6 +1601,7 @@ cc_library(
16041601
deps = [
16051602
":c10_headers",
16061603
":caffe2_protos",
1604+
":caffe2_core_macros_h",
16071605
],
16081606
)
16091607

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ option(BUILD_PYTHON "Build Python binaries" ON)
124124
option(BUILD_CAFFE2_OPS "Build Caffe2 operators" ON)
125125
option(BUILD_SHARED_LIBS "Build libcaffe2.so" ON)
126126
option(BUILD_CAFFE2_MOBILE "Build libcaffe2 for mobile (deprecating)" OFF)
127-
option(USE_STATIC_DISPATCH "Use static dispatch for ATen operators" OFF)
128127
cmake_dependent_option(
129128
CAFFE2_LINK_LOCAL_PROTOBUF "If set, build protobuf inside libcaffe2.so." ON
130129
"BUILD_SHARED_LIBS AND BUILD_CUSTOM_PROTOBUF" OFF)

0 commit comments

Comments
 (0)