kokkos / kokkos-kernels

Kokkos C++ Performance Portability Programming Ecosystem: Math Kernels - Provides BLAS, Sparse BLAS and Graph Kernels
Other
303 stars 96 forks source link

Remove kernels from experimental namespace #741

Open lucbv opened 4 years ago

lucbv commented 4 years ago

There are a few kernels and tools that have now been widely used by Trilinos, ATDM and other users. These kernels deserve to be promoted out of experimental, this will also give confidence to the users that our kernels are mature. One big question regarding this work is: do we want to keep the old experimental declaration and mark it deprecated to allow users some time before we make things not backward compatible?

  1. Kokkos::ArithTraits (this one lives both in experimental and out of experimental)
  2. SpGEMM
  3. SpADD
  4. KokkosKernelsHandle
ndellingwood commented 4 years ago

@lucbv I think to keep backward compatibility we can remove the Experimental namespace from the capability, but reintroduce via a using statement, e.g. for KokkosSparse_spgemm_symbolic.hpp we can make the change from

namespace KokkosSparse{
namespace Experimental{

template <typename KernelHandle,
typename alno_row_view_t_,
typename alno_nnz_view_t_,
typename blno_row_view_t_,
typename blno_nnz_view_t_,
typename clno_row_view_t_>
void spgemm_symbolic(
    KernelHandle *handle,
    typename KernelHandle::const_nnz_lno_t m,
    typename KernelHandle::const_nnz_lno_t n,
    typename KernelHandle::const_nnz_lno_t k,
    alno_row_view_t_ row_mapA,
    alno_nnz_view_t_ entriesA,
    bool transposeA,
    blno_row_view_t_ row_mapB,
    blno_nnz_view_t_ entriesB,
    bool transposeB,
    clno_row_view_t_ row_mapC)
// ...
} } // end namespaces

to

namespace KokkosSparse{

template <typename KernelHandle,
typename alno_row_view_t_,
typename alno_nnz_view_t_,
typename blno_row_view_t_,
typename blno_nnz_view_t_,
typename clno_row_view_t_>
void spgemm_symbolic(
    KernelHandle *handle,
    typename KernelHandle::const_nnz_lno_t m,
    typename KernelHandle::const_nnz_lno_t n,
    typename KernelHandle::const_nnz_lno_t k,
    alno_row_view_t_ row_mapA,
    alno_nnz_view_t_ entriesA,
    bool transposeA,
    blno_row_view_t_ row_mapB,
    blno_nnz_view_t_ entriesB,
    bool transposeB,
    clno_row_view_t_ row_mapC)
// ...
} // end namespace KokkosSparse

// ...

namespace KokkosSparse{
namespace Experimental{
  using KokkosSparse::spgemm_symbolic;
} } // end namespaces

That would give a buffer of time to users/apps to make the namespace changes, what do you think?

lucbv commented 4 years ago

Yes I like the idea, is there a way to mark using KokkosSparse::spgemm_symbolic; as deprecated in the Experimental namespace though? Otherwise I fear the users will have no idea what hit them when we remove it...