Skip to content

Commit

Permalink
kokkos#7 Removed V2 and V1.
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrinel authored and meriadegp committed Mar 30, 2023
1 parent f49d41e commit 25dbdcb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 151 deletions.
79 changes: 0 additions & 79 deletions cmake/Modules/FindTPLROCBLAS.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# MPL: v3
# MPL: 12/29/2022: CMake regular way to find a package
FIND_PACKAGE(ROCBLAS)
if(TARGET roc::rocblas)
Expand All @@ -12,81 +11,3 @@ if(TARGET roc::rocblas)
ELSE()
MESSAGE(FATAL_ERROR "Package ROCBLAS requested but not found")
ENDIF()

## MPL: v2
## MPL: 12/26/2022: This bloc is not necessary anymore since ROCBLAS installation provide a cmake config file.
## Should we verify for different version of ROCBLAS ?
## GOAL: The code is commented for now and we aim to remove it
#IF (ROCBLAS_LIBRARY_DIRS AND ROCBLAS_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCBLAS INTERFACE LIBRARIES ${ROCBLAS_LIBRARIES} LIBRARY_PATHS ${ROCBLAS_LIBRARY_DIRS})
#ELSEIF (ROCBLAS_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCBLAS INTERFACE LIBRARIES ${ROCBLAS_LIBRARIES})
#ELSEIF (ROCBLAS_LIBRARY_DIRS)
#ELSE()
# # MPL: 12/26/2022: USE FIND_PACKAGE and check if the requested target is the more modern way to do it
# # MPL: 12/28/2022 : This logical bloc is based on the logical bloc coming from FindTPLCUBLAS. But instead of
# # expecting a ROCBLAS_FOUND variable to be set. We expect the TARGET roc::rocblas to be defined (more modern)
# FIND_PACKAGE(ROCBLAS)
# if(NOT TARGET roc::rocblas)
# MESSAGE( "TARGET roc::rocblas NOT FOUND")
# #Important note here: this find Module is named TPLROCBLAS
# #The eventual target is named roc::rocblas. To avoid naming conflicts
# #the find module is called TPLROCBLAS. This call will cause
# #the find_package call to fail in a "standard" CMake way
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(TPLROCBLAS REQUIRED_VARS ROCBLAS_FOUND)
# ELSE()
# # MPL: 12/26/2022: USING FIND_PACKAGE_HANDLE_STANDARD_ARGS can be ok in modern CMAKE but with a Find module
# # if the package is found, we can verify that some variables are defined using FIND_PACKAGE_HANDLE_STANDARD_ARGS
# MESSAGE( "TARGET roc::rocblas FOUND")
# #The libraries might be empty - OR they might explicitly be not found
# IF("${ROCBLAS_LIBRARIES}" MATCHES "NOTFOUND")
# MESSAGE( "ROCBLAS_LIBRARIES is not found")

# FIND_PACKAGE_HANDLE_STANDARD_ARGS(TPLROCBLAS REQUIRED_VARS ROCBLAS_LIBRARIES)
# ELSE()
# MESSAGE( "ROCBLAS_LIBRARIES is not found")
# # 12/28/2022: ROCBLAS_LIBRARIES is found using find_packge which defines it as a target and not a lib
# message("TPLROCBLAS LIBRARIES VARIABLE IS ${ROCBLAS_LIBRARIES}")
# KOKKOSKERNELS_CREATE_IMPORTED_TPL(ROCBLAS INTERFACE LINK_LIBRARIES ${ROCBLAS_LIBRARIES})
# ENDIF()
# endif()
#ENDIF()

## MPL: v1
#IF (ROCBLAS_LIBRARY_DIRS AND ROCBLAS_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCBLAS INTERFACE LIBRARIES ${ROCBLAS_LIBRARIES} LIBRARY_PATHS ${ROCBLAS_LIBRARY_DIRS})
#ELSEIF (ROCBLAS_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCBLAS INTERFACE LIBRARIES ${ROCBLAS_LIBRARIES})
#ELSEIF (ROCBLAS_LIBRARY_DIRS)
# KOKKOSKERNELS_FIND_IMPORTED(ROCBLAS INTERFACE LIBRARIES rocblas LIBRARY_PATHS ${ROCBLAS_LIBRARY_DIRS})
#ELSEIF (KokkosKernels_ROCBLAS_ROOT)
# KOKKOSKERNELS_FIND_IMPORTED(ROCBLAS INTERFACE
# LIBRARIES
# rocblas
# LIBRARY_PATHS
# ${KokkosKernels_ROCBLAS_ROOT}/lib
# HEADERS
# rocblas.h
# HEADER_PATHS
# ${KokkosKernels_ROCBLAS_ROOT}/include
# )
#ELSEIF (DEFINED ENV{ROCM_PATH})
# MESSAGE(STATUS "Detected ROCM_PATH: ENV{ROCM_PATH}")
# SET(ROCBLAS_ROOT "$ENV{ROCM_PATH}/rocblas")
# KOKKOSKERNELS_FIND_IMPORTED(ROCBLAS INTERFACE
# LIBRARIES
# rocblas
# LIBRARY_PATHS
# ${ROCBLAS_ROOT}/lib
# HEADERS
# rocblas.h
# HEADER_PATHS
# ${ROCBLAS_ROOT}/include
# )
#ELSE()
# MESSAGE(ERROR "rocBLAS was not detected properly, please disable it or provide sufficient information at configure time.")
# # Todo: figure out how to use the target defined during rocblas installation
# # FIND_PACKAGE(ROCBLAS REQUIRED)
# # KOKKOSKERNELS_CREATE_IMPORTED_TPL(ROCBLAS INTERFACE LINK_LIBRARIES ${ROCBLAS_LIBRARIES})
# # GET_TARGET_PROPERTY(ROCBLAS_LINK_LIBRARIES ${ROCBLAS_LIBRARIES} IMPORTED_LINK_INTERFACE_LIBRARIES)
#ENDIF()
72 changes: 0 additions & 72 deletions cmake/Modules/FindTPLROCSPARSE.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# MPL: 05/01/2023: This file follows the partern of FindTPLROCBLAS.cmake

