Skip to content

Follow the white rabbit -- no AWS custom packages any longer. #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 5 additions & 48 deletions docker/caffe2/jenkins/common/install_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ install_ubuntu() {
apt-get install -y wget
apt-get install -y libopenblas-dev

DEB_ROCM_REPO=http://repo.radeon.com/rocm/apt/debian
DEB_ROCM_REPO=http://repo.radeon.com/rocm/misc/facebook/apt/.apt_1.9.white_rabbit/debian
# Add rocm repository
wget -qO - $DEB_ROCM_REPO/rocm.gpg.key | apt-key add -
echo "deb [arch=amd64] $DEB_ROCM_REPO xenial main" > /etc/apt/sources.list.d/rocm.list
Expand All @@ -22,15 +22,11 @@ install_ubuntu() {
miopengemm \
rocblas \
rocm-profiler \
cxlactivitylogger
cxlactivitylogger \
rocsparse \
hipsparse \
rocrand

# hotfix a bug in hip's cmake files, this has been fixed in
# https://github.com/ROCm-Developer-Tools/HIP/pull/516 but for
# some reason it has not included in the latest rocm release
if [[ -f /opt/rocm/hip/cmake/FindHIP.cmake ]]; then
sudo sed -i 's/\ -I${dir}/\ $<$<BOOL:${dir}>:-I${dir}>/' /opt/rocm/hip/cmake/FindHIP.cmake
fi

# HIP has a bug that drops DEBUG symbols in generated MakeFiles.
# https://github.com/ROCm-Developer-Tools/HIP/pull/588
if [[ -f /opt/rocm/hip/cmake/FindHIP.cmake ]]; then
Expand All @@ -50,42 +46,6 @@ install_hip_thrust() {
git clone --recursive https://github.com/ROCmSoftwarePlatform/cub-hip.git /data/Thrust/thrust/system/cuda/detail/cub-hip
}

# Install an updated version of rocRand that's PyTorch compatible.
install_rocrand() {
mkdir -p /opt/rocm/debians
curl https://s3.amazonaws.com/ossci-linux/rocrand-1.8.0-Linux.deb -o /opt/rocm/debians/rocrand.deb
dpkg -i /opt/rocm/debians/rocrand.deb
}

# Install rocSPARSE/hipSPARSE that will be released soon - can co-exist w/ hcSPARSE which will be removed soon
install_hipsparse() {
mkdir -p /opt/rocm/debians
curl https://s3.amazonaws.com/ossci-linux/rocsparse-0.1.2.114-Linux.deb -o /opt/rocm/debians/rocsparse.deb
curl https://s3.amazonaws.com/ossci-linux/hipsparse-0.1.2.55-Linux.deb -o /opt/rocm/debians/hipsparse.deb
dpkg -i /opt/rocm/debians/rocsparse.deb
dpkg -i /opt/rocm/debians/hipsparse.deb
}

# Install custom hcc containing two compiler fixes relevant to PyTorch
install_customhcc() {
HIP_VERSION="1.5.18354"
mkdir -p /opt/rocm/debians
curl https://s3.amazonaws.com/ossci-linux/hcc-1.2.18272-Linux.deb -o /opt/rocm/debians/hcc-Linux.deb
curl "https://s3.amazonaws.com/ossci-linux/hip_base-$HIP_VERSION.deb" -o /opt/rocm/debians/hip_base.deb
curl "https://s3.amazonaws.com/ossci-linux/hip_doc-$HIP_VERSION.deb" -o /opt/rocm/debians/hip_doc.deb
curl "https://s3.amazonaws.com/ossci-linux/hip_samples-$HIP_VERSION.deb" -o /opt/rocm/debians/hip_samples.deb
curl "https://s3.amazonaws.com/ossci-linux/hip_hcc-$HIP_VERSION.deb" -o /opt/rocm/debians/hip_hcc.deb
dpkg -i /opt/rocm/debians/hcc-Linux.deb
dpkg -i /opt/rocm/debians/hip_base.deb
dpkg -i /opt/rocm/debians/hip_doc.deb
dpkg -i /opt/rocm/debians/hip_samples.deb
dpkg -i /opt/rocm/debians/hip_hcc.deb

if [[ -f /opt/rocm/hip/cmake/FindHIP.cmake ]]; then
sudo sed -i 's/\ -I${dir}/\ $<$<BOOL:${dir}>:-I${dir}>/' /opt/rocm/hip/cmake/FindHIP.cmake
fi
}

# Install Python packages depending on the base OS
if [ -f /etc/lsb-release ]; then
install_ubuntu
Expand All @@ -97,6 +57,3 @@ else
fi

install_hip_thrust
install_rocrand
install_hipsparse
install_customhcc