Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a611389
Adding blis to rocblas
Jul 17, 2019
73b146a
cmake changes
Jul 18, 2019
05eab11
Setting up blis for all tests, benchmark
mahmoodw Jul 22, 2019
986e99d
fixing blis in rocblas-bench
mahmoodw Jul 23, 2019
3139f2e
format
mahmoodw Jul 23, 2019
bacc9a6
Fixing pthread docker issue
mahmoodw Jul 23, 2019
26b429d
Testing dependency changes
mahmoodw Jul 23, 2019
7bd1977
more testing
mahmoodw Jul 23, 2019
28f4646
more testing
mahmoodw Jul 23, 2019
78dd8f7
more testing
mahmoodw Jul 23, 2019
28e7c6f
sudo blis install
mahmoodw Jul 24, 2019
27b1c76
Modifying Jenkinsfile to add additional jobs and add sudo to all cent…
amdkila Jul 24, 2019
ae537c9
Removed sudo and changed permissions of sudoers file
amdkila Jul 24, 2019
a6723c1
CentOS fix for PR attempt 1
amdkila Jul 25, 2019
b6c5b24
removing almost everything from centos dockerfile, and adding video g…
amdkila Jul 25, 2019
bf3db30
Using own iamax cpu reference code
mahmoodw Jul 25, 2019
af170e4
Trying to fix threads issue in CMake file
amdkila Jul 26, 2019
6a9e22f
format
mahmoodw Jul 26, 2019
48b5c5d
Merge branch 'addBlis' of https://github.com/mahmoodw/rocBLAS into ad…
amdkila Jul 26, 2019
a994b64
adding -lpthread to cmake commands
amdkila Jul 26, 2019
3ff4ff4
Merge branch 'develop' into addBlis
mlse-lib-jenkins Jul 26, 2019
bc35bd4
aabs changed to asum...
mahmoodw Jul 26, 2019
a93cfc5
Removed attempted CMake fix
amdkila Jul 26, 2019
5fad5ff
Merge branch 'addBlis' of https://github.com/mahmoodw/rocBLAS into ad…
amdkila Jul 26, 2019
1e5fae1
force nightly test runs on Ubuntu
amdkila Jul 26, 2019
cb087a8
Re-adding previous packages from CentOS
amdkila Jul 26, 2019
edf18d7
Only nightly tests for CentOS and added libgomp package
amdkila Jul 27, 2019
7135032
added find threads to all CMakeLists files
amdkila Jul 27, 2019
428198b
Removed findThreads from deps/CMakeList.txt
amdkila Jul 27, 2019
a518dd2
add openmp dir to Cmake files
amdkila Jul 30, 2019
303f51d
got rid of text causing centos to fail in docker stage
amdkila Jul 30, 2019
c6dec01
adding unique CMake flag for CentOS
amdkila Jul 30, 2019
0dbfb75
fix conflict caused by change in line endings
amdkila Jul 31, 2019
f33d397
Merge branch 'develop' of https://github.com/RocmSoftwarePlatform/roc…
amdkila Jul 31, 2019
6242724
CentOS compiles successfully
amdkila Aug 2, 2019
c0953b2
Reverted Jenkinsfile to develop
amdkila Aug 6, 2019
4138943
Changed install script to detect zen architecture if Ubuntu 16
amdkila Aug 7, 2019
1c8675d
testing Zen architecture attempt 3
amdkila Aug 7, 2019
26e2981
Attempt 4 at checking for architecture
amdkila Aug 7, 2019
b49a586
Added Ubuntu to avoid potential conflicts with Fedora
amdkila Aug 7, 2019
ca13e66
Install script changes
amdkila Aug 8, 2019
d4c9e61
Fixing merge conflicts
amdkila Aug 19, 2019
6ac69dd
added 2 extra jobs to match develop
amdkila Aug 20, 2019
cb66adc
Added new label
amdkila Aug 21, 2019
84615db
testing timing using single thread
mahmoodw Aug 22, 2019
cec7c06
Merge branch 'addBlis' of https://github.com/mahmoodw/rocBLAS into ad…
mahmoodw Aug 22, 2019
fc333d8
Jenkins partitioning hyperthreaded cores properly
mahmoodw Aug 22, 2019
44dfc8c
Removing intel labels
amdkila Aug 23, 2019
b12f45e
@hyperthread2
amdkila Aug 23, 2019
b2ce514
removing setup from gtest
Aug 23, 2019
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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "extern/blis"]
path = extern/blis
url = https://github.com/amd/blis.git
branch = 1.3
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env groovy
// This shared library is available at https://github.com/ROCmSoftwarePlatform/rocJENKINS/
@Library('rocJenkins') _
@Library('rocJenkins@hyperthread2') _

