Skip to content

Commit

Permalink
SPMM: Fix up-front release of k tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Jul 11, 2024
1 parent ef8bd3b commit d916ae0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/spmm/spmm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,13 @@ class SpMM25D {
// release the first bcast(s)
auto pbcasts = parallel_bcasts_;
auto release_k = k_cnt.begin();
release_k_ = release_k; // this will be released
while (pbcasts-- > 0 && (k_cnt.end() != release_k))
{
release_k = std::find_if(release_k, k_cnt.end(), [](std::size_t c){ return c > 0; });
release_k_ = release_k;
release_k = std::find_if(release_k++, k_cnt.end(), [](std::size_t c){ return c > 0; });
}
constraint->release(*release_k);
constraint->release(*release_k_);

TTGUNUSED(bcast_a_);
TTGUNUSED(bcast_b_);
Expand Down

0 comments on commit d916ae0

Please sign in to comment.