forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ROCm] bazel build system and continuous integration logic
The commit contains following components to support TensorFlow on ROCm platform - bazel build system - continuous integration logic Authors: - Jack Chung: [email protected] - Jeffrey Poznanovic: [email protected] - Peng Sun: [email protected]
- Loading branch information
Showing
33 changed files
with
1,611 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# This Dockerfile provides a starting point for a ROCm installation of | ||
# MIOpen and tensorflow. | ||
FROM ubuntu:xenial | ||
MAINTAINER Jeff Poznanovic <[email protected]> | ||
|
||
ARG DEB_ROCM_REPO=http://repo.radeon.com/rocm/apt/debian/ | ||
ARG ROCM_PATH=/opt/rocm | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV TF_NEED_ROCM 1 | ||
ENV HOME /root/ | ||
RUN apt update && apt install -y wget software-properties-common | ||
|
||
# Add rocm repository | ||
RUN apt-get clean all | ||
RUN wget -qO - $DEB_ROCM_REPO/rocm.gpg.key | apt-key add - | ||
RUN sh -c "echo deb [arch=amd64] $DEB_ROCM_REPO xenial main > /etc/apt/sources.list.d/rocm.list" | ||
|
||
# Install misc pkgs | ||
RUN apt-get update --allow-insecure-repositories && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
build-essential \ | ||
clang-3.8 \ | ||
clang-format-3.8 \ | ||
clang-tidy-3.8 \ | ||
cmake \ | ||
cmake-qt-gui \ | ||
ssh \ | ||
curl \ | ||
apt-utils \ | ||
pkg-config \ | ||
g++-multilib \ | ||
git \ | ||
libunwind-dev \ | ||
libfftw3-dev \ | ||
libelf-dev \ | ||
libncurses5-dev \ | ||
libpthread-stubs0-dev \ | ||
vim \ | ||
gfortran \ | ||
libboost-program-options-dev \ | ||
libssl-dev \ | ||
libboost-dev \ | ||
libboost-system-dev \ | ||
libboost-filesystem-dev \ | ||
rpm \ | ||
libnuma-dev \ | ||
virtualenv \ | ||
python-pip \ | ||
python3-pip \ | ||
wget && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install rocm pkgs | ||
RUN apt-get update --allow-insecure-repositories && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \ | ||
rocm-dev rocm-libs rocm-utils \ | ||
rocfft miopen-hip miopengemm rocblas hipblas rocrand \ | ||
rocm-profiler cxlactivitylogger && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN cd ~ && git clone https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP.git | ||
RUN cd ~/HIP && mkdir -p build && cd build && cmake .. && make package -j && dpkg -i *.deb | ||
|
||
ENV HCC_HOME=$ROCM_PATH/hcc | ||
ENV HIP_PATH=$ROCM_PATH/hip | ||
ENV OPENCL_ROOT=$ROCM_PATH/opencl | ||
ENV PATH="$HCC_HOME/bin:$HIP_PATH/bin:${PATH}" | ||
ENV PATH="$ROCM_PATH/bin:${PATH}" | ||
ENV PATH="$OPENCL_ROOT/bin:${PATH}" | ||
|
||
# Add target file to help determine which device(s) to build for | ||
RUN echo -e "gfx803\ngfx900" >> /opt/rocm/bin/target.lst | ||
|
||
# Setup environment variables, and add those environment variables at the end of ~/.bashrc | ||
ARG HCC_HOME=/opt/rocm/hcc | ||
ARG HIP_PATH=/opt/rocm/hip | ||
ARG PATH=$HCC_HOME/bin:$HIP_PATH/bin:$PATH | ||
|
||
# Copy and run the install scripts. | ||
COPY install/*.sh /install/ | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN /install/install_bootstrap_deb_packages.sh | ||
RUN add-apt-repository -y ppa:openjdk-r/ppa && \ | ||
add-apt-repository -y ppa:george-edison55/cmake-3.x | ||
RUN /install/install_deb_packages.sh | ||
RUN /install/install_pip_packages.sh | ||
RUN /install/install_bazel.sh | ||
RUN /install/install_golang.sh | ||
|
||
# Set up the master bazelrc configuration file. | ||
COPY install/.bazelrc /etc/bazel.bazelrc | ||
|
||
# Configure the build for our CUDA configuration. | ||
ENV TF_NEED_ROCM 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.