Skip to content

Commit 8497ad2

Browse files
committed
Fencing for sptrsv
1 parent 82a2050 commit 8497ad2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sparse/impl/KokkosSparse_twostage_gauss_seidel_impl.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -986,10 +986,11 @@ class TwostageGaussSeidel {
986986
Kokkos::subview(localZ, Kokkos::ALL(), range_type(j, j + 1));
987987
single_vector_view_t Rj(localRj.data(), num_rows);
988988
single_vector_view_t Zj(localZj.data(), num_rows);
989+
my_exec_space
990+
.fence(); // Wait for writes to R and Z to land, TODO: remove
989991
sptrsv_solve(handle->get_gs_sptrsvL_handle(), crsmatL.graph.row_map,
990992
crsmatL.graph.entries, crsmatL.values, Rj, Zj);
991-
execution_space()
992-
.fence(); // TODO: call sptrsv_solve on stream and remove
993+
Kokkos::fence(); // TODO: call sptrsv_solve on stream and remove
993994
}
994995
} else {
995996
using namespace KokkosSparse::Experimental;
@@ -1002,10 +1003,11 @@ class TwostageGaussSeidel {
10021003
Kokkos::subview(localZ, Kokkos::ALL(), range_type(j, j + 1));
10031004
single_vector_view_t Rj(localRj.data(), num_rows);
10041005
single_vector_view_t Zj(localZj.data(), num_rows);
1006+
my_exec_space
1007+
.fence(); // Wait for writes to R and Z to land, TODO: remove
10051008
sptrsv_solve(handle->get_gs_sptrsvU_handle(), crsmatU.graph.row_map,
10061009
crsmatU.graph.entries, crsmatU.values, Rj, Zj);
1007-
execution_space()
1008-
.fence(); // TODO: call sptrsv_solve on stream and remove
1010+
Kokkos::fence(); // TODO: call sptrsv_solve on stream and remove
10091011
}
10101012
}
10111013

0 commit comments

Comments
 (0)