8000 Update on "[caffe2] Remove OperatorBase::newstyle_outputs_" · pytorch/pytorch@fa6a3f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa6a3f6

Browse files
committed
Update on "[caffe2] Remove OperatorBase::newstyle_outputs_"
`OperatorBase` maintains `output_tensors_` and `newstyle_outputs_` which hold the same list of tensors except one is `vector<caffe2::Tensor>` and the other is `List<at::Tensor>`. This instead maintains only `output_tensors_` and handles the conversions inside of export_caffe2_op_to_c10. Differential Revision: [D32289811](https://our.internmc.facebook.com/intern/diff/D32289811) [ghstack-poisoned]
2 parents 1d690ec + d8a49b9 commit fa6a3f6

File tree

818 files changed

+61633
-17467
lines changed

Some content is hidden

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

818 files changed

+61633
-17467
lines changed

.circleci/cimodel/data/binary_build_data.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,7 @@ def get_processor_arch_name(gpu_version):
3030
"cu" + gpu_version.strip("cuda") if gpu_version.startswith("cuda") else gpu_version
3131
)
3232

33-
LINUX_PACKAGE_VARIANTS = OrderedDict(
34-
manywheel=[
35-
"3.6m",
36-
"3.7m",
37-
"3.8m",
38-
"3.9m"
39-
],
40-
conda=dimensions.STANDARD_PYTHON_VERSIONS,
41-
libtorch=[
42-
"3.7m",
43-
],
44-
)
45-
4633
CONFIG_TREE_DATA = OrderedDict(
47-
linux=(dimensions.GPU_VERSIONS, LINUX_PACKAGE_VARIANTS),
4834
macos=([None], OrderedDict(
4935
wheel=dimensions.STANDARD_PYTHON_VERSIONS,
5036
conda=dimensions.STANDARD_PYTHON_VERSIONS,

.circleci/cimodel/data/dimensions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
]
99

1010
ROCM_VERSIONS = [
11-
"4.1",
12-
"4.2",
1311
"4.3.1",
12+
"4.5.2",
1413
]
1514

1615
ROCM_VERSION_LABELS = ["rocm" + v for v in ROCM_VERSIONS]
@@ -20,5 +19,6 @@
2019
STANDARD_PYTHON_VERSIONS = [
2120
"3.7",
2221
"3.8",
23-
"3.9"
22+
"3.9",
23+
"3.10"
2424
]

.circleci/cimodel/data/simple/util/docker_constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ def gen_docker_image_requires(image_name):
1111

1212

1313
DOCKER_IMAGE_BASIC, DOCKER_REQUIREMENT_BASE = gen_docker_image(
14-
"pytorch-linux-xenial-py3.6-gcc5.4"
14+
"pytorch-linux-xenial-py3.7-gcc5.4"
1515
)
1616

1717
DOCKER_IMAGE_CUDA_10_2, DOCKER_REQUIREMENT_CUDA_10_2 = gen_docker_image(
1818
"pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
1919
)
2020

2121
DOCKER_IMAGE_GCC7, DOCKER_REQUIREMENT_GCC7 = gen_docker_image(
22-
"pytorch-linux-xenial-py3.6-gcc7"
22+
"pytorch-linux-xenial-py3.7-gcc7"
2323
)
2424

2525

.circleci/config.yml

Lines changed: 1070 additions & 5535 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/docker/build.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,29 +237,21 @@ case "$image" in
237237
VISION=yes
238238
ROCM_VERSION=3.9
239239
;;
240-
pytorch-linux-bionic-rocm4.1-py3.7)
241-
ANACONDA_PYTHON_VERSION=3.7
242-
GCC_VERSION=9
243-
PROTOBUF=yes
244-
DB=yes
245-
VISION=yes
246-
ROCM_VERSION=4.1
247-
;;
248-
pytorch-linux-bionic-rocm4.2-py3.7)
240+
pytorch-linux-bionic-rocm4.3.1-py3.7)
249241
ANACONDA_PYTHON_VERSION=3.7
250242
GCC_VERSION=9
251243
PROTOBUF=yes
252244
DB=yes
253245
VISION=yes
254-
ROCM_VERSION=4.2
246+
ROCM_VERSION=4.3.1
255247
;;
256-
pytorch-linux-bionic-rocm4.3.1-py3.7)
248+
pytorch-linux-bionic-rocm4.5-py3.7)
257249
ANACONDA_PYTHON_VERSION=3.7
258250
GCC_VERSION=9
259251
PROTOBUF=yes
260252
DB=yes
261253
VISION=yes
262-
ROCM_VERSION=4.3.1
254+
ROCM_VERSION=4.5.2
263255
;;
264256
*)
265257
# Catch-all for builds that are not hardcoded.

.circleci/docker/common/install_base.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ wget https://ossci-linux.s3.amazonaws.com/valgrind-${VALGRIND_VERSION}.tar.bz2
122122
tar -xjf valgrind-${VALGRIND_VERSION}.tar.bz2
123123
cd valgrind-${VALGRIND_VERSION}
124124
./configure --prefix=/usr/local
125-
make -j 4
125+
make -j6
126126
sudo make install
127127
cd ../../
128128
rm -rf valgrind_build

.circleci/docker/common/install_openssl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ wget -q -O "${OPENSSL}.tar.gz" "https://ossci-linux.s3.amazonaws.com/${OPENSSL}.
88
tar xf "${OPENSSL}.tar.gz"
99
cd "${OPENSSL}"
1010
./config --prefix=/opt/openssl -d '-Wl,--enable-new-dtags,-rpath,$(LIBRPATH)'
11-
# NOTE: opensl errors out when built with the -j option
12-
make install_sw
11+
# NOTE: openssl install errors out when built with the -j option
12+
make -j6; make install_sw
1313
cd ..
1414
rm -rf "${OPENSSL}"

.circleci/docker/common/install_protobuf.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ install_protobuf_317() {
1414

1515
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz"
1616
tar -xvz -C "$pb_dir" --strip-components 1 -f protobuf-all-3.17.3.tar.gz
17-
# -j2 to balance memory usage and speed.
17+
# -j6 to balance memory usage and speed.
1818
# naked `-j` seems to use too much memory.
19-
pushd "$pb_dir" && ./configure && make -j2 && make -j2 check && sudo make -j2 install && sudo ldconfig
19+
pushd "$pb_dir" && ./configure && make -j6 && make -j6 check && sudo make -j6 install && sudo ldconfig
2020
popd
2121
rm -rf $pb_dir
2222
}

.circleci/docker/common/install_rocm.sh

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ ver() {
3434
printf "%3d%03d%03d%03d" $(echo "$1" | tr '.' ' ');
3535
}
3636

37+
# Map ROCm version to AMDGPU version
38+
declare -A AMDGPU_VERSIONS=( ["4.5.2"]="21.40.2" )
39+
3740
install_ubuntu() {
3841
apt-get update
3942
if [[ $UBUNTU_VERSION == 18.04 ]]; then
@@ -51,14 +54,22 @@ install_ubuntu() {
5154
apt-get install -y libc++1
5255
apt-get install -y libc++abi1
5356

57+
if [[ $(ver $ROCM_VERSION) -ge $(ver 4.5) ]]; then
58+
# Add amdgpu repository
59+
UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'`
60+
local amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/ubuntu"
61+
echo "deb [arch=amd64] ${amdgpu_baseurl} ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
62+
fi
63+
5464
ROCM_REPO="ubuntu"
5565
if [[ $(ver $ROCM_VERSION) -lt $(ver 4.2) ]]; then
5666
ROCM_REPO="xenial"
5767
fi
5868

5969
# Add rocm repository
6070
wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
61-
echo "deb [arch=amd64] http://repo.radeon.com/rocm/apt/${ROCM_VERSION} ${ROCM_REPO} main" > /etc/apt/sources.list.d/rocm.list
71+
local rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
72+
echo "deb [arch=amd64] ${rocm_baseurl} ${ROCM_REPO} main" > /etc/apt/sources.list.d/rocm.list
6273
apt-get update --allow-insecure-repositories
6374

6475
DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
@@ -95,11 +106,24 @@ install_centos() {
95106
yum install -y epel-release
96107
yum install -y dkms kernel-headers-`uname -r` kernel-devel-`uname -r`
97108

109+
if [[ $(ver $ROCM_VERSION) -ge $(ver 4.5) ]]; then
110+
# Add amdgpu repository
111+
local amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/rhel/7.9/main/x86_64"
112+
echo "[AMDGPU]" > /etc/yum.repos.d/amdgpu.repo
113+
echo "name=AMDGPU" >> /etc/yum.repos.d/amdgpu.repo
114+
echo "baseurl=${amdgpu_baseurl}" >> /etc/yum.repos.d/amdgpu.repo
115+
echo "enabled=1" >> /etc/yum.repos.d/amdgpu.repo
116+
echo "gpgcheck=1" >> /etc/yum.repos.d/amdgpu.repo
117+
echo "gpgkey=http://repo.radeon.com/rocm/rocm.gpg.key" >> /etc/yum.repos.d/amdgpu.repo
118+
fi
119+
120+
local rocm_baseurl="http://repo.radeon.com/rocm/yum/${ROCM_VERSION}"
98121
echo "[ROCm]" > /etc/yum.repos.d/rocm.repo
99122
echo "name=ROCm" >> /etc/yum.repos.d/rocm.repo
100-
echo "baseurl=http://repo.radeon.com/rocm/yum/${ROCM_VERSION}" >> /etc/yum.repos.d/rocm.repo
123+
echo "baseurl=${rocm_baseurl}" >> /etc/yum.repos.d/rocm.repo
101124
echo "enabled=1" >> /etc/yum.repos.d/rocm.repo
102-
echo "gpgcheck=0" >> /etc/yum.repos.d/rocm.repo
125+
echo "gpgcheck=1" >> /etc/yum.repos.d/rocm.repo
126+
echo "gpgkey=http://repo.radeon.com/rocm/rocm.gpg.key" >> /etc/yum.repos.d/rocm.repo
103127

104128
yum update -y
105129

.circleci/ecr_gc_docker/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

.circleci/ecr_gc_docker/docker_hub.py

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0