diff --git a/CMakeLists.txt b/CMakeLists.txt index 2afaa7086..508276df3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ cmake_minimum_required( VERSION 3.5 ) # We use C++14 features, this will add compile option: -std=c++14 set( CMAKE_CXX_STANDARD 14 ) +# Without this line, it will add -std=gnu++14 instead, which has some issues. +set( CMAKE_CXX_EXTENSIONS OFF ) # Consider removing this in the future # This should appear before the project command, because it does not use FORCE diff --git a/docker/dockerfile-build-centos b/docker/dockerfile-build-centos index 078050f70..12a721d91 100644 --- a/docker/dockerfile-build-centos +++ b/docker/dockerfile-build-centos @@ -10,6 +10,7 @@ ARG user_uid RUN yum install -y \ sudo \ rock-dkms \ + rocm_smi64 \ centos-release-scl \ devtoolset-7 \ ca-certificates \ diff --git a/docker/dockerfile-build-ubuntu b/docker/dockerfile-build-ubuntu index c98e7e121..f7b60d4e0 100644 --- a/docker/dockerfile-build-ubuntu +++ b/docker/dockerfile-build-ubuntu @@ -15,6 +15,8 @@ ARG user_uid # * libhsakmt.so: libnuma1 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ sudo \ + rock-dkms \ + rocm_smi64 \ ca-certificates \ git \ make \ diff --git a/docker/dockerfile-build-ubuntu-rock b/docker/dockerfile-build-ubuntu-rock index e2502d7c4..406bcfb13 100644 --- a/docker/dockerfile-build-ubuntu-rock +++ b/docker/dockerfile-build-ubuntu-rock @@ -16,6 +16,7 @@ ARG user_uid RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ rock-dkms \ sudo \ + rocm_smi64 \ ca-certificates \ git \ make \ diff --git a/install.sh b/install.sh index c50ebcce7..87fc1a4a6 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Author: Kent Knox -#set -x #echo on +set -x #echo on # ################################################# # helper functions @@ -119,9 +119,19 @@ install_packages( ) fi # dependencies needed for rocblas and clients to build - local library_dependencies_ubuntu=( "make" "cmake-curses-gui" "python2.7" "python3" "python-yaml" "python3-yaml" "hip_hcc" "pkg-config" ) - local library_dependencies_centos=( "epel-release" "make" "cmake3" "python34" "PyYAML" "python3*-PyYAML" "hip_hcc" "gcc-c++" "rpm-build" ) - local library_dependencies_fedora=( "make" "cmake" "python34" "PyYAML" "python3*-PyYAML" "hip_hcc" "gcc-c++" "libcxx-devel" "rpm-build" ) + local library_dependencies_ubuntu=( "make" "cmake-curses-gui" "pkg-config" + "python2.7" "python3" "python-yaml" "python3-yaml" + "llvm-6.0-dev" + "hip_hcc" "rocm_smi64" ) + local library_dependencies_centos=( "epel-release" + "make" "cmake3" "rpm-build" + "python34" "PyYAML" "python3*-PyYAML" + "gcc-c++" "llvm7.0-devel" "llvm7.0-static" + "hip_hcc" "rocm_smi64" ) + local library_dependencies_fedora=( "make" "cmake" "rpm-build" + "python34" "PyYAML" "python3*-PyYAML" + "gcc-c++" "libcxx-devel" + "hip_hcc" "rocm_smi64" ) if [[ "${build_cuda}" == true ]]; then # Ideally, this could be cuda-cublas-dev, but the package name has a version number in it @@ -331,6 +341,7 @@ pushd . cmake_client_options="" cmake_common_options="${cmake_common_options} -DTensile_LOGIC=${tensile_logic} -DTensile_CODE_OBJECT_VERSION=${tensile_cov}" + # build type if [[ "${build_release}" == true ]]; then mkdir -p ${build_dir}/release/clients && cd ${build_dir}/release @@ -352,6 +363,13 @@ pushd . cmake_common_options="${cmake_common_options} -DTensile_TEST_LOCAL_PATH=${tensile_test_local_path}" fi + +case "${ID}" in + centos|rhel) + cmake_common_options="${cmake_common_options} -DCMAKE_FIND_ROOT_PATH=/usr/lib64/llvm7.0/lib/cmake/" + ;; +esac + # clients if [[ "${build_clients}" == true ]]; then cmake_client_options="${cmake_client_options} -DBUILD_CLIENTS_SAMPLES=ON -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_BENCHMARKS=ON" diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt index e9f48c91b..f692bd56f 100755 --- a/library/src/CMakeLists.txt +++ b/library/src/CMakeLists.txt @@ -34,7 +34,10 @@ if( BUILD_WITH_TENSILE ) endif( ) # HACK: We include the config file directly because find_package(Tensile) is broken - include( ${Tensile_TensileConfig} ) + #include( ${Tensile_TensileConfig} ) + execute_process(COMMAND "${VIRTUALENV_HOME_DIR}/bin/TensileGetPath" OUTPUT_VARIABLE INSTALLED_TENSILE_PATH) + message(STATUS "TENSILE_PATH: ${INSTALLED_TENSILE_PATH}") + find_package(Tensile 4.11.0 EXACT REQUIRED HIP LLVM OpenMP PATHS "${INSTALLED_TENSILE_PATH}") set( Tensile_RUNTIME_LANGUAGE "HIP" ) message( STATUS "AMDGPU_TARGETS=${AMDGPU_TARGETS}" )