From 1b4f72ba72a424afa919e4d22002d9c1a2bb606f Mon Sep 17 00:00:00 2001 From: Luc Date: Thu, 1 Aug 2024 13:42:12 -0600 Subject: [PATCH] ETI: adding BLAS kernels that are called from Sparse kernels. --- .../KokkosBlas1_axpby_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_axpby_eti_spec_decl.hpp.in | 24 ++++++++++++++++ ...KokkosBlas1_axpby_mv_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_axpby_mv_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_dot_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_dot_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_dot_mv_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_dot_mv_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_mult_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_mult_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_mult_mv_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_mult_mv_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_nrm2_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_nrm2_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_nrm2_mv_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas1_nrm2_mv_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_scal_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas1_scal_mv_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas2_gemv_eti_spec_avail.hpp.in | 2 +- .../KokkosBlas2_gemv_eti_spec_decl.hpp.in | 24 ++++++++++++++++ .../KokkosBlas3_trmm_eti_spec_decl.hpp.in | 26 +++++++++++++++++ .../KokkosBlas3_trsm_eti_spec_decl.hpp.in | 26 +++++++++++++++++ blas/impl/KokkosBlas1_axpby_spec.hpp | 6 +++- blas/impl/KokkosBlas1_dot_spec.hpp | 6 +++- blas/impl/KokkosBlas1_mult_spec.hpp | 6 +++- blas/impl/KokkosBlas1_nrm2_spec.hpp | 4 +++ blas/impl/KokkosBlas1_scal_spec.hpp | 6 +++- blas/impl/KokkosBlas2_gemv_spec.hpp | 2 ++ blas/impl/KokkosBlas3_trmm_spec.hpp | 2 ++ blas/impl/KokkosBlas3_trsm_spec.hpp | 2 ++ cmake/kokkoskernels_eti.cmake | 28 +++++++++++++++---- 31 files changed, 377 insertions(+), 19 deletions(-) create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_scal_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas1_scal_mv_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas3_trmm_eti_spec_decl.hpp.in create mode 100644 blas/eti/generated_specializations_hpp/KokkosBlas3_trsm_eti_spec_decl.hpp.in diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_avail.hpp.in index 66fae7ebd3..bebe667933 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_AXPBY_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..cb42d1c5fd --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_AXPBY_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_AXPBY_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_AXPBY_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_avail.hpp.in index 6a46224605..3262fa2485 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_AXPBY_MV_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..94033316cf --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_axpby_mv_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_AXPBY_MV_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_AXPBY_MV_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_AXPBY_MV_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_avail.hpp.in index 525031c93f..01ecc16288 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_DOT_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..827abeef6f --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_DOT_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_DOT_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_DOT_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_avail.hpp.in index 9145ec9461..ca52819bc3 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_DOT_MV_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..96acefb108 --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_dot_mv_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_DOT_MV_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_DOT_MV_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_DOT_MV_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_avail.hpp.in index 0fa727b8ba..9fe55baf2a 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_MULT_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..8a64db6ba6 --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_MULT_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_MULT_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_MULT_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_avail.hpp.in index 56f7771956..b1483c8fb0 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_MULT_MV_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..945d3a837a --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_mult_mv_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_MULT_MV_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_MULT_MV_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_MULT_MV_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_avail.hpp.in index 5398eb1c34..659c575afa 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_NRM2_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..444776c725 --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_NRM2_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_NRM2_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_NRM2_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_avail.hpp.in index b0446fc62e..1b1c8f3dba 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS1_NRM2_MV_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..a75bb102dc --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_nrm2_mv_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_NRM2_MV_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_NRM2_MV_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_NRM2_MV_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_scal_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_scal_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..56d40c9883 --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_scal_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_SCAL_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_SCAL_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_SCAL_ETI_DECL_BLOCK@ + } //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas1_scal_mv_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas1_scal_mv_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..953f8e6954 --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas1_scal_mv_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS1_SCAL_MV_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS1_SCAL_MV_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS1_SCAL_MV_ETI_DECL_BLOCK@ + } //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_avail.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_avail.hpp.in index 1a7cd9acce..aa52a7d4b5 100644 --- a/blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_avail.hpp.in +++ b/blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_avail.hpp.in @@ -19,6 +19,6 @@ namespace KokkosBlas { namespace Impl { @BLAS2_GEMV_ETI_AVAIL_BLOCK@ - } //IMPL +} //IMPL } //Kokkos #endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..606ec52ae2 --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas2_gemv_eti_spec_decl.hpp.in @@ -0,0 +1,24 @@ +//@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 + +#ifndef KOKKOSBLAS2_GEMV_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS2_GEMV_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { +@BLAS2_GEMV_ETI_DECL_BLOCK@ +} //IMPL +} //Kokkos +#endif diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas3_trmm_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas3_trmm_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..e802ccf4fc --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas3_trmm_eti_spec_decl.hpp.in @@ -0,0 +1,26 @@ +//@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 + +#ifndef KOKKOSBLAS3_TRMM_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS3_TRMM_ETI_SPEC_DECL_HPP_ +namespace KokkosBlas { +namespace Impl { + +@BLAS3_TRMM_ETI_DECL_BLOCK@ + +} // Impl +} // KokkosBlas +#endif // KOKKOSBLAS3_TRMM_ETI_SPEC_DECL_HPP_ diff --git a/blas/eti/generated_specializations_hpp/KokkosBlas3_trsm_eti_spec_decl.hpp.in b/blas/eti/generated_specializations_hpp/KokkosBlas3_trsm_eti_spec_decl.hpp.in new file mode 100644 index 0000000000..d1b6384e78 --- /dev/null +++ b/blas/eti/generated_specializations_hpp/KokkosBlas3_trsm_eti_spec_decl.hpp.in @@ -0,0 +1,26 @@ +//@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 +#ifndef KOKKOSBLAS3_TRSM_ETI_SPEC_DECL_HPP_ +#define KOKKOSBLAS3_TRSM_ETI_SPEC_DECL_HPP_ + +namespace KokkosBlas { +namespace Impl { + +@BLAS3_TRSM_ETI_DECL_BLOCK@ + +} // Impl +} // KokkosBlas +#endif // KOKKOSBLAS3_TRSM_ETI_SPEC_DECL_HPP_ diff --git a/blas/impl/KokkosBlas1_axpby_spec.hpp b/blas/impl/KokkosBlas1_axpby_spec.hpp index f4f85c8f6b..b0b44b09e9 100644 --- a/blas/impl/KokkosBlas1_axpby_spec.hpp +++ b/blas/impl/KokkosBlas1_axpby_spec.hpp @@ -513,6 +513,8 @@ struct Axpby, Kokkos::MemoryTraits >, \ 1, false, true>; +#include + #define KOKKOSBLAS1_AXPBY_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Axpby< \ EXEC_SPACE, SCALAR, \ @@ -559,7 +561,9 @@ struct Axpby, Kokkos::MemoryTraits >, \ 2, false, true>; -#define KOKKOSBLAS1_AXPBY_MV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ +#include + +#define KOKKOSBLAS1_AXPBY_MV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Axpby< \ EXEC_SPACE, SCALAR, \ Kokkos::View, \ diff --git a/blas/impl/KokkosBlas1_dot_spec.hpp b/blas/impl/KokkosBlas1_dot_spec.hpp index 982e2eaa0c..c759cfdc82 100644 --- a/blas/impl/KokkosBlas1_dot_spec.hpp +++ b/blas/impl/KokkosBlas1_dot_spec.hpp @@ -410,6 +410,8 @@ struct Dot>, \ true>; +#include + #define KOKKOSBLAS1_DOT_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Dot>, \ @@ -477,7 +479,9 @@ struct Dot>, \ 1, 2, false, true>; -#define KOKKOSBLAS1_DOT_MV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ +#include + +#define KOKKOSBLAS1_DOT_MV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Dot< \ EXEC_SPACE, \ Kokkos::View, \ diff --git a/blas/impl/KokkosBlas1_mult_spec.hpp b/blas/impl/KokkosBlas1_mult_spec.hpp index 3cd847dc1d..15b12dca88 100644 --- a/blas/impl/KokkosBlas1_mult_spec.hpp +++ b/blas/impl/KokkosBlas1_mult_spec.hpp @@ -229,6 +229,8 @@ struct Mult >, \ 1, false, true>; +#include + #define KOKKOSBLAS1_MULT_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Mult< \ EXEC_SPACE, \ @@ -257,7 +259,9 @@ struct Mult >, \ 2, false, true>; -#define KOKKOSBLAS1_MULT_MV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ +#include + +#define KOKKOSBLAS1_MULT_MV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Mult< \ EXEC_SPACE, \ Kokkos::View, Kokkos::MemoryTraits >, \ diff --git a/blas/impl/KokkosBlas1_nrm2_spec.hpp b/blas/impl/KokkosBlas1_nrm2_spec.hpp index 4d0b2e1396..b13290cc1e 100644 --- a/blas/impl/KokkosBlas1_nrm2_spec.hpp +++ b/blas/impl/KokkosBlas1_nrm2_spec.hpp @@ -199,6 +199,8 @@ struct Nrm2 >, \ 1, false, true>; +#include + // // Macro for definition of full specialization of // KokkosBlas::Impl::Nrm2 for rank == 2. This is NOT for users!!! We @@ -229,6 +231,8 @@ struct Nrm2 >, \ 2, false, true>; +#include + // // Macro for definition of full specialization of // KokkosBlas::Impl::Nrm2 for rank == 2. This is NOT for users!!! We diff --git a/blas/impl/KokkosBlas1_scal_spec.hpp b/blas/impl/KokkosBlas1_scal_spec.hpp index 70a95d33e2..72b3399968 100644 --- a/blas/impl/KokkosBlas1_scal_spec.hpp +++ b/blas/impl/KokkosBlas1_scal_spec.hpp @@ -292,7 +292,9 @@ struct Scal >, \ 1, false, true>; -#define KOKKOSBLAS1_SCAL_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ +#include + +#define KOKKOSBLAS1_SCAL_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Scal< \ EXEC_SPACE, \ Kokkos::View, Kokkos::MemoryTraits >, \ @@ -324,6 +326,8 @@ struct Scal >, \ 2, false, true>; +#include + #define KOKKOSBLAS1_SCAL_MV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct Scal< \ EXEC_SPACE, \ diff --git a/blas/impl/KokkosBlas2_gemv_spec.hpp b/blas/impl/KokkosBlas2_gemv_spec.hpp index 05e2d28bc7..b56ac4c1f6 100644 --- a/blas/impl/KokkosBlas2_gemv_spec.hpp +++ b/blas/impl/KokkosBlas2_gemv_spec.hpp @@ -121,6 +121,8 @@ struct GEMV { Kokkos::View, Kokkos::MemoryTraits >, \ false, true>; +#include + #define KOKKOSBLAS2_GEMV_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ template struct GEMV< \ EXEC_SPACE, \ diff --git a/blas/impl/KokkosBlas3_trmm_spec.hpp b/blas/impl/KokkosBlas3_trmm_spec.hpp index 6399f9e57e..f5520656ad 100644 --- a/blas/impl/KokkosBlas3_trmm_spec.hpp +++ b/blas/impl/KokkosBlas3_trmm_spec.hpp @@ -138,6 +138,8 @@ struct TRMM + #define KOKKOSBLAS3_TRMM_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ KOKKOSBLAS3_TRMM_ETI_SPEC_INST_LAYOUTS(SCALAR, LAYOUT, LAYOUT, EXEC_SPACE, MEM_SPACE) diff --git a/blas/impl/KokkosBlas3_trsm_spec.hpp b/blas/impl/KokkosBlas3_trsm_spec.hpp index 8c9088e970..7c5c6fc3eb 100644 --- a/blas/impl/KokkosBlas3_trsm_spec.hpp +++ b/blas/impl/KokkosBlas3_trsm_spec.hpp @@ -138,6 +138,8 @@ struct TRSM + #define KOKKOSBLAS3_TRSM_ETI_SPEC_INST(SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE) \ KOKKOSBLAS3_TRSM_ETI_SPEC_INST_LAYOUTS(SCALAR, LAYOUT, LAYOUT, EXEC_SPACE, MEM_SPACE) diff --git a/cmake/kokkoskernels_eti.cmake b/cmake/kokkoskernels_eti.cmake index 6c7629900d..2006491222 100644 --- a/cmake/kokkoskernels_eti.cmake +++ b/cmake/kokkoskernels_eti.cmake @@ -177,13 +177,29 @@ MACRO(KOKKOSKERNELS_GENERATE_ETI FUNCTION_NAME SUBFOLDER) LIST(APPEND ${ETI_HEADER_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${AVAIL_HEADER}) - SET(DECL_HEADER "${ETI_COMPONENTS}/eti/generated_specializations_hpp/Kokkos${FUNCTION_NAME}_eti_spec_decl.hpp") - SET(DECL_TEMPLATE "${DECL_HEADER}.in") + IF(COMPONENTS STREQUAL "sparse") + SET(DECL_HEADER "${ETI_COMPONENTS}/eti/generated_specializations_hpp/Kokkos${FUNCTION_NAME}_eti_spec_decl.hpp") + SET(DECL_TEMPLATE "${DECL_HEADER}.in") - STRING(REPLACE ";" "\n" ${UPPER_NAME}_ETI_DECL_BLOCK "${${UPPER_NAME}_ETI_DECL_LIST}") + STRING(REPLACE ";" "\n" ${UPPER_NAME}_ETI_DECL_BLOCK "${${UPPER_NAME}_ETI_DECL_LIST}") - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${DECL_TEMPLATE} - ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER}) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${DECL_TEMPLATE} + ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER}) - LIST(APPEND ${ETI_HEADER_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER}) + LIST(APPEND ${ETI_HEADER_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER}) + ENDIF() + + STRING(FIND "Blas1_scal;Blas1_scal_mv;Blas1_nrm2;Blas1_nrm2_mv;Blas1_dot;Blas1_dot_mv;KokkosBlas1_axpby;KokkosBlas1_axpby_mv;KokkosBlas1_mult;KokkosBlas1_mult_mv;KokkosBlas2_gemv;KokkosBlas3_trmm;KokkosBlas3_trsm" ${FUNCTION_NAME} DO_ETI) + IF(${DO_ETI} GREATER -1) + MESSAGE(STATUS "Generating decl file: ${ETI_COMPONENTS}/eti/generated_specializations_hpp/Kokkos${FUNCTION_NAME}_eti_spec_decl.hpp") + SET(DECL_HEADER "${ETI_COMPONENTS}/eti/generated_specializations_hpp/Kokkos${FUNCTION_NAME}_eti_spec_decl.hpp") + SET(DECL_TEMPLATE "${DECL_HEADER}.in") + + STRING(REPLACE ";" "\n" ${UPPER_NAME}_ETI_DECL_BLOCK "${${UPPER_NAME}_ETI_DECL_LIST}") + + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${DECL_TEMPLATE} + ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER}) + + LIST(APPEND ${ETI_HEADER_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${DECL_HEADER}) + ENDIF() ENDMACRO(KOKKOSKERNELS_GENERATE_ETI)