Skip to content

Commit

Permalink
cholesky: Fix priority of syrks
Browse files Browse the repository at this point in the history
According to the Chameleon priorities. We indeed need to prioritize
syrks which are on the critical path. That's a bit approximative since
the gemms around will also pose a priority problem, but better keep
coherent with Chameleon.
  • Loading branch information
sthibaul committed Sep 25, 2024
1 parent 607fbd4 commit 2b66f6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion examples/cholesky/cholesky_implicit.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ static int gemm_priority(unsigned nblocks, unsigned k, unsigned m, unsigned n, d
}

if (priority_attribution_p == 0) /* Base priority */
return 2*nblocks - 2*k - m - n;
{
if (n == m)
return 2*nblocks - 2*k - n;
else
return 2*nblocks - 2*k - m - n;
}

if (priority_attribution_p == 1)
return 3*nblocks - (k + n + m);
Expand Down
2 changes: 1 addition & 1 deletion mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void run_cholesky(starpu_data_handle_t **data_handles, int rank, int node
for (n = k+1; n<nblocks; n++)
{
starpu_mpi_task_insert(MPI_COMM_WORLD, &cl_syrk,
STARPU_PRIORITY, noprio ? STARPU_DEFAULT_PRIO : unbound_prio ? (int)(2*nblocks - 2*k - n - n) : (n == k+1)?STARPU_MAX_PRIO:STARPU_DEFAULT_PRIO,
STARPU_PRIORITY, noprio ? STARPU_DEFAULT_PRIO : unbound_prio ? (int)(2*nblocks - 2*k - n) : (n == k+1)?STARPU_MAX_PRIO:STARPU_DEFAULT_PRIO,
STARPU_R, data_handles[n][k],
STARPU_RW | STARPU_COMMUTE, data_handles[n][n],
STARPU_FLOPS, (double) FLOPS_SSYRK(nn, nn),
Expand Down

0 comments on commit 2b66f6a

Please sign in to comment.