Skip to content

Commit

Permalink
Merge pull request #228 from daineAMD/master
Browse files Browse the repository at this point in the history
Merge develop into master for ROCm 3.6 feature complete
  • Loading branch information
daineAMD authored Jun 3, 2020
2 parents 1f57a2f + 2594939 commit cb328a4
Show file tree
Hide file tree
Showing 224 changed files with 58,713 additions and 6,049 deletions.
86 changes: 18 additions & 68 deletions .jenkins/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,90 +13,40 @@ def runCompileCommand(platform, project, jobName)
getDependenciesCommand += auxiliary.getLibrary(libraryName, platform.jenkinsLabel, 'develop')
}
}
String centos = platform.jenkinsLabel.contains('centos') ? 'source scl_source enable devtoolset-7' : ''

if(jobName.contains('hipclang'))
{
command = """#!/usr/bin/env bash
set -x
cd ${project.paths.project_build_prefix}
${getDependenciesCommand}
${centos}
LD_LIBRARY_PATH=/opt/rocm/lib CXX=g++ ${project.paths.build_command} --hip-clang
"""
}
else
{
command = """#!/usr/bin/env bash

String compiler = jobName.contains('hipclang') ? 'hipcc' : 'hcc'
String hipClang = jobName.contains('hipclang') ? '--hip-clang' : ''
String sles = platform.jenkinsLabel.contains('sles') ? '/usr/bin/sudo --preserve-env' : ''
String centos = platform.jenkinsLabel.contains('centos') ? 'source scl_source enable devtoolset-7' : ':'

def command = """#!/usr/bin/env bash
set -x
cd ${project.paths.project_build_prefix}
${getDependenciesCommand}
${centos}
LD_LIBRARY_PATH=/opt/rocm/hcc/lib CXX=g++ ${project.paths.build_command}
${sles} LD_LIBRARY_PATH=/opt/rocm/lib ${project.paths.build_command} ${hipClang} --compiler g++
"""
}
platform.runCommand(this, command)
}

def runTestCommand (platform, project)
{
def command

if(platform.jenkinsLabel.contains('centos'))
{
command = """#!/usr/bin/env bash
set -x
cd ${project.paths.project_build_prefix}/build/release/clients/staging
LD_LIBRARY_PATH=/opt/rocm/hcc/lib sudo ./example-sscal
LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG sudo ./hipblas-test --gtest_output=xml --gtest_color=yes
"""
}
else
{
command = """#!/usr/bin/env bash
set -x
cd ${project.paths.project_build_prefix}/build/release/clients/staging
LD_LIBRARY_PATH=/opt/rocm/hcc/lib ./example-sscal
LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG ./hipblas-test --gtest_output=xml --gtest_color=yes
{
String sudo = auxiliary.sudo(platform.jenkinsLabel)
def command = """#!/usr/bin/env bash
set -x
cd ${project.paths.project_build_prefix}/build/release/clients/staging
${sudo} LD_LIBRARY_PATH=/opt/rocm/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG ./hipblas-test --gtest_output=xml --gtest_color=yes
"""
}

platform.runCommand(this, command)
junit "${project.paths.project_build_prefix}/build/release/clients/staging/*.xml"
}

