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

magma: fix linker errors for builds without cusolver #2181

Merged
merged 2 commits into from
Apr 23, 2024
Merged
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
6 changes: 5 additions & 1 deletion batched/dense/unit_test/Test_Batched_BatchedGemm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ void impl_test_batched_gemm(const int N, const int matAdim1, const int matAdim2,
ASSERT_EQ(batchedGemmHandleCublas.vecLen, 0);
#endif

#if defined(KOKKOSKERNELS_ENABLE_TPL_MAGMA)
// FIXME temporary workaround to run this magma test only if cublas is not
// enabled the design of the BatchedGemmHandle currently does not allow
// simultanous testing in this way. See issue #2177
#if defined(KOKKOSKERNELS_ENABLE_TPL_MAGMA) && \
!defined(KOKKOSKERNELS_ENABLE_TPL_CUBLAS)
magma_queue_t magma_queue;
BatchedGemmHandle batchedGemmHandleMagma(magma_queue, GemmTplAlgos::MAGMA,
0, 0);
Expand Down
6 changes: 6 additions & 0 deletions lapack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ IF (KOKKOSKERNELS_ENABLE_TPL_CUSOLVER)
)
ENDIF()

IF (KOKKOSKERNELS_ENABLE_TPL_MAGMA)
LIST(APPEND SOURCES
lapack/tpls/KokkosLapack_Magma_tpl.cpp
)
ENDIF()

##################
# #
# ETI generation #
Expand Down
1 change: 0 additions & 1 deletion lapack/tpls/KokkosLapack_Cuda_tpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
#include <Kokkos_Core.hpp>
#include <KokkosKernels_config.h>
#include <KokkosLapack_Cuda_tpl.hpp>
#include <KokkosLapack_Magma_tpl.hpp>
18 changes: 18 additions & 0 deletions lapack/tpls/KokkosLapack_Magma_tpl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//@HEADER
// ************************************************************************
//
// Kokkos v. 4.0
// Copyright (2022) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Government retains certain rights in this software.
//
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
// See https://kokkos.org/LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//@HEADER
#include <Kokkos_Core.hpp>
#include <KokkosKernels_config.h>
#include <KokkosLapack_Magma_tpl.hpp>