Skip to content

Commit

Permalink
SPMV TPLs: improve profile region labels (#2219)
Browse files Browse the repository at this point in the history
- Mark rank-2 versions as "spmv_mv" not "spmv" (the native impl has
  this, and it's useful to know which one is being run)
- Add missing commas separating "BSRMATRIX" and the scalar type name
  • Loading branch information
brian-kelley authored May 31, 2024
1 parent 38132f3 commit f352a03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions sparse/tpls/KokkosSparse_spmv_bsrmatrix_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ inline void spmv_mv_bsr_mkl(Handle* handle, sparse_operation_t op, Scalar alpha,
const AMatrix& A, const XVector& X, \
const coefficient_type& beta, \
const YVector& Y) { \
std::string label = "KokkosSparse::spmv[TPL_MKL,BSRMATRIX" + \
std::string label = "KokkosSparse::spmv[TPL_MKL,BSRMATRIX," + \
Kokkos::ArithTraits<SCALAR>::name() + "]"; \
Kokkos::Profiling::pushRegion(label); \
spmv_bsr_mkl(handle, mode_kk_to_mkl(mode[0]), alpha, beta, A.numRows(), \
Expand Down Expand Up @@ -292,7 +292,7 @@ KOKKOSSPARSE_SPMV_MKL(Kokkos::complex<double>, Kokkos::OpenMP)
const AMatrix& A, const XVector& X, \
const coefficient_type& beta, \
const YVector& Y) { \
std::string label = "KokkosSparse::spmv[TPL_MKL,BSRMATRIX" + \
std::string label = "KokkosSparse::spmv_mv[TPL_MKL,BSRMATRIX," + \
Kokkos::ArithTraits<SCALAR>::name() + "]"; \
Kokkos::Profiling::pushRegion(label); \
MKL_INT colx = static_cast<MKL_INT>(X.extent(1)); \
Expand Down Expand Up @@ -610,7 +610,7 @@ void spmv_mv_bsr_cusparse(const Kokkos::Cuda& exec, Handle* handle,
const AMatrix& A, const XVector& x, \
const coefficient_type& beta, \
const YVector& y) { \
std::string label = "KokkosSparse::spmv[TPL_CUSPARSE,BSRMATRIX" + \
std::string label = "KokkosSparse::spmv[TPL_CUSPARSE,BSRMATRIX," + \
Kokkos::ArithTraits<SCALAR>::name() + "]"; \
Kokkos::Profiling::pushRegion(label); \
spmv_bsr_cusparse(exec, handle, mode, alpha, A, x, beta, y); \
Expand Down Expand Up @@ -695,7 +695,7 @@ KOKKOSSPARSE_SPMV_CUSPARSE(Kokkos::complex<float>, int, int,
const AMatrix& A, const XVector& x, \
const coefficient_type& beta, \
const YVector& y) { \
std::string label = "KokkosSparse::spmv[TPL_CUSPARSE,BSRMATRIX" + \
std::string label = "KokkosSparse::spmv_mv[TPL_CUSPARSE,BSRMATRIX," + \
Kokkos::ArithTraits<SCALAR>::name() + "]"; \
Kokkos::Profiling::pushRegion(label); \
spmv_mv_bsr_cusparse(exec, handle, mode, alpha, A, x, beta, y); \
Expand Down Expand Up @@ -1029,7 +1029,7 @@ void spmv_bsr_rocsparse(const Kokkos::HIP& exec, Handle* handle,
const AMatrix& A, const XVector& x, \
const coefficient_type& beta, \
const YVector& y) { \
std::string label = "KokkosSparse::spmv[TPL_ROCSPARSE,BSRMATRIX" + \
std::string label = "KokkosSparse::spmv[TPL_ROCSPARSE,BSRMATRIX," + \
Kokkos::ArithTraits<SCALAR>::name() + "]"; \
Kokkos::Profiling::pushRegion(label); \
spmv_bsr_rocsparse(exec, handle, mode, alpha, A, x, beta, y); \
Expand Down
2 changes: 1 addition & 1 deletion sparse/tpls/KokkosSparse_spmv_mv_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void spmv_mv_cusparse(const Kokkos::Cuda &exec, Handle *handle,
const char mode[], const coefficient_type &alpha, \
const AMatrix &A, const XVector &x, \
const coefficient_type &beta, const YVector &y) { \
std::string label = "KokkosSparse::spmv[TPL_CUSPARSE," + \
std::string label = "KokkosSparse::spmv_mv[TPL_CUSPARSE," + \
Kokkos::ArithTraits<SCALAR>::name() + "]"; \
Kokkos::Profiling::pushRegion(label); \
spmv_mv_cusparse(exec, handle, mode, alpha, A, x, beta, y); \
Expand Down

0 comments on commit f352a03

Please sign in to comment.