// This is file for internal AMD use.
// If you are interested in running your own Jenkins, please raise a github issue for assistance.
Expand Down Expand Up @@ -90,7 +90,7 @@ rocBLASCI:
LD_LIBRARY_PATH=/opt/rocm/hcc/lib ./example-sscal
LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG sudo ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=*quick*:*pre_checkin*-*known_bug* #--gtest_filter=*checkin*
"""

platform.runCommand(this, command)
junit "${project.paths.project_build_prefix}/build/release/clients/staging/*.xml"
}
Expand Down
1 change: 0 additions & 1 deletion clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)


list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )

include( build-options )
Expand Down
26 changes: 16 additions & 10 deletions clients/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ endif( )
set( rocblas_benchmark_common
../common/utility.cpp
../common/cblas_interface.cpp
../common/blis_interface.cpp
../common/rocblas_parse_data.cpp
)

add_executable( rocblas-bench client.cpp ${rocblas_benchmark_common} )
target_compile_features( rocblas-bench PRIVATE cxx_static_assert cxx_nullptr cxx_auto_type )
target_compile_features( rocblas-bench PRIVATE cxx_static_assert cxx_nullptr cxx_auto_type)

if( BUILD_WITH_TENSILE )
target_compile_definitions( rocblas-bench PRIVATE BUILD_WITH_TENSILE=1 )
Expand All @@ -57,23 +58,27 @@ target_include_directories( rocblas-bench
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
)

set( BLIS_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/build/deps/blis/include/blis )
set( BLIS_LIBRARY ${CMAKE_SOURCE_DIR}/build/deps/blis/lib/libblis.so )

if( EXISTS /etc/redhat-release)
set( OPENMP_INCLUDE_DIR /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/include )
set( OPENMP_LIBRARY /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libgomp.so )
set( CLANG_INCLUDE_DIR /opt/rocm/hcc/lib/clang/9.0.0/include )
set( CLANG_INCLUDE_DIR /opt/rocm/hcc/lib/clang/9.0.0/include )

# External header includes included as system files
target_include_directories( rocblas-bench
SYSTEM PRIVATE
$<BUILD_INTERFACE:${CLANG_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CLANG_INCLUDE_DIR}>
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}>
$<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${HCC_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CBLAS_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${OPENMP_INCLUDE_DIR}>
)
$<BUILD_INTERFACE:${OPENMP_INCLUDE_DIR}>
)

target_link_libraries( rocblas-bench PRIVATE ${Boost_LIBRARIES} ${OPENMP_LIBRARY} cblas lapack roc::rocblas )
target_link_libraries( rocblas-bench PRIVATE ${Boost_LIBRARIES} ${BLIS_LIBRARY} ${OPENMP_LIBRARY} cblas lapack roc::rocblas )
else()
# External header includes included as system files
target_include_directories( rocblas-bench
Expand All @@ -82,9 +87,10 @@ else()
$<BUILD_INTERFACE:${HCC_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CBLAS_INCLUDE_DIRS}>
)

target_link_libraries( rocblas-bench PRIVATE ${Boost_LIBRARIES} cblas lapack roc::rocblas )
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}>
)

target_link_libraries( rocblas-bench PRIVATE ${Boost_LIBRARIES} ${BLIS_LIBRARY} cblas lapack roc::rocblas )
endif()

get_target_property( HIPHCC_LOCATION hip::hip_hcc IMPORTED_LOCATION_RELEASE )
Expand Down
9 changes: 9 additions & 0 deletions clients/common/blis_interface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "blis.h"
#include "omp.h"

void setup_blis()
{
bli_init();
}
Comment thread
mahmoodw marked this conversation as resolved.

static int initialize_blis = (setup_blis(), 0);
25 changes: 21 additions & 4 deletions clients/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ set(rocblas_test_source
set( rocblas_benchmark_common
../common/utility.cpp
../common/cblas_interface.cpp
../common/blis_interface.cpp
../common/rocblas_parse_data.cpp
)

Expand All @@ -83,6 +84,20 @@ target_include_directories( rocblas-test
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
)

# External header includes included as system files
target_include_directories( rocblas-test
SYSTEM PRIVATE
$<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${HCC_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CBLAS_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}>
)

set( BLIS_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/build/deps/blis/include/blis )
set( BLIS_LIBRARY ${CMAKE_SOURCE_DIR}/build/deps/blis/lib/libblis.so )

if( EXISTS /etc/redhat-release)
set( OPENMP_INCLUDE_DIR /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/include )
set( OPENMP_LIBRARY /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libgomp.so )
Expand All @@ -92,6 +107,7 @@ if( EXISTS /etc/redhat-release)
target_include_directories( rocblas-test
SYSTEM PRIVATE
$<BUILD_INTERFACE:${CLANG_INCLUDE_DIR}>
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}>
$<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${HCC_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
Expand All @@ -100,7 +116,7 @@ if( EXISTS /etc/redhat-release)
$<BUILD_INTERFACE:${OPENMP_INCLUDE_DIR}>
)

target_link_libraries( rocblas-test PRIVATE ${GTEST_LIBRARIES} ${Boost_LIBRARIES} ${OPENMP_LIBRARY} cblas lapack roc::rocblas )
target_link_libraries( rocblas-test PRIVATE ${GTEST_LIBRARIES} ${Boost_LIBRARIES} ${BLIS_LIBRARY} ${OPENMP_LIBRARY} cblas lapack roc::rocblas )
else()
# External header includes included as system files
target_include_directories( rocblas-test
Expand All @@ -110,9 +126,10 @@ else()
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CBLAS_INCLUDE_DIRS}>
)

target_link_libraries( rocblas-test PRIVATE ${GTEST_LIBRARIES} ${Boost_LIBRARIES} cblas lapack roc::rocblas Threads::Threads )
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}>
)

target_link_libraries( rocblas-test PRIVATE ${GTEST_LIBRARIES} ${Boost_LIBRARIES} ${BLIS_LIBRARY} cblas lapack roc::rocblas )
endif()

get_target_property( HIPHCC_LOCATION hip::hip_hcc IMPORTED_LOCATION_RELEASE )
Expand Down
34 changes: 33 additions & 1 deletion clients/include/testing_iamax_iamin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,17 @@ namespace rocblas_cblas
return half_to_float(x) < half_to_float(y);
}

template <typename T>
bool greatherthan(T x, T y)
{
return x > y;
}

bool greatherthan(rocblas_half x, rocblas_half y)
{
return half_to_float(x) > half_to_float(y);
}

template <typename T>
void cblas_iamin(rocblas_int N, const T* X, rocblas_int incx, rocblas_int* result)
{
Expand All @@ -222,12 +233,33 @@ namespace rocblas_cblas
*result = minpos;
}

template <typename T>
void cblas_iamax(rocblas_int N, const T* X, rocblas_int incx, rocblas_int* result)
{
rocblas_int maxpos = -1;
if(N > 0 && incx > 0)
{
auto max = asum(X[0]);
maxpos = 0;
for(size_t i = 1; i < N; ++i)
{
auto a = asum(X[i * incx]);
if(greatherthan(a, max))
{
max = a;
maxpos = i;
}
}
}
*result = maxpos;
}

} // namespace rocblas_cblas

template <typename T>
void testing_iamax(const Arguments& arg)
{
testing_iamax_iamin<T, rocblas_iamax<T>, cblas_iamax<T>>(arg);
testing_iamax_iamin<T, rocblas_iamax<T>, rocblas_cblas::cblas_iamax<T>>(arg);
}

template <typename T>
Expand Down
9 changes: 4 additions & 5 deletions docker/dockerfile-build-centos
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,18 @@ RUN yum install -y \
llvm7.0-static \
libcxx-devel \
boost-devel \
zlib-devel \
libgomp \
numactl-libs \
rpm-build \
libgomp \
zlib-devel \
deltarpm

RUN echo '#!/bin/bash' | tee /etc/profile.d/devtoolset7.sh && echo \
'source scl_source enable devtoolset-7' >>/etc/profile.d/devtoolset7.sh

RUN pip3 install wheel && pip3 install tox pyyaml

# docker pipeline runs containers with particular uid
# create a jenkins user with this specific uid so it can use sudo priviledges

# 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 video --shell /bin/bash jenkins && \
echo '%video ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd && \
Expand Down
12 changes: 9 additions & 3 deletions docker/dockerfile-build-ubuntu-rock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
python3 \
python-yaml \
python3-yaml \
python3-dev \
python3-pip \
python3-pytest \
python3-setuptools \
gfortran \
llvm-6.0-dev \
libboost-program-options-dev \
Expand All @@ -38,12 +42,14 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip3 install wheel && pip3 install tox pyyaml

# 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
RUN useradd --create-home -u ${user_uid} -o -G video --shell /bin/bash jenkins && \
echo '%video ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd && \
chmod 400 /etc/sudoers.d/sudo-nopasswd

ARG ROCBLAS_SRC_ROOT=/usr/local/src/rocBLAS

Expand Down
1 change: 1 addition & 0 deletions extern/blis
Submodule blis added at cdbf16
17 changes: 16 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,21 @@ if [[ "${install_dependencies}" == true ]]; then
make -j$(nproc)
elevate_if_not_root make install
popd

fi

if [[ ! -f "${build_dir}/deps/blis/lib/libblis.a" ]]; then
git submodule update --init
cd extern/blis
if [[ -e "/etc/redhat-release" ]]; then
echo 'CentOS detected'
./configure --prefix=../../${build_dir}/deps/blis --enable-threading=openmp auto
else
echo 'Ubuntu detected'
./configure --prefix=../../${build_dir}/deps/blis --enable-threading=openmp CC=/opt/rocm/hcc/bin/clang auto
fi
make install
cd ../..
fi

# We append customary rocm path; if user provides custom rocm path in ${path}, our
Expand All @@ -339,8 +354,8 @@ pushd .
# #################################################
cmake_common_options=""
cmake_client_options=""
cmake_common_options="${cmake_common_options} -lpthread -DTensile_LOGIC=${tensile_logic} -DTensile_CODE_OBJECT_VERSION=${tensile_cov}"

cmake_common_options="${cmake_common_options} -lpthread -DTensile_LOGIC=${tensile_logic} -DTensile_CODE_OBJECT_VERSION=${tensile_cov}"

# build type
if [[ "${build_release}" == true ]]; then
Expand Down