Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions Libraries/hipSPARSELt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ else()
if(NOT hipsparselt_FOUND)
message(STATUS "hipSPARSELt could not be found, not building hipSPARSELt examples")
else()
hipsparselt_get_supported_architectures(HIPSPARSELT_SUPPORTED_ARCH)
foreach(ARCH ${CMAKE_HIP_ARCHITECTURES})
if(NOT ARCH IN_LIST HIPSPARSELT_SUPPORTED_ARCH)
message(WARNING "hipSPARSELt does not support architecture: ${ARCH}, not building hipSPARSELt examples")
return()
endif()
endforeach()

add_subdirectory(spmm)
add_subdirectory(spmm_advanced)
endif()
Expand Down
8 changes: 8 additions & 0 deletions Libraries/hipSPARSELt/spmm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ list(APPEND CMAKE_PREFIX_PATH "${ROCM_ROOT}")
find_package(hip REQUIRED)
find_package(hipsparselt REQUIRED)

hipsparselt_get_supported_architectures(HIPSPARSELT_SUPPORTED_ARCH)
foreach(ARCH ${CMAKE_HIP_ARCHITECTURES})
if(NOT ARCH IN_LIST HIPSPARSELT_SUPPORTED_ARCH)
message(WARNING "hipSPARSELt does not support architecture: ${ARCH}, not building hipSPARSELt examples")
return()
endif()
endforeach()

add_executable(${example_name} main.cpp)
# Make example runnable using CTest
add_test(NAME ${example_name} COMMAND ${example_name})
Expand Down
8 changes: 8 additions & 0 deletions Libraries/hipSPARSELt/spmm_advanced/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ list(APPEND CMAKE_PREFIX_PATH "${ROCM_ROOT}")
find_package(hip REQUIRED)
find_package(hipsparselt REQUIRED)

hipsparselt_get_supported_architectures(HIPSPARSELT_SUPPORTED_ARCH)
foreach(ARCH ${CMAKE_HIP_ARCHITECTURES})
if(NOT ARCH IN_LIST HIPSPARSELT_SUPPORTED_ARCH)
message(WARNING "hipSPARSELt does not support architecture: ${ARCH}, not building hipSPARSELt examples")
return()
endif()
endforeach()

add_executable(${example_name} main.cpp)
# Make example runnable using CTest
add_test(NAME ${example_name} COMMAND ${example_name})
Expand Down
Loading