Skip to content

Commit

Permalink
Merge pull request #386 from bragadeesh/master
Browse files Browse the repository at this point in the history
Jenkins changes to master
  • Loading branch information
bragadeesh authored Oct 10, 2018
2 parents d0fca34 + 9d5bad9 commit 1f135e5
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 44 deletions.
120 changes: 76 additions & 44 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -487,58 +487,90 @@ def build_pipeline( compiler_data compiler_args, docker_data docker_args, projec
}

// The following launches 3 builds in parallel: hcc-ctu, hcc-1.6 and cuda
parallel hcc_ctu:
//parallel hcc_ctu:
//{
// try
// {
// node( 'docker && rocm && gfx900')
// {
// def docker_args = new docker_data(
// from_image:'compute-artifactory:5001/rocm-developer-tools/hip/master/hip-hcc-ctu-ubuntu-16.04:latest',
// build_docker_file:'dockerfile-build-ubuntu',
// install_docker_file:'dockerfile-install-ubuntu',
// docker_run_args:'--device=/dev/kfd --device=/dev/dri --group-add=video',
// docker_build_args:' --pull' )
//
// def compiler_args = new compiler_data(
// compiler_name:'hcc-ctu',
// build_config:'Release',
// compiler_path:'/opt/rocm/bin/hcc' )
//
// def rocblas_paths = new project_paths(
// project_name:'rocblas-hcc-ctu',
// src_prefix:'src',
// build_prefix:'src',
// build_command: './install.sh -c' )
//
// def print_version_closure = {
// sh """
// set -x
// /opt/rocm/bin/hcc --version
// """
// }
//
// build_pipeline( compiler_args, docker_args, rocblas_paths, print_version_closure )
// }
// }
// catch( err )
// {
// currentBuild.result = 'UNSTABLE'
// }
//},
//parallel rocm_ubuntu:
//{
// node( 'docker && rocm && gfx900')
// {
// def hcc_docker_args = new docker_data(
// from_image:'rocm/dev-ubuntu-16.04:1.7.1',
// build_docker_file:'dockerfile-build-ubuntu',
// install_docker_file:'dockerfile-install-ubuntu',
// docker_run_args:'--device=/dev/kfd --device=/dev/dri --group-add=video',
// docker_build_args:' --pull' )
//
// def hcc_compiler_args = new compiler_data(
// compiler_name:'hcc-rocm-ubuntu',
// build_config:'Release',
// compiler_path:'/opt/rocm/bin/hcc' )
//
// def rocblas_paths = new project_paths(
// project_name:'rocblas-ubuntu',
// src_prefix:'src',
// build_prefix:'src',
// build_command: './install.sh -c' )
//
// def print_version_closure = {
// sh """
// set -x
// /opt/rocm/bin/hcc --version
// """
// }
//
// build_pipeline( hcc_compiler_args, hcc_docker_args, rocblas_paths, print_version_closure )
// }
//},
parallel rocm19_ubuntu:
{
try
{
node( 'docker && rocm && gfx900')
{
def docker_args = new docker_data(
from_image:'compute-artifactory:5001/rocm-developer-tools/hip/master/hip-hcc-ctu-ubuntu-16.04:latest',
build_docker_file:'dockerfile-build-ubuntu',
install_docker_file:'dockerfile-install-ubuntu',
docker_run_args:'--device=/dev/kfd --device=/dev/dri --group-add=video',
docker_build_args:' --pull' )

def compiler_args = new compiler_data(
compiler_name:'hcc-ctu',
build_config:'Release',
compiler_path:'/opt/rocm/bin/hcc' )

def rocblas_paths = new project_paths(
project_name:'rocblas-hcc-ctu',
src_prefix:'src',
build_prefix:'src',
build_command: './install.sh -c' )

def print_version_closure = {
sh """
set -x
/opt/rocm/bin/hcc --version
"""
}

build_pipeline( compiler_args, docker_args, rocblas_paths, print_version_closure )
}
}
catch( err )
{
currentBuild.result = 'UNSTABLE'
}
},
rocm_ubuntu:
{
node( 'docker && rocm && gfx900')
node( 'docker && rocm19 && gfx900')
{
def hcc_docker_args = new docker_data(
from_image:'rocm/dev-ubuntu-16.04:1.7.1',
build_docker_file:'dockerfile-build-ubuntu',
from_image:'rocm/dev-ubuntu-16.04:1.9.0',
build_docker_file:'dockerfile-build-ubuntu-rock',
install_docker_file:'dockerfile-install-ubuntu',
docker_run_args:'--device=/dev/kfd --device=/dev/dri --group-add=video',
docker_build_args:' --pull' )

def hcc_compiler_args = new compiler_data(
compiler_name:'hcc-rocm-ubuntu',
compiler_name:'hcc-rocm19-ubuntu',
build_config:'Release',
compiler_path:'/opt/rocm/bin/hcc' )

Expand Down
50 changes: 50 additions & 0 deletions docker/dockerfile-build-ubuntu-rock
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Parameters related to building hip
ARG base_image

FROM ${base_image}
LABEL maintainer="kent.knox@amd"

ARG user_uid

# Install dependent packages
# Dependencies:
# * hcc-config.cmake: pkg-config
# * tensile: python2.7, python-yaml
# * rocblas-test: gfortran, googletest
# * rocblas-bench: libboost-program-options-dev
# * libhsakmt.so: libnuma1
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
rock-dkms \
sudo \
ca-certificates \
git \
make \
cmake \
clang-format-3.8 \
pkg-config \
python2.7 \
python-yaml \
gfortran \
libboost-program-options-dev \
libnuma1 \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# docker pipeline runs containers with particular uid
# create a jenkins user with this specific uid so it can use sudo priviledges
# Grant any member of sudo group password-less sudo privileges
RUN useradd --create-home -u ${user_uid} -o -G sudo --shell /bin/bash jenkins && \
mkdir -p /etc/sudoers.d/ && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd

ARG ROCBLAS_SRC_ROOT=/usr/local/src/rocBLAS

# Clone rocblas repo
# Build client dependencies and install into /usr/local (LAPACK & GTEST)
RUN mkdir -p ${ROCBLAS_SRC_ROOT} && cd ${ROCBLAS_SRC_ROOT} && \
git clone -b develop --depth=1 https://github.com/ROCmSoftwarePlatform/rocBLAS . && \
mkdir -p build/deps && cd build/deps && \
cmake -DBUILD_BOOST=OFF ${ROCBLAS_SRC_ROOT}/deps && \
make -j $(nproc) install && \
rm -rf ${ROCBLAS_SRC_ROOT}

0 comments on commit 1f135e5

Please sign in to comment.