def runPackageCommand(platform, project, jobName)
def runPackageCommand(platform, project)
{
def command

if(platform.jenkinsLabel.contains('centos'))
{
command = """
set -x
cd ${project.paths.project_build_prefix}/build/release
make package
rm -rf package && mkdir -p package
mv *.rpm package/
rpm -qlp package/*.rpm
"""

platform.runCommand(this, command)
platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.rpm""")
}
else
{
command = """
set -x
cd ${project.paths.project_build_prefix}/build/release
make package
rm -rf package && mkdir -p package
mv *.deb package/
dpkg -c package/*.deb
"""

platform.runCommand(this, command)
platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.deb""")
}
def packageHelper = platform.makePackage(platform.jenkinsLabel,"${project.paths.project_build_prefix}/build/release")
platform.runCommand(this, packageHelper[0])
platform.archiveArtifacts(this, packageHelper[1])
}

return this
8 changes: 4 additions & 4 deletions .jenkins/precheckin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def runCI =
{
platform, project->

commonGroovy.runPackageCommand(platform, project, jobName)
commonGroovy.runPackageCommand(platform, project)
}

buildProject(prj, formatCheck, nodes.dockerArray, compileCommand, testCommand, packageCommand)
Expand All @@ -57,9 +57,9 @@ ci: {
"rocm-docker":[]]
propertyList = auxiliary.appendPropertyList(propertyList)

def jobNameList = ["compute-rocm-dkms-no-npi":([ubuntu16:['gfx900'],centos7:['gfx906']]),
"compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900', 'gfx906']]),
"rocm-docker":([ubuntu16:['gfx900'],centos7:['gfx906']])]
def jobNameList = ["compute-rocm-dkms-no-npi":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx906']]),
"compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx906']]),
"rocm-docker":([ubuntu16:['gfx900'],ubuntu18:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx906']])]
jobNameList = auxiliary.appendJobNameList(jobNameList)

propertyList.each
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if( NOT DEFINED CMAKE_CONFIGURATION_TYPES AND NOT DEFINED CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." )
endif()

project( hipblas LANGUAGES CXX )
project( hipblas LANGUAGES CXX Fortran )

# This finds the rocm-cmake project, and installs it if not found
# rocm-cmake contains common cmake code for rocm projects to help setup and install
Expand All @@ -45,7 +45,7 @@ include( ROCMInstallTargets )
include( ROCMPackageConfigHelpers )
include( ROCMInstallSymlinks )

set ( VERSION_STRING "0.28.0" )
set ( VERSION_STRING "0.30.0" )
rocm_setup_version( VERSION ${VERSION_STRING} )

# Append our library helper cmake path and the cmake path for hip (for convenience)
Expand Down
4 changes: 2 additions & 2 deletions bump_develop_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# - run this script in master branch
# - after running this script merge master into develop

OLD_HIPBLAS_VERSION="0.28.0"
NEW_HIPBLAS_VERSION="0.29.0"
OLD_HIPBLAS_VERSION="0.30.0"
NEW_HIPBLAS_VERSION="0.31.0"

sed -i "s/${OLD_HIPBLAS_VERSION}/${NEW_HIPBLAS_VERSION}/g" CMakeLists.txt
4 changes: 2 additions & 2 deletions bump_master_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - after running this script and merging develop into master, run bump_develop_version.sh in master and
# merge master into develop

OLD_HIPBLAS_VERSION="0.27.0"
NEW_HIPBLAS_VERSION="0.28.0"
OLD_HIPBLAS_VERSION="0.29.0"
NEW_HIPBLAS_VERSION="0.30.0"

sed -i "s/${OLD_HIPBLAS_VERSION}/${NEW_HIPBLAS_VERSION}/g" CMakeLists.txt
12 changes: 11 additions & 1 deletion clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,22 @@ if( NOT DEFINED CMAKE_CONFIGURATION_TYPES AND NOT DEFINED CMAKE_BUILD_TYPE )
endif()

# This project may compile dependencies for clients
project( hipblas-clients LANGUAGES CXX )
project( hipblas-clients LANGUAGES CXX Fortran )

list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )

include( build-options )

set(hipblas_f90_source_clients
include/hipblas_fortran.f90
)

if( BUILD_CLIENTS_TESTS OR BUILD_CLIENTS_SAMPLES )
add_library(hipblas_fortran_client ${hipblas_f90_source_clients})
add_dependencies(hipblas_fortran_client hipblas_fortran)
include_directories(${CMAKE_BINARY_DIR}/include)
endif( )

if( BUILD_CLIENTS_TESTS )
add_subdirectory( gtest )
endif( )
Expand Down
Loading

0 comments on commit cb328a4

Please sign in to comment.