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

Support non-squared matrice in spmv_team #2273

Merged
merged 1 commit into from
Jul 12, 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
4 changes: 2 additions & 2 deletions sparse/impl/KokkosSparse_spmv_team_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct TeamSpmv {
return Impl::TeamSpmvInternal::invoke<
MemberType, ScalarType, typename ValuesViewType::non_const_value_type,
typename IntView::non_const_value_type, dobeta>(
member, x.extent(0), alpha, values.data(), values.stride_0(),
member, y.extent(0), alpha, values.data(), values.stride_0(),
row_ptr.data(), row_ptr.stride_0(), colIndices.data(),
colIndices.stride_0(), x.data(), x.stride_0(), beta, y.data(),
y.stride_0());
Expand All @@ -56,7 +56,7 @@ struct TeamVectorSpmv {
return Impl::TeamVectorSpmvInternal::invoke<
MemberType, ScalarType, typename ValuesViewType::non_const_value_type,
typename IntView::non_const_value_type, dobeta>(
member, x.extent(0), alpha, values.data(), values.stride_0(),
member, y.extent(0), alpha, values.data(), values.stride_0(),
row_ptr.data(), row_ptr.stride_0(), colIndices.data(),
colIndices.stride_0(), x.data(), x.stride_0(), beta, y.data(),
y.stride_0());
Expand Down
4 changes: 2 additions & 2 deletions sparse/src/KokkosSparse_spmv_team.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int KOKKOS_INLINE_FUNCTION team_spmv(
return 1;
}

if (x.extent(0) != y.extent(0) || (x.extent(0) + 1) != row_ptr.extent(0)) {
if ((x.extent(0) + 1) != row_ptr.extent(0)) {
Kokkos::printf(
"KokkosSparse::spmv: Dimensions of x, y, and row_ptr do not match: "
"x: %d, y: %d, row_ptr: %d",
Expand Down Expand Up @@ -116,7 +116,7 @@ int KOKKOS_INLINE_FUNCTION team_vector_spmv(
return 1;
}

if (x.extent(0) != y.extent(0) || (x.extent(0) + 1) != row_ptr.extent(0)) {
if ((x.extent(0) + 1) != row_ptr.extent(0)) {
Kokkos::printf(
"KokkosSparse::spmv: Dimensions of x, y, and row_ptr do not match: "
"x: %d, y: %d, row_ptr: %d",
Expand Down
Loading