Mentions légales du service

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

starpu/codelet: New version of the potrf starpu codelet

parent c80d08ff
No related branches found
No related tags found
1 merge request!512Restructuration of the codelets
......@@ -29,11 +29,11 @@
#include "runtime_codelet_z.h"
struct cl_zpotrf_args_s {
cham_uplo_t uplo;
int n;
int iinfo;
cham_uplo_t uplo;
int n;
int iinfo;
RUNTIME_sequence_t *sequence;
RUNTIME_request_t *request;
RUNTIME_request_t *request;
};
#if !defined(CHAMELEON_SIMULATION)
......@@ -65,14 +65,15 @@ CODELETS( zpotrf, cl_zpotrf_cpu_func, cl_zpotrf_cuda_func, STARPU_CUDA_ASYNC )
CODELETS_CPU( zpotrf, cl_zpotrf_cpu_func )
#endif
#if defined(CHAMELEON_STARPU_USE_INSERT)
void INSERT_TASK_zpotrf( const RUNTIME_option_t *options,
cham_uplo_t uplo, int n, int nb,
const CHAM_desc_t *A, int Am, int An,
int iinfo )
{
struct cl_zpotrf_args_s *clargs = NULL;
void (*callback)(void*);
int exec = 0;
struct cl_zpotrf_args_s *clargs = NULL;
int exec = 0;
const char *cl_name = "zpotrf";
/* Handle cache */
......@@ -114,3 +115,69 @@ void INSERT_TASK_zpotrf( const RUNTIME_option_t *options,
(void)nb;
}
#else
void INSERT_TASK_zpotrf( const RUNTIME_option_t *options,
cham_uplo_t uplo, int n, int nb,
const CHAM_desc_t *A, int Am, int An,
int iinfo )
{
INSERT_TASK_COMMON_PARAMETERS( zpotrf, 1 );
/*
* Set the data handles and initialize exchanges if needed
*/
starpu_cham_exchange_init_params( options, &params, A->get_rankof( A, Am, An ) );
starpu_cham_exchange_data_before_execution( options, params, &nbdata, descrs, A, Am, An, STARPU_RW );
/*
* Not involved, let's return
*/
if ( nbdata == 0 ) {
return;
}
if ( params.do_execute )
{
int ret;
struct starpu_task *task = starpu_task_create();
task->cl = cl;
/* Set codelet parameters */
clargs = malloc( sizeof( struct cl_zpotrf_args_s ) );
clargs->uplo = uplo;
clargs->n = n;
clargs->iinfo = iinfo;
clargs->sequence = options->sequence;
clargs->request = options->request;
task->cl_arg = clargs;
task->cl_arg_size = sizeof( struct cl_zpotrf_args_s );
task->cl_arg_free = 1;
/* Set common parameters */
starpu_cham_task_set_options( options, task, nbdata, descrs, cl_zpotrf_callback );
/* Flops */
task->flops = flops_zpotrf( n );
/* Refine name */
task->name = chameleon_codelet_name( cl_name, 1,
A->get_blktile( A, Am, An ) );
ret = starpu_task_submit( task );
if ( ret == -ENODEV ) {
task->destroy = 0;
starpu_task_destroy( task );
chameleon_error( "INSERT_TASK_zpotrf", "Failed to submit the task to StarPU" );
return;
}
}
starpu_cham_task_exchange_data_after_execution( options, params, nbdata, descrs );
(void)nb;
}
#endif
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