Turning on fbgemm for nightlies (#22784)

Summary:
fbgemm requires a AVX512 which requires a more recent compiler, so this also switches all the nightlies from devtoolset3 to devtoolset7. Since CUDA 9.0 doesn't support devtoolset7, we also switch from CUDA 9.0 to CUDA 9.2
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22784

Differential Revision: D16428165

Pulled By: pjh5

fbshipit-source-id: c1af3729d8edce88a96fa9069d4c5a1808c25f99
This commit is contained in:
Jesse Hellemn 2019-07-22 15:05:19 -07:00 committed by Facebook Github Bot
parent a6e45a69a8
commit e08f8f45ff
9 changed files with 433 additions and 431 deletions

View File

@ -60,8 +60,18 @@ CONFIG_TREE_DATA = OrderedDict(
)
# Why is this an option?
# All the nightlies used to be devtoolset3 and built with the old gcc ABI. We
# added a devtoolset7 option so that we could build nightlies with the new gcc
# ABI. That didn't work since devtoolset7 can't build with the new gcc ABI. But
# then we set devtoolset7 to be the default anyways, since devtoolset7
# understands avx512, which is needed for good fbgemm performance.
# This should be removed. The base dockers should just be upgraded to
# devtoolset7 so we don't have to reinstall this in every build job.
# The same machinery that this uses, though, should be retooled for a different
# compiler toolchain that can build with the new gcc ABI.
DEVTOOLSET_VERSIONS = [
3,
7,
]
@ -102,7 +112,7 @@ class PackageFormatConfigNode(ConfigNode):
self.props["package_format"] = package_format
def get_children(self):
if self.find_prop("os_name") == "linux" and self.find_prop("package_format") != "conda":
if self.find_prop("os_name") == "linux":
return [LinuxGccConfigNode(self, v) for v in DEVTOOLSET_VERSIONS]
else:
return [ArchConfigNode(self, v) for v in self.find_prop("cuda_versions")]

View File

@ -5,7 +5,7 @@ PHASES = ["build", "test"]
CUDA_VERSIONS = [
None, # cpu build
"90",
"92",
"100",
]

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ fi
# We want to call unbuffer, which calls tclsh which finds the expect
# package. The expect was installed by yum into /usr/bin so we want to
# find /usr/bin/tclsh, but this is shadowed by /opt/conda/bin/tclsh in
# the conda docker images.
# the conda docker images, so we prepend it to the path here.
if [[ "$PACKAGE_TYPE" == 'conda' ]]; then
mkdir /just_tclsh_bin
ln -s /usr/bin/tclsh /just_tclsh_bin/tclsh

View File

@ -38,15 +38,16 @@ else
fi
# Upload to parallel folder for gcc abis
# All nightlies used to be devtoolset3, then devtoolset7 was added as a build
# option, so the upload was redirected to nightly/devtoolset7 to avoid
# conflicts with other binaries (there shouldn't be any conflicts). Now we are
# making devtoolset7 the default.
if [[ "$DESIRED_DEVTOOLSET" == 'devtoolset7' ]]; then
export PIP_UPLOAD_FOLDER='nightly/devtoolset7/'
if [[ "$PACKAGE_TYPE" == 'conda' ]]; then
echo "We don't handle conda builds with gcc ABI of 1, since we don't"
echo "want to add a new package name to the conda builds"
exit 1
fi
else
export PIP_UPLOAD_FOLDER='nightly/'
else
# On linux machines, this shouldn't actually be called anymore. This is just
# here for extra safety.
export PIP_UPLOAD_FOLDER='nightly/devtoolset3/'
fi
# We put this here so that OVERRIDE_PACKAGE_VERSION below can read from it
@ -75,7 +76,7 @@ export OVERRIDE_PACKAGE_VERSION="$PYTORCH_BUILD_VERSION"
export TORCH_PACKAGE_NAME='torch-nightly'
export TORCH_CONDA_BUILD_FOLDER='pytorch-nightly'
export USE_FBGEMM=0
export USE_FBGEMM=1
export PIP_UPLOAD_FOLDER="$PIP_UPLOAD_FOLDER"
export DOCKER_IMAGE="$DOCKER_IMAGE"

View File

@ -32,8 +32,8 @@ default_set = [
'caffe2-cmake-cuda9.0-cudnn7-ubuntu16.04',
# Binaries
'manywheel 2.7mu cpu devtoolset3',
'libtorch 2.7m cpu devtoolset3',
'manywheel 2.7mu cpu devtoolset7',
'libtorch 2.7m cpu devtoolset7',
# Caffe2 Android
'caffe2-py2-android-ubuntu16.04',

View File

@ -21,23 +21,18 @@ binary_linux_build: &binary_linux_build
retry yum -q -y install epel-release
retry yum -q -y install expect moreutils
- run:
name: Upgrade gcc version (based on env var)
name: Update compiler to devtoolset7
command: |
set -eux -o pipefail
source /env
if [[ "$DESIRED_DEVTOOLSET" == 'devtoolset7' ]]; then
source "/builder/upgrade_gcc_abi.sh"
source "/builder/update_compiler.sh"
# Env variables are not persisted into the next step
echo "export PATH=$PATH" >> /env
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> /env
# We need to set this variable manually because
# https://github.com/pytorch/pytorch/blob/master/torch/abi-check.cpp
# sets the ABI to 0 by default
echo "export _GLIBCXX_USE_CXX11_ABI=1" >> /env
else
echo "Not upgrading gcc version"
echo "Not updating compiler"
fi
- run:
name: Build

View File

@ -5,22 +5,22 @@
# pytorch-ci-hud to adjust the list of whitelisted builds
# at https://github.com/ezyang/pytorch-ci-hud/blob/master/src/BuildHistoryDisplay.js
- binary_linux_manywheel_2.7mu_cpu_devtoolset3_build:
- binary_linux_manywheel_2.7mu_cpu_devtoolset7_build:
requires:
- setup
- binary_linux_manywheel_3.7m_cu100_devtoolset3_build:
- binary_linux_manywheel_3.7m_cu100_devtoolset7_build:
requires:
- setup
- binary_linux_conda_2.7_cpu_build:
- binary_linux_conda_2.7_cpu_devtoolset7_build:
requires:
- setup
# This binary build is currently broken, see https://github.com/pytorch/pytorch/issues/16710
# - binary_linux_conda_3.6_cu90_build
- binary_linux_libtorch_2.7m_cpu_devtoolset3_build:
# - binary_linux_conda_3.6_cu90_devtoolset7_build
- binary_linux_libtorch_2.7m_cpu_devtoolset7_build:
requires:
- setup
# TODO we should test a libtorch cuda build, but they take too long
# - binary_linux_libtorch_2.7m_cu90_devtoolset3_build
# - binary_linux_libtorch_2.7m_cu90_devtoolset7_build
- binary_macos_wheel_3.6_cpu_build:
requires:
- setup
@ -31,21 +31,21 @@
requires:
- setup
- binary_linux_manywheel_2.7mu_cpu_devtoolset3_test:
- binary_linux_manywheel_2.7mu_cpu_devtoolset7_test:
requires:
- setup
- binary_linux_manywheel_2.7mu_cpu_devtoolset3_build
- binary_linux_manywheel_3.7m_cu100_devtoolset3_test:
- binary_linux_manywheel_2.7mu_cpu_devtoolset7_build
- binary_linux_manywheel_3.7m_cu100_devtoolset7_test:
requires:
- setup
- binary_linux_manywheel_3.7m_cu100_devtoolset3_build
- binary_linux_conda_2.7_cpu_test:
- binary_linux_manywheel_3.7m_cu100_devtoolset7_build
- binary_linux_conda_2.7_cpu_devtoolset7_test:
requires:
- setup
- binary_linux_conda_2.7_cpu_build
- binary_linux_conda_2.7_cpu_devtoolset7_build
# This binary build is currently broken, see https://github.com/pytorch/pytorch/issues/16710
# - binary_linux_conda_3.6_cu90_test:
# - binary_linux_conda_3.6_cu90_devtoolset7_test:
# requires:
# - setup
# - binary_linux_conda_3.6_cu90_build
# - binary_linux_conda_3.6_cu90_devtoolset7_build

View File

@ -19,6 +19,7 @@ endif()
if (DEFINED GLIBCXX_USE_CXX11_ABI)
if (${GLIBCXX_USE_CXX11_ABI} EQUAL 1)
set(CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=1")
endif()
endif()