# MPL: v3
FIND_PACKAGE(ROCSPARSE)
if(TARGET roc::rocsparse)
SET(TPL_ROCSPARSE_IMPORTED_NAME roc::rocsparse)
Expand All @@ -9,73 +7,3 @@ if(TARGET roc::rocsparse)
ELSE()
MESSAGE(FATAL_ERROR "Package ROCSPARSE requested but not found")
ENDIF()

## MPL: v2
#IF (ROCSPARSE_LIBRARY_DIRS AND ROCSPARSE_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCSPARSE INTERFACE LIBRARIES ${ROCSPARSE_LIBRARIES} LIBRARY_PATHS ${ROCSPARSE_LIBRARY_DIRS})
#ELSEIF (ROCSPARSE_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCSPARSE INTERFACE LIBRARIES ${ROCSPARSE_LIBRARIES})
#ELSEIF (ROCSPARSE_LIBRARY_DIRS)
#ELSE()
# FIND_PACKAGE(ROCSPARSE)
# if(NOT TARGET roc::rocsparse)
# MESSAGE( "TARGET roc::ROCSPARSE NOT FOUND")
# #Important note here: this find Module is named TPLROCSPARSE
# #The eventual target is named roc::ROCSPARSE. To avoid naming conflicts
# #the find module is called TPLROCSPARSE. This call will cause
# #the find_package call to fail in a "standard" CMake way
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(TPLROCSPARSE REQUIRED_VARS ROCSPARSE_FOUND)
# ELSE()
# # if the package is found, we can verify that some variables are defined using FIND_PACKAGE_HANDLE_STANDARD_ARGS
# MESSAGE( "TARGET roc::ROCSPARSE FOUND")
# #The libraries might be empty - OR they might explicitly be not found
# IF("${ROCSPARSE_LIBRARIES}" MATCHES "NOTFOUND")
# MESSAGE( "ROCSPARSE_LIBRARIES is not found")

# FIND_PACKAGE_HANDLE_STANDARD_ARGS(TPLROCSPARSE REQUIRED_VARS ROCSPARSE_LIBRARIES)
# ELSE()
# MESSAGE( "ROCSPARSE_LIBRARIES is not found")
# message("TPLROCSPARSE LIBRARIES VARIABLE IS ${ROCSPARSE_LIBRARIES}")
# KOKKOSKERNELS_CREATE_IMPORTED_TPL(ROCSPARSE INTERFACE LINK_LIBRARIES ${ROCSPARSE_LIBRARIES})
# ENDIF()
# endif()
#ENDIF()

## MPL: v1
#IF (ROCSPARSE_LIBRARY_DIRS AND ROCSPARSE_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCSPARSE INTERFACE LIBRARIES ${ROCSPARSE_LIBRARIES} LIBRARY_PATHS ${ROCSPARSE_LIBRARY_DIRS})
#ELSEIF (ROCSPARSE_LIBRARIES)
# KOKKOSKERNELS_FIND_IMPORTED(ROCSPARSE INTERFACE LIBRARIES ${ROCSPARSE_LIBRARIES})
#ELSEIF (ROCSPARSE_LIBRARY_DIRS)
# KOKKOSKERNELS_FIND_IMPORTED(ROCSPARSE INTERFACE LIBRARIES rocsparse LIBRARY_PATHS ${ROCSPARSE_LIBRARY_DIRS})
#ELSEIF (KokkosKernels_ROCSPARSE_ROOT)
# KOKKOSKERNELS_FIND_IMPORTED(ROCSPARSE INTERFACE
# LIBRARIES
# rocsparse
# LIBRARY_PATHS
# ${KokkosKernels_ROCSPARSE_ROOT}/lib
# HEADERS
# rocsparse.h
# HEADER_PATHS
# ${KokkosKernels_ROCSPARSE_ROOT}/include
# )
#ELSEIF (DEFINED ENV{ROCM_PATH})
# MESSAGE(STATUS "Detected ROCM_PATH: ENV{ROCM_PATH}")
# SET(ROCSPARSE_ROOT "$ENV{ROCM_PATH}/rocsparse")
# KOKKOSKERNELS_FIND_IMPORTED(ROCSPARSE INTERFACE
# LIBRARIES
# rocsparse
# LIBRARY_PATHS
# ${ROCSPARSE_ROOT}/lib
# HEADERS
# rocsparse.h
# HEADER_PATHS
# ${ROCSPARSE_ROOT}/include
# )
#ELSE()
# MESSAGE(ERROR "rocSPARSE was not detected properly, please disable it or provide sufficient information at configure time.")
# # Todo: figure out how to use the target defined during rocsparse installation
# # FIND_PACKAGE(ROCSPARSE REQUIRED)
# # KOKKOSKERNELS_CREATE_IMPORTED_TPL(ROCSPARSE INTERFACE LINK_LIBRARIES ${ROCSPARSE_LIBRARIES})
# # GET_TARGET_PROPERTY(ROCSPARSE_LINK_LIBRARIES ${ROCSPARSE_LIBRARIES} IMPORTED_LINK_INTERFACE_LIBRARIES)
#ENDIF()

0 comments on commit 25dbdcb

Please sign in to comment.