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

Use CRS matrix sort, instead of Kokkos::sort on each row #1553

Merged
merged 1 commit into from
Sep 28, 2022
Merged
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
20 changes: 7 additions & 13 deletions sparse/impl/KokkosSparse_spiluk_symbolic_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include <KokkosKernels_config.h>
#include <Kokkos_ArithTraits.hpp>
#include <KokkosSparse_spiluk_handle.hpp>
#include <Kokkos_Sort.hpp>
#include <KokkosSparse_SortCrs.hpp>
#include <KokkosKernels_Error.hpp>

//#define SYMBOLIC_OUTPUT_INFO
Expand Down Expand Up @@ -451,18 +451,12 @@ void iluk_symbolic(IlukHandle& thandle,
thandle.set_nnzU(cntU);

// Sort
for (size_type row_id = 0;
row_id < static_cast<size_type>(L_row_map.extent(0)) - 1; row_id++) {
size_type row_start = L_row_map(row_id);
size_type row_end = L_row_map(row_id + 1);
Kokkos::sort(subview(L_entries, Kokkos::make_pair(row_start, row_end)));
}
for (size_type row_id = 0;
row_id < static_cast<size_type>(U_row_map.extent(0)) - 1; row_id++) {
size_type row_start = U_row_map(row_id);
size_type row_end = U_row_map(row_id + 1);
Kokkos::sort(subview(U_entries, Kokkos::make_pair(row_start, row_end)));
}
KokkosSparse::sort_crs_graph<Kokkos::DefaultHostExecutionSpace,
decltype(L_row_map), decltype(L_entries)>(
L_row_map, L_entries);
KokkosSparse::sort_crs_graph<Kokkos::DefaultHostExecutionSpace,
decltype(U_row_map), decltype(U_entries)>(
U_row_map, U_entries);

// Level scheduling on L
if (thandle.get_algorithm() ==
Expand Down