Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Improve check and report of Magma #117858

Closed
wants to merge 1 commit into from
Closed
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
25 changes: 13 additions & 12 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1597,23 +1597,24 @@ if(NOT INTERN_BUILD_MOBILE)

set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF)

if(USE_MAGMA)
find_package(MAGMA)
endif()
if((USE_CUDA OR USE_ROCM) AND MAGMA_FOUND)
set(USE_MAGMA 1)
message(STATUS "Compiling with MAGMA support")
message(STATUS "MAGMA INCLUDE DIRECTORIES: ${MAGMA_INCLUDE_DIR}")
message(STATUS "MAGMA LIBRARIES: ${MAGMA_LIBRARIES}")
message(STATUS "MAGMA V2 check: ${MAGMA_V2}")
if(USE_CUDA OR USE_ROCM)
if(USE_MAGMA)
find_package(MAGMA)
if(MAGMA_FOUND)
message(STATUS "Compiling with MAGMA support")
message(STATUS "MAGMA INCLUDE DIRECTORIES: ${MAGMA_INCLUDE_DIR}")
message(STATUS "MAGMA LIBRARIES: ${MAGMA_LIBRARIES}")
message(STATUS "MAGMA V2 check: ${MAGMA_V2}")
else()
message(STATUS "MAGMA not found. Compiling without MAGMA support")
caffe2_update_option(USE_MAGMA OFF)
endif()
endif()
elseif(USE_MAGMA)
message(WARNING
"Not compiling with MAGMA. Suppress this warning with "
"-DUSE_MAGMA=OFF.")
caffe2_update_option(USE_MAGMA OFF)
else()
message(STATUS "MAGMA not found. Compiling without MAGMA support")
caffe2_update_option(USE_MAGMA OFF)
endif()

# ARM specific flags
Expand Down
Loading