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

Updates for ROCm 6 support #12681

Merged
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
1 change: 1 addition & 0 deletions TPLsList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ TRIBITS_REPOSITORY_DEFINE_TPLS(
Cusp "cmake/TPLs/" ST
ROCBLAS "cmake/TPLs/" PT
ROCSPARSE "cmake/TPLs/" PT
ROCSOLVER "cmake/TPLs/" PT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for adding cmake/TPLs/FindTPLROCSOLVER.cmake , this will allow a follow-up revert of kokkos/kokkos-kernels#2037

TBB "cmake/TPLs/" EX
Pthread "cmake/TPLs/" PT
HWLOC "cmake/TPLs/" ST
Expand Down
63 changes: 63 additions & 0 deletions cmake/TPLs/FindTPLROCSOLVER.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# @HEADER
# ************************************************************************
#
# Trilinos: An Object-Oriented Solver Framework
# Copyright (2001) Sandia Corporation
#
#
# Copyright (2001) Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000, there is a non-exclusive license for use of this
# work by or on behalf of the U.S. Government. Export of this program
# may require a license from the United States Government.
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# NOTICE: The United States Government is granted for itself and others
# acting on its behalf a paid-up, nonexclusive, irrevocable worldwide
# license in this data to reproduce, prepare derivative works, and
# perform publicly and display publicly. Beginning five (5) years from
# July 25, 2001, the United States Government is granted for itself and
# others acting on its behalf a paid-up, nonexclusive, irrevocable
# worldwide license in this data to reproduce, prepare derivative works,
# distribute copies to the public, perform publicly and display
# publicly, and to permit others to do so.
#
# NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT
# OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES
# ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR
# RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY
# INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS
# THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#
# ************************************************************************
# @HEADER

find_package(ROCSOLVER)

if(ROCSOLVER_FOUND)
tribits_extpkg_create_imported_all_libs_target_and_config_file( ROCSOLVER
INNER_FIND_PACKAGE_NAME ROCSOLVER
IMPORTED_TARGETS_FOR_ALL_LIBS roc::rocsolver )
endif()

Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ class PerceptMesh;
void updateState(SmootherMetricImpl<MeshType> *metric, PerceptMesh *eMesh, bool valid_in, size_t *num_invalid_in, Double mtot_in, size_t n_invalid_in)
{m_metric = metric; m_eMesh = eMesh; valid = valid_in; num_invalid = num_invalid_in; mtot = mtot_in; n_invalid = n_invalid_in;}

inline
KOKKOS_INLINE_FUNCTION
void operator()(const unsigned& index, Double& mtot_loc) const
{
const_cast<This *>(this)->operator()(index, mtot_loc);
}

inline
KOKKOS_INLINE_FUNCTION
void operator()(const unsigned& index, Double& mtot_loc);

};
Expand Down
4 changes: 2 additions & 2 deletions packages/shylu/shylu_node/tacho/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ SET(LIB_OPTIONAL_DEP_PACKAGES)
SET(TEST_REQUIRED_DEP_PACKAGES Kokkos TrilinosSS)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_OPTIONAL_DEP_TPLS METIS MKL LAPACK BLAS Pthread QTHREAD VTune CUSOLVER CUSPARSE CUBLAS CUDA)
SET(LIB_OPTIONAL_DEP_TPLS METIS MKL LAPACK BLAS Pthread QTHREAD VTune CUSOLVER CUSPARSE CUBLAS CUDA ROCSOLVER ROCBLAS)
SET(TEST_REQUIRED_DEP_TPLS Pthread BLAS LAPACK)
SET(TEST_OPTIONAL_DEP_TPLS METIS Cholmod MKL LAPACK BLAS Pthread QTHREAD CUSOLVER CUSPARSE CUBLAS CUDA)
SET(TEST_OPTIONAL_DEP_TPLS METIS Cholmod MKL LAPACK BLAS Pthread QTHREAD CUSOLVER CUSPARSE CUBLAS CUDA ROCSOLVER ROCBLAS)
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Sandia National Laboratories, Albuquerque, NM, USA
#endif

#if defined(TACHO_ENABLE_ROCBLAS)
#include "rocblas.h"
#include "rocblas/rocblas.h"
#endif

namespace Tacho {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Sandia National Laboratories, Albuquerque, NM, USA
#endif

#if defined(TACHO_ENABLE_ROCSOLVER)
#include "rocblas.h"
#include "rocsolver.h"
#include "rocblas/rocblas.h"
#include "rocsolver/rocsolver.h"
#if (ROCSOLVER_VERSION_MAJOR >= 3) && (ROCSOLVER_VERSION_MINOR >= 16)
#define TACHO_ENABLE_ROCSOLVER_SYTRF
#endif
Expand Down
4 changes: 2 additions & 2 deletions packages/shylu/shylu_node/tacho/src/impl/Tacho_Util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Sandia National Laboratories, Albuquerque, NM, USA
#endif

#if defined(KOKKOS_ENABLE_HIP)
#include "rocblas.h"
#include "rocsolver.h"
#include "rocblas/rocblas.h"
#include "rocsolver/rocsolver.h"
#endif

#include "Tacho.hpp"
Expand Down
Loading
Loading