Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent Knox committed May 2, 2017
2 parents e4cb0a5 + fe767b4 commit 846164c
Show file tree
Hide file tree
Showing 37 changed files with 5,598 additions and 4,807 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ option( BUILD_WITH_TENSILE "Building rocBLAS with Tensile or not" ON)
# which benchmark solution schedule
set( Tensile_ROOT "" CACHE STRING "Local path of Tensile.")
if ( BUILD_WITH_TENSILE )
set( Tensile_LOGIC "FijiROCm14" CACHE STRING "Tensile to use which logic?")
set( Tensile_LOGIC "FijiROCm15" CACHE STRING "Tensile to use which logic?")
set_property( CACHE Tensile_LOGIC PROPERTY STRINGS
FijiROCm14
FijiROCm15
)
option( Tensile_MERGE_FILES "Tensile to merge kernels and solutions files?" OFF)
option( Tensile_SHORT_FILENAMES "Tensile to use short file names? Use if compiler complains they're too long." OFF)
Expand Down Expand Up @@ -149,6 +149,7 @@ if( BUILD_LIBRARY )
-DCMAKE_MODULE_PATH=${LIBRARY_MODULE_PATH}
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_CXX_COMPILER=${DEVICE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DBUILD_WITH_TENSILE=${BUILD_WITH_TENSILE}
-DTensile_LOGIC=${Tensile_LOGIC}
Expand All @@ -157,6 +158,11 @@ if( BUILD_LIBRARY )
-DTensile_PRINT_DEBUG=${Tensile_PRINT_DEBUG}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
)

if( DEFINED CPACK_PACKAGING_INSTALL_PREFIX )
list( APPEND LIBRARY_CMAKE_ARGS -DCPACK_PACKAGING_INSTALL_PREFIX=${CPACK_PACKAGING_INSTALL_PREFIX} )
endif()

if (Tensile_FOUND)
set( LIBRARY_CMAKE_ARGS ${LIBRARY_CMAKE_ARGS} -DTensile_FOUND=${Tensile_FOUND})
else()
Expand Down Expand Up @@ -195,6 +201,7 @@ if( BUILD_CLIENTS )
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DDEVICE_CXX_COMPILER=${DEVICE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_PREFIX_PATH=${CLIENT_PREFIX_PATH}
-DCMAKE_MODULE_PATH=${CLIENT_MODULE_PATH}
-DBUILD_CLIENTS_SAMPLES=${BUILD_CLIENTS_SAMPLES}
Expand Down
47 changes: 18 additions & 29 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ properties([buildDiscarder(logRotator(
artifactNumToKeepStr: '',
daysToKeepStr: '',
numToKeepStr: '10')),
disableConcurrentBuilds()])
disableConcurrentBuilds(),
[$class: 'CopyArtifactPermissionProperty', projectNames: '*']
])

def build_type="Debug"
def build_type_postfix="-d"
// def build_type="Debug"
// def build_type_postfix="-d"
def build_type="Release"
def build_type_postfix=""

// Currently, YADP (yet-another-docker-plugin v0.1.0-rc30) does not load balance between clouds with the same label
// They recommend to use docker swarm, but not yet work with docker 1.12 'swarm mode'
// Manually load balance by picking a particular machine
node('rocm-1.3 && hawaii')
node('rocm-1.5 && fiji')
{
def node_list = env.NODE_LABELS.tokenize()
// sh "echo node_list: ${node_list}"
Expand Down Expand Up @@ -67,40 +71,25 @@ node('rocm-1.3 && hawaii')
stage("configure clang release") {
sh """#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install python-yaml
cmake -DCMAKE_BUILD_TYPE=${build_type} -DCMAKE_PREFIX_PATH=/opt/boost/clang -DBUILD_LIBRARY=ON -DBUILD_WITH_TENSILE=ON \
-DBUILD_CLIENTS=ON -DBUILD_CLIENTS_SAMPLES=ON -DBUILD_CLIENTS_TESTS=ON ${scm_dir}
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y rpm
cmake -DCMAKE_BUILD_TYPE=${build_type} -DCMAKE_PREFIX_PATH=/opt/boost/clang-3.8 -DBUILD_SHARED_LIBS=ON -DBUILD_LIBRARY=ON -DBUILD_WITH_TENSILE=ON \
-DBUILD_CLIENTS=ON -DBUILD_CLIENTS_SAMPLES=ON -DBUILD_CLIENTS_TESTS=ON -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/rocblas ${scm_dir}
"""
}

stage("Build")
{
if (env.NODE_LABELS ==~ /.*fiji.*/)
{
sh 'echo Target Fiji ISA'
withEnv(['HCC_AMDGPU_TARGET=AMD:AMDGPU:8:0:3'])
{
sh '''#!/usr/bin/env bash
make -j 8
'''
}
}
else if (env.NODE_LABELS ==~ /.*hawaii.*/)
{
sh 'echo Target Hawaii ISA'
withEnv(['HCC_AMDGPU_TARGET=AMD:AMDGPU:7:0:1'])
{
sh '''#!/usr/bin/env bash
make -j 8
'''
}
}
sh '''#!/usr/bin/env bash
make -j $(nproc)
'''
}

stage("Package Debian") {
sh 'cd library-build; make package'
archive includes: 'library-build/*.deb'
}
archiveArtifacts artifacts: 'library-build/*.deb', fingerprint: true
archiveArtifacts artifacts: 'library-build/*.rpm', fingerprint: true
sh "sudo dpkg -c library-build/*.deb"
}

// Cap the maximum amount of testing to be a few hours; assume failure if the time limit is hit
timeout(time: 1, unit: 'HOURS')
Expand Down
12 changes: 6 additions & 6 deletions clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ set( rocblas_clients_dependencies )

# If the user does not explicitely specify BOOST_ROOT, build our
# own on the fly
#if( BUILD_CLIENTS_BENCHMARKS )
# if( NOT DEFINED BOOST_ROOT )
# include( external-boost )
# list( APPEND rocblas_clients_dependencies boost )
# endif( )
#endif()
if( BUILD_CLIENTS_BENCHMARKS )
if( NOT DEFINED BOOST_ROOT )
include( external-boost )
list( APPEND rocblas_clients_dependencies boost )
endif( )
endif()

if( BUILD_CLIENTS_TESTS )
if( NOT DEFINED GTEST_ROOT )
Expand Down
9 changes: 6 additions & 3 deletions clients/benchmarks/perf_script/README.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@

Instruction to run the script to collect performance data
Instruction to run the python script to collect performance data

1) copy client.exe (Windows, client on Linux) to this folder
1) copy client.exe (Windows, client on Linux) to this folder
For example, "cp ../client ./" on linux

2) "python measurePerformance.py --help" to see how to run the command line mode
For example, "python measurePerformance.py -s 64-5760:64 -f gemm -r s --transa none --transb transpose > sgemm.txt"
will collect performance of sgemm NT of square matrices [64:5760] with step 64.
All the output will be dumped into sgemm.txt

3) Open the sgemm.txt and use "grep" to fetch the performance line. You can extract the Gflop/s number from the performance line
3) Plot the figure by refactoring with plotPerformance.py provided.
"python plotPerformance.py" by default
will read step (2) output sgemm.txt and plot a performance figure in sgemm.pdf

4) You can ingore the other automatic generated .txt files and folders during the run.
Loading

0 comments on commit 846164c

Please sign in to comment.