Skip to content

Commit

Permalink
fix the race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Sep 5, 2024
1 parent 2a551be commit 17672ea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion common/unified/solver/bicgstab_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,18 @@ void finalize(std::shared_ptr<const DefaultExecutor> exec,
auto stop) {
if (stop[col].has_stopped() && !stop[col].is_finalized()) {
x(row, col) += alpha[col] * y(row, col);
stop[col].finalize();
}
},
x->get_size(), y->get_stride(), x, default_stride(y), row_vector(alpha),
*stop_status);
run_kernel(
exec,
[] GKO_KERNEL(auto col, auto stop) {
if (stop[col].has_stopped() && !stop[col].is_finalized()) {
stop[col].finalize();
}
},
x->get_size()[1], *stop_status);
}

GKO_INSTANTIATE_FOR_EACH_VALUE_TYPE(GKO_DECLARE_BICGSTAB_FINALIZE_KERNEL);
Expand Down

0 comments on commit 17672ea

Please sign in to comment.