Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5a36de61 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'update_submodules' into 'master'

Update submodules

See merge request !521
parents 20a222b9 c413fc12
No related branches found
No related tags found
1 merge request!521Update submodules
Pipeline #1123792 passed
...@@ -349,7 +349,7 @@ endif() ...@@ -349,7 +349,7 @@ endif()
# Add math library (libm), searched with MORSE module FindM.cmake # Add math library (libm), searched with MORSE module FindM.cmake
# it normally exists on all common systems provided with a C compiler # it normally exists on all common systems provided with a C compiler
find_package(M REQUIRED) find_package(M REQUIRED)
morse_export_imported_target(MORSE M m chameleon) morse_export_imported_target(MORSE::M m chameleon)
# If simulation we don't enter in kernel functions so that we don't need to link # If simulation we don't enter in kernel functions so that we don't need to link
# with concerned libraries # with concerned libraries
...@@ -366,12 +366,12 @@ if(NOT CHAMELEON_SIMULATION) ...@@ -366,12 +366,12 @@ if(NOT CHAMELEON_SIMULATION)
# CHAMELEON depends on CBLAS # CHAMELEON depends on CBLAS
#--------------------------- #---------------------------
find_package(CBLAS REQUIRED) find_package(CBLAS REQUIRED)
morse_export_imported_target(MORSE CBLAS cblas chameleon) morse_export_imported_target(MORSE::CBLAS cblas chameleon)
# CHAMELEON depends on LAPACKE # CHAMELEON depends on LAPACKE
#----------------------------- #-----------------------------
find_package(LAPACKE REQUIRED) find_package(LAPACKE REQUIRED)
morse_export_imported_target(MORSE LAPACKE lapacke chameleon) morse_export_imported_target(MORSE::LAPACKE lapacke chameleon)
# CHAMELEON depends on CUDA/CUBLAS # CHAMELEON depends on CUDA/CUBLAS
#---------------------------------- #----------------------------------
...@@ -418,8 +418,8 @@ if(NOT CHAMELEON_SIMULATION) ...@@ -418,8 +418,8 @@ if(NOT CHAMELEON_SIMULATION)
"\n CUDA_LIBRARIES to be found. Be sure you have" "\n CUDA_LIBRARIES to be found. Be sure you have"
"\n libcuda with your distribution of CUDA.") "\n libcuda with your distribution of CUDA.")
endif() endif()
morse_export_imported_target(CUDA CUDA cuda chameleon) morse_export_imported_target(CUDA::CUDA cuda chameleon)
morse_export_imported_target(CUDA CUBLAS cublas chameleon) morse_export_imported_target(CUDA::CUBLAS cublas chameleon)
endif (CUDA_FOUND) endif (CUDA_FOUND)
endif(CHAMELEON_USE_CUDA) endif(CHAMELEON_USE_CUDA)
...@@ -427,10 +427,16 @@ if(NOT CHAMELEON_SIMULATION) ...@@ -427,10 +427,16 @@ if(NOT CHAMELEON_SIMULATION)
# CHAMELEON depends on HIP/HIPBLAS # CHAMELEON depends on HIP/HIPBLAS
#---------------------------------- #----------------------------------
if (CHAMELEON_USE_HIP) if (CHAMELEON_USE_HIP)
if (CHAMELEON_USE_HIP_ROC) if (CHAMELEON_USE_HIP_ROC)
find_package(HIP REQUIRED) # should define targets: hip::host, hip::device
find_package(hipblas REQUIRED) find_package(hip REQUIRED CONFIG)
message(STATUS "hip target found")
# should define targets: roc::hipblas
find_package(hipblas REQUIRED CONFIG)
message(STATUS "hipblas target found")
elseif(CHAMELEON_USE_HIP_CUDA) elseif(CHAMELEON_USE_HIP_CUDA)
...@@ -466,56 +472,49 @@ if(NOT CHAMELEON_SIMULATION) ...@@ -466,56 +472,49 @@ if(NOT CHAMELEON_SIMULATION)
if(CHAMELEON_HIPBLAS_PATH) if(CHAMELEON_HIPBLAS_PATH)
list(APPEND HIPBLAS_INCLUDE_DIRS "${CHAMELEON_HIPBLAS_PATH}/include") list(APPEND HIPBLAS_INCLUDE_DIRS "${CHAMELEON_HIPBLAS_PATH}/include")
list(APPEND HIPBLAS_LIBRARIES "${CHAMELEON_HIPBLAS_PATH}/lib/libhipblas.so") list(APPEND HIPBLAS_LIBRARIES "${CHAMELEON_HIPBLAS_PATH}/lib/libhipblas.so")
message(STATUS "HIPBLAS_INCLUDE_DIRS: ${HIP_INCLUDE_DIRS}")
message(STATUS "HIPBLAS_LIBRARIES: ${HIPBLAS_LIBRARIES}")
else() else()
message(FATAL_ERROR "Please set CHAMELEON_HIPBLAS_PATH to your HIPBLAS installation.") message(FATAL_ERROR "Please set CHAMELEON_HIPBLAS_PATH to your HIPBLAS installation.")
endif() endif()
endif()
if (HIP_FOUND)
message("-- ${Blue}Add definition CHAMELEON_USE_HIP"
" - Activate HIP in Chameleon${ColourReset}")
# create imported target because not provided with old cmake # create imported target because not provided with old cmake
add_library(HIP::HIP INTERFACE IMPORTED) add_library(hip::hip INTERFACE IMPORTED)
add_library(HIP::HIPBLAS INTERFACE IMPORTED) add_library(roc::hipblas INTERFACE IMPORTED)
target_compile_definitions(hip::hip INTERFACE "__HIP_PLATFORM_NVIDIA__")
if (CHAMELEON_USE_HIP_CUDA) set(HIP_INCLUDE_DIRS "${HIP_INCLUDE_DIRS};${CUDA_INCLUDE_DIRS}")
target_compile_definitions(HIP::HIP INTERFACE "__HIP_PLATFORM_NVIDIA__") set(HIP_LIBRARIES "${HIP_LIBRARIES};${CUDA_LIBRARIES}")
set(HIP_INCLUDE_DIRS "${HIP_INCLUDE_DIRS};${CUDA_INCLUDE_DIRS}")
set(HIP_LIBRARIES "${HIP_LIBRARIES};${CUDA_LIBRARIES}")
endif()
if (HIP_INCLUDE_DIRS) if (HIP_INCLUDE_DIRS)
set_target_properties(HIP::HIP PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HIP_INCLUDE_DIRS}") set_target_properties(hip::hip PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HIP_INCLUDE_DIRS}")
if (HIPBLAS_INCLUDE_DIRS) if (HIPBLAS_INCLUDE_DIRS)
set_target_properties(HIP::HIPBLAS PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HIPBLAS_INCLUDE_DIRS}") set_target_properties(roc::hipblas PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HIPBLAS_INCLUDE_DIRS}")
else() else()
message(WARNING "CHAMELEON_USE_HIP requires" message(WARNING "CHAMELEON_USE_HIP_CUDA requires"
"\n HIPBLAS_INCLUDE_DIRS to be found. Be sure you have" "\n HIPBLAS_INCLUDE_DIRS to be found. Be sure you have"
"\n hipblas headers with your distribution of HIP.") "\n hipblas headers with your distribution of HIP.")
endif() endif()
else() else()
message(WARNING "CHAMELEON_USE_HIP requires" message(WARNING "CHAMELEON_USE_HIP_CUDA requires"
"\n HIP_INCLUDE_DIRS to be found. Be sure you have" "\n HIP_INCLUDE_DIRS to be found. Be sure you have"
"\n hip headers with your distribution of HIP.") "\n hip headers with your distribution of HIP.")
endif() endif()
if (HIP_LIBRARIES) if (HIP_LIBRARIES)
set_target_properties(HIP::HIP PROPERTIES INTERFACE_LINK_LIBRARIES "${HIP_LIBRARIES}") set_target_properties(hip::hip PROPERTIES INTERFACE_LINK_LIBRARIES "${HIP_LIBRARIES}")
if (HIPBLAS_LIBRARIES) if (HIPBLAS_LIBRARIES)
set_target_properties(HIP::HIPBLAS PROPERTIES INTERFACE_LINK_LIBRARIES "${HIPBLAS_LIBRARIES}") set_target_properties(roc::hipblas PROPERTIES INTERFACE_LINK_LIBRARIES "${HIPBLAS_LIBRARIES}")
target_link_libraries(HIP::HIPBLAS INTERFACE HIP::HIP) target_link_libraries(roc::hipblas INTERFACE hip::hip)
message("-- ${Blue}Add definition CHAMELEON_USE_HIPBLAS"
" - Use GPU kernels from hipblas${ColourReset}")
else() else()
message(FATAL_ERROR "CHAMELEON_USE_HIP requires" message(FATAL_ERROR "CHAMELEON_USE_HIP_CUDA requires"
"\n HIPBLAS_LIBRARIES to be found. Be sure you have" "\n HIPBLAS_LIBRARIES to be found. Be sure you have"
"\n libhipblas with your distribution of HIP.") "\n libhipblas with your distribution of HIP.")
endif() endif()
else() else()
message(FATAL_ERROR "CHAMELEON_USE_HIP requires" message(FATAL_ERROR "CHAMELEON_USE_HIP_CUDA requires"
"\n HIP_LIBRARIES to be found. Be sure you have" "\n HIP_LIBRARIES to be found. Be sure you have"
"\n libamdhip64 with your distribution of ROCm.") "\n libamdhip64 with your distribution of ROCm.")
endif() endif()
if (CHAMELEON_USE_HIP_CUDA AND NOT CUDA_LIBRARIES) if (NOT CUDA_LIBRARIES)
message(FATAL_ERROR "CHAMELEON_USE_HIP_CUDA requires" message(FATAL_ERROR "CHAMELEON_USE_HIP_CUDA requires"
"\n CUDA_LIBRARIES to be found. Be sure you have" "\n CUDA_LIBRARIES to be found. Be sure you have"
"\n libcuda with your distribution of CUDA.") "\n libcuda with your distribution of CUDA.")
...@@ -531,17 +530,13 @@ if(NOT CHAMELEON_SIMULATION) ...@@ -531,17 +530,13 @@ if(NOT CHAMELEON_SIMULATION)
message("-- HIPBLAS include path: ${HIPBLAS_INCLUDE_DIRS}") message("-- HIPBLAS include path: ${HIPBLAS_INCLUDE_DIRS}")
message("-- HIPBLAS libraries: ${HIPBLAS_LIBRARIES}") message("-- HIPBLAS libraries: ${HIPBLAS_LIBRARIES}")
morse_export_imported_target(HIP HIP hip chameleon) morse_export_imported_target(hip::hip hip chameleon)
morse_export_imported_target(HIP HIPBLAS hipblas chameleon) morse_export_imported_target(roc::hipblas hipblas chameleon)
if (CHAMELEON_USE_HIP_ROC)
morse_export_imported_target(roc hipblas rochipblas chameleon) endif()
morse_export_imported_target(hip host hiphost chameleon)
morse_export_imported_target(hip device hipdevice chameleon) message("-- ${Blue}Add definition CHAMELEON_USE_HIP"
morse_export_imported_target(hip amdhip64 hipamdhip64 chameleon) " - Activate HIP in Chameleon${ColourReset}")
endif()
else(HIP_FOUND)
message(FATAL_ERROR "CHAMELEON_USE_HIP requires HIP to be found")
endif (HIP_FOUND)
endif(CHAMELEON_USE_HIP) endif(CHAMELEON_USE_HIP)
...@@ -562,7 +557,7 @@ if(NOT CHAMELEON_SIMULATION) ...@@ -562,7 +557,7 @@ if(NOT CHAMELEON_SIMULATION)
" - Activate MPI in Chameleon${ColourReset}") " - Activate MPI in Chameleon${ColourReset}")
endif (MPI_C_FOUND) endif (MPI_C_FOUND)
morse_export_imported_target(MPI MPI_C mpi chameleon) morse_export_imported_target(MPI::MPI_C mpi chameleon)
if (CHAMELEON_SCHED STREQUAL "PARSEC") if (CHAMELEON_SCHED STREQUAL "PARSEC")
message(FATAL_ERROR "CHAMELEON does not support PARSEC with MPI." message(FATAL_ERROR "CHAMELEON does not support PARSEC with MPI."
...@@ -656,7 +651,7 @@ else (NOT CHAMELEON_SIMULATION) ...@@ -656,7 +651,7 @@ else (NOT CHAMELEON_SIMULATION)
" - Activate MPI in Chameleon${ColourReset}") " - Activate MPI in Chameleon${ColourReset}")
endif (MPI_C_FOUND) endif (MPI_C_FOUND)
morse_export_imported_target(MPI MPI_C mpi chameleon) morse_export_imported_target(MPI::MPI_C mpi chameleon)
endif (CHAMELEON_USE_MPI) endif (CHAMELEON_USE_MPI)
...@@ -791,7 +786,7 @@ endif() ...@@ -791,7 +786,7 @@ endif()
# Threads::Threads may be a dependency of BLAS/LAPACK and CUDA # Threads::Threads may be a dependency of BLAS/LAPACK and CUDA
# the target may be required for cmake users linking with CHAMELEONconfig.cmake # the target may be required for cmake users linking with CHAMELEONconfig.cmake
if (TARGET Threads::Threads) if (TARGET Threads::Threads)
morse_export_imported_target(Threads Threads threads chameleon) morse_export_imported_target(Threads::Threads threads chameleon)
endif() endif()
# see https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html # see https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html
...@@ -801,10 +796,20 @@ set(BIN_INSTALL_DIR "bin/" CACHE STRING "where to install executables relative t ...@@ -801,10 +796,20 @@ set(BIN_INSTALL_DIR "bin/" CACHE STRING "where to install executables relative t
set(INC_INSTALL_DIR "include/" CACHE STRING "where to install headers relative to prefix" ) set(INC_INSTALL_DIR "include/" CACHE STRING "where to install headers relative to prefix" )
set(LIB_INSTALL_DIR "lib/" CACHE STRING "where to install libraries relative to prefix" ) set(LIB_INSTALL_DIR "lib/" CACHE STRING "where to install libraries relative to prefix" )
set(PREFIX_PATH "")
if (CMAKE_PREFIX_PATH)
list(APPEND PREFIX_PATH ${CMAKE_PREFIX_PATH})
endif()
if (DEFINED ENV{CMAKE_PREFIX_PATH})
set(ENV_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
string(REGEX REPLACE ":" ";" ENV_PREFIX_PATH "${ENV_PREFIX_PATH}" )
list(APPEND PREFIX_PATH ${ENV_PREFIX_PATH})
endif()
configure_package_config_file(cmake_modules/CHAMELEONConfig.cmake.in configure_package_config_file(cmake_modules/CHAMELEONConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CHAMELEONConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/CHAMELEONConfig.cmake
INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/chameleon INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/chameleon
PATH_VARS BIN_INSTALL_DIR INC_INSTALL_DIR LIB_INSTALL_DIR) PATH_VARS BIN_INSTALL_DIR INC_INSTALL_DIR LIB_INSTALL_DIR PREFIX_PATH)
write_basic_package_version_file(CHAMELEONConfigVersion.cmake write_basic_package_version_file(CHAMELEONConfigVersion.cmake
VERSION ${CHAMELEON_VERSION} VERSION ${CHAMELEON_VERSION}
COMPATIBILITY AnyNewerVersion) COMPATIBILITY AnyNewerVersion)
......
...@@ -9,6 +9,9 @@ set_and_check(CHAMELEON_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@") ...@@ -9,6 +9,9 @@ set_and_check(CHAMELEON_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
check_required_components(CHAMELEON) check_required_components(CHAMELEON)
# propagate the CMAKE_PREFIX_PATH informations used during chameleon installation to give paths to dependencies
list(APPEND CMAKE_PREFIX_PATH "@PACKAGE_PREFIX_PATH@")
# dependencies of CHAMELEON # dependencies of CHAMELEON
include("${CMAKE_CURRENT_LIST_DIR}/mTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/mTargets.cmake")
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/threadsTargets.cmake") if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/threadsTargets.cmake")
...@@ -38,13 +41,13 @@ if (@CHAMELEON_USE_CUDA@ AND NOT @CHAMELEON_SIMULATION@) ...@@ -38,13 +41,13 @@ if (@CHAMELEON_USE_CUDA@ AND NOT @CHAMELEON_SIMULATION@)
include("${CMAKE_CURRENT_LIST_DIR}/cublasTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/cublasTargets.cmake")
endif() endif()
if (@CHAMELEON_USE_HIP@ AND NOT @CHAMELEON_SIMULATION@) if (@CHAMELEON_USE_HIP@ AND NOT @CHAMELEON_SIMULATION@)
include("${CMAKE_CURRENT_LIST_DIR}/hipTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/hipblasTargets.cmake")
if (@CHAMELEON_USE_HIP_ROC@) if (@CHAMELEON_USE_HIP_ROC@)
include("${CMAKE_CURRENT_LIST_DIR}/rochipblasTargets.cmake") include(CMakeFindDependencyMacro)
include("${CMAKE_CURRENT_LIST_DIR}/hiphostTargets.cmake") find_dependency(hip REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/hipdeviceTargets.cmake") find_dependency(hipblas REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/hipamdhip64Targets.cmake") else ()
include("${CMAKE_CURRENT_LIST_DIR}/hipTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/hipblasTargets.cmake")
endif() endif()
endif() endif()
......
Subproject commit c265c55769a590190c18664c034d68d446036a13 Subproject commit bc34cfd2ce19d525e2e6a82b7ec6c8bca45e2c97
...@@ -375,7 +375,7 @@ endif() ...@@ -375,7 +375,7 @@ endif()
if (CHAMELEON_USE_HIP) if (CHAMELEON_USE_HIP)
if (NOT CHAMELEON_SIMULATION) if (NOT CHAMELEON_SIMULATION)
target_link_libraries(chameleon PUBLIC gpuhipblas) target_link_libraries(chameleon PUBLIC gpuhipblas)
target_link_libraries(chameleon PUBLIC HIP::HIPBLAS) target_link_libraries(chameleon PUBLIC roc::hipblas)
endif() endif()
endif() endif()
target_link_libraries(chameleon PUBLIC MORSE::M) target_link_libraries(chameleon PUBLIC MORSE::M)
......
...@@ -71,7 +71,7 @@ target_include_directories(gpuhipblas PUBLIC ...@@ -71,7 +71,7 @@ target_include_directories(gpuhipblas PUBLIC
set_property(TARGET gpuhipblas PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") set_property(TARGET gpuhipblas PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
target_link_libraries(gpuhipblas PRIVATE coreblas) target_link_libraries(gpuhipblas PRIVATE coreblas)
target_link_libraries(gpuhipblas PUBLIC HIP::HIPBLAS) target_link_libraries(gpuhipblas PUBLIC roc::hipblas)
target_link_libraries(gpuhipblas PUBLIC MORSE::M) target_link_libraries(gpuhipblas PUBLIC MORSE::M)
# export target coreblas # export target coreblas
......
Subproject commit 0f85e4debd59f3b4ddac3551d3aa4be74257bb8e Subproject commit a8dc699dbbae1e37fdc6eba4e2bc3097ec93ae63
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
find_package(OpenMP REQUIRED) find_package(OpenMP REQUIRED)
morse_export_imported_target(OpenMP OpenMP_C openmp chameleon) morse_export_imported_target(OpenMP::OpenMP_C openmp chameleon)
if ( OPENMP_FOUND ) if ( OPENMP_FOUND )
message("-- ${Blue}Add definition CHAMELEON_SCHED_OPENMP" message("-- ${Blue}Add definition CHAMELEON_SCHED_OPENMP"
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
find_package( PARSEC REQUIRED ) find_package( PARSEC REQUIRED )
morse_export_imported_target(MORSE PARSEC parsec chameleon) morse_export_imported_target(MORSE::PARSEC parsec chameleon)
if(PARSEC_FOUND) if(PARSEC_FOUND)
message("-- ${Blue}Add definition CHAMELEON_SCHED_PARSEC" message("-- ${Blue}Add definition CHAMELEON_SCHED_PARSEC"
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
find_package( QUARK REQUIRED COMPONENTS HWLOC ) find_package( QUARK REQUIRED COMPONENTS HWLOC )
morse_export_imported_target(MORSE QUARK quark chameleon) morse_export_imported_target(MORSE::QUARK quark chameleon)
# Add definition and include_dir if found # Add definition and include_dir if found
if(QUARK_FOUND) if(QUARK_FOUND)
......
...@@ -50,7 +50,7 @@ if (_DEFS) ...@@ -50,7 +50,7 @@ if (_DEFS)
endif() endif()
# ------------------------------------------------------------- # -------------------------------------------------------------
morse_export_imported_target(MORSE STARPU starpu chameleon) morse_export_imported_target(MORSE::STARPU starpu chameleon)
# check available functions # check available functions
# note: recall STARPU_VERSION provides the version # note: recall STARPU_VERSION provides the version
...@@ -405,7 +405,7 @@ if (NOT CHAMELEON_SIMULATION) ...@@ -405,7 +405,7 @@ if (NOT CHAMELEON_SIMULATION)
target_link_libraries(chameleon_starpu PUBLIC CUDA::CUBLAS) target_link_libraries(chameleon_starpu PUBLIC CUDA::CUBLAS)
endif() endif()
if (CHAMELEON_USE_HIP) if (CHAMELEON_USE_HIP)
target_link_libraries(chameleon_starpu PUBLIC HIP::HIPBLAS) target_link_libraries(chameleon_starpu PUBLIC roc::hipblas)
endif() endif()
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment