Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2cb3e5d4 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

codelet/starpu: remove ifdef within macro in QR kernels

parent b025870a
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !492. Comments created here will be created in the context of that merge request.
......@@ -15,7 +15,7 @@
* @author Mathieu Faverge
* @author Lucas Barros de Assis
* @author Florent Pruvost
* @date 2023-07-06
* @date 2024-10-18
* @precisions normal z -> s d c
*
*/
......@@ -42,7 +42,7 @@ static void cl_ztplqt_cpu_func(void *descr[], void *cl_arg)
TCORE_zlaset( ChamUpperLower, ib, M, 0., 0., tileT );
TCORE_ztplqt( M, N, L, ib,
tileA, tileB, tileT, tileWORK->mat );
tileA, tileB, tileT, tileWORK->mat );
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......@@ -58,7 +58,8 @@ void INSERT_TASK_ztplqt( const RUNTIME_option_t *options,
const CHAM_desc_t *T, int Tm, int Tn )
{
struct starpu_codelet *codelet = &cl_ztplqt;
void (*callback)(void*) = options->profiling ? cl_ztplqt_callback : NULL;
const char *cl_name;
void (*callback)(void*);
CHAMELEON_BEGIN_ACCESS_DECLARATION;
CHAMELEON_ACCESS_RW(A, Am, An);
......@@ -66,27 +67,33 @@ void INSERT_TASK_ztplqt( const RUNTIME_option_t *options,
CHAMELEON_ACCESS_W(T, Tm, Tn);
CHAMELEON_END_ACCESS_DECLARATION;
/* Callback for profiling information */
callback = options->profiling ? cl_ztplqt_callback : NULL;
/* Refine name */
cl_name = (L == 0) ? "ztslqt" : "zttlqt";
rt_starpu_insert_task(
codelet,
/* Task codelet arguments */
STARPU_VALUE, &M, sizeof(int),
STARPU_VALUE, &N, sizeof(int),
STARPU_VALUE, &L, sizeof(int),
STARPU_VALUE, &ib, sizeof(int),
STARPU_RW, RTBLKADDR(A, ChamComplexDouble, Am, An),
STARPU_RW, RTBLKADDR(B, ChamComplexDouble, Bm, Bn),
STARPU_W, RTBLKADDR(T, ChamComplexDouble, Tm, Tn),
/* Other options */
STARPU_SCRATCH, options->ws_worker,
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
/* Task handles */
STARPU_RW, RTBLKADDR(A, ChamComplexDouble, Am, An),
STARPU_RW, RTBLKADDR(B, ChamComplexDouble, Bm, Bn),
STARPU_W, RTBLKADDR(T, ChamComplexDouble, Tm, Tn),
STARPU_SCRATCH, options->ws_worker,
/* Common task arguments */
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
STARPU_EXECUTE_ON_WORKER, options->workerid,
#if defined(CHAMELEON_USE_MPI)
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
#endif
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
STARPU_NAME, (L == 0) ? "ztplqs" : "ztplqt",
#endif
0);
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
STARPU_NAME, cl_name,
0 );
(void)ib; (void)nb;
(void)nb;
}
......@@ -13,7 +13,7 @@
* @author Mathieu Faverge
* @author Lucas Barros de Assis
* @author Florent Pruvost
* @date 2023-07-06
* @date 2024-10-18
* @precisions normal z -> s d c
*
*/
......@@ -99,7 +99,8 @@ void INSERT_TASK_ztpmlqt( const RUNTIME_option_t *options,
const CHAM_desc_t *B, int Bm, int Bn )
{
struct starpu_codelet *codelet = &cl_ztpmlqt;
void (*callback)(void*) = options->profiling ? cl_ztpmlqt_callback : NULL;
const char *cl_name;
void (*callback)(void*);
CHAMELEON_BEGIN_ACCESS_DECLARATION;
CHAMELEON_ACCESS_R(V, Vm, Vn);
......@@ -108,8 +109,15 @@ void INSERT_TASK_ztpmlqt( const RUNTIME_option_t *options,
CHAMELEON_ACCESS_RW(B, Bm, Bn);
CHAMELEON_END_ACCESS_DECLARATION;
/* Callback for profiling information */
callback = options->profiling ? cl_ztpmlqt_callback : NULL;
/* Refine name */
cl_name = (L == 0) ? "ztsmlqt" : "zttmlqt";
rt_starpu_insert_task(
codelet,
/* Task codelet arguments */
STARPU_VALUE, &side, sizeof(int),
STARPU_VALUE, &trans, sizeof(int),
STARPU_VALUE, &M, sizeof(int),
......@@ -118,22 +126,21 @@ void INSERT_TASK_ztpmlqt( const RUNTIME_option_t *options,
STARPU_VALUE, &L, sizeof(int),
STARPU_VALUE, &ib, sizeof(int),
STARPU_VALUE, &(options->ws_wsize), sizeof(size_t),
/* Task handles */
STARPU_R, RTBLKADDR(V, ChamComplexDouble, Vm, Vn),
STARPU_R, RTBLKADDR(T, ChamComplexDouble, Tm, Tn),
STARPU_RW, RTBLKADDR(A, ChamComplexDouble, Am, An),
STARPU_RW, RTBLKADDR(B, ChamComplexDouble, Bm, Bn),
/* Other options */
STARPU_SCRATCH, options->ws_worker,
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
/* Common task arguments */
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
STARPU_EXECUTE_ON_WORKER, options->workerid,
#if defined(CHAMELEON_USE_MPI)
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
#endif
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
STARPU_NAME, (( L == 0 ) ? "ztsmlq" : "ztpmlqt"),
#endif
0);
(void)ib; (void)nb;
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
STARPU_NAME, cl_name,
0 );
(void)nb;
}
......@@ -13,7 +13,7 @@
* @author Mathieu Faverge
* @author Lucas Barros de Assis
* @author Florent Pruvost
* @date 2023-07-06
* @date 2024-10-18
* @precisions normal z -> s d c
*
*/
......@@ -99,7 +99,8 @@ void INSERT_TASK_ztpmqrt( const RUNTIME_option_t *options,
const CHAM_desc_t *B, int Bm, int Bn )
{
struct starpu_codelet *codelet = &cl_ztpmqrt;
void (*callback)(void*) = options->profiling ? cl_ztpmqrt_callback : NULL;
const char *cl_name;
void (*callback)(void*);
CHAMELEON_BEGIN_ACCESS_DECLARATION;
CHAMELEON_ACCESS_R(V, Vm, Vn);
......@@ -108,8 +109,15 @@ void INSERT_TASK_ztpmqrt( const RUNTIME_option_t *options,
CHAMELEON_ACCESS_RW(B, Bm, Bn);
CHAMELEON_END_ACCESS_DECLARATION;
/* Callback for profiling information */
callback = options->profiling ? cl_ztpmqrt_callback : NULL;
/* Refine name */
cl_name = (L == 0) ? "ztsmqrt" : "zttmqrt";
rt_starpu_insert_task(
codelet,
/* Task codelet arguments */
STARPU_VALUE, &side, sizeof(int),
STARPU_VALUE, &trans, sizeof(int),
STARPU_VALUE, &M, sizeof(int),
......@@ -118,22 +126,21 @@ void INSERT_TASK_ztpmqrt( const RUNTIME_option_t *options,
STARPU_VALUE, &L, sizeof(int),
STARPU_VALUE, &ib, sizeof(int),
STARPU_VALUE, &(options->ws_wsize), sizeof(size_t),
/* Task handles */
STARPU_R, RTBLKADDR(V, ChamComplexDouble, Vm, Vn),
STARPU_R, RTBLKADDR(T, ChamComplexDouble, Tm, Tn),
STARPU_RW, RTBLKADDR(A, ChamComplexDouble, Am, An),
STARPU_RW, RTBLKADDR(B, ChamComplexDouble, Bm, Bn),
/* Other options */
STARPU_SCRATCH, options->ws_worker,
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
STARPU_SCRATCH, options->ws_worker,
/* Common task arguments */
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
STARPU_EXECUTE_ON_WORKER, options->workerid,
#if defined(CHAMELEON_USE_MPI)
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
#endif
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
STARPU_NAME, (( L == 0 ) ? "ztsmqr" : "ztpmqrt"),
#endif
0);
(void)ib; (void)nb;
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
STARPU_NAME, cl_name,
0 );
(void)nb;
}
......@@ -59,7 +59,8 @@ void INSERT_TASK_ztpqrt( const RUNTIME_option_t *options,
const CHAM_desc_t *T, int Tm, int Tn )
{
struct starpu_codelet *codelet = &cl_ztpqrt;
void (*callback)(void*) = options->profiling ? cl_ztpqrt_callback : NULL;
const char *cl_name;
void (*callback)(void*);
CHAMELEON_BEGIN_ACCESS_DECLARATION;
CHAMELEON_ACCESS_RW(A, Am, An);
......@@ -67,24 +68,32 @@ void INSERT_TASK_ztpqrt( const RUNTIME_option_t *options,
CHAMELEON_ACCESS_W(T, Tm, Tn);
CHAMELEON_END_ACCESS_DECLARATION;
/* Callback for profiling information */
callback = options->profiling ? cl_ztpqrt_callback : NULL;
/* Refine name */
cl_name = (L == 0) ? "ztsqrt" : "zttqrt";
rt_starpu_insert_task(
codelet,
/* Task codelet arguments */
STARPU_VALUE, &M, sizeof(int),
STARPU_VALUE, &N, sizeof(int),
STARPU_VALUE, &L, sizeof(int),
STARPU_VALUE, &ib, sizeof(int),
/* Task handles */
STARPU_RW, RTBLKADDR(A, ChamComplexDouble, Am, An),
STARPU_RW, RTBLKADDR(B, ChamComplexDouble, Bm, Bn),
STARPU_W, RTBLKADDR(T, ChamComplexDouble, Tm, Tn),
/* Other options */
STARPU_SCRATCH, options->ws_worker,
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
/* Common task arguments */
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
STARPU_EXECUTE_ON_WORKER, options->workerid,
#if defined(CHAMELEON_USE_MPI)
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
#endif
STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
STARPU_NAME, cl_name,
0 );
(void)ib; (void)nb;
(void)nb;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment