Mentions légales du service

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

starpu/map: prevent from running a map codelet on a non defined worker

parent fdbc40c0
No related branches found
No related tags found
1 merge request!507ci: add test_starpu_cuda
...@@ -228,6 +228,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options, ...@@ -228,6 +228,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
int exec = 0; int exec = 0;
int i, readonly = 1; int i, readonly = 1;
size_t clargs_size = 0; size_t clargs_size = 0;
uint32_t where = 0;
void (*callback)(void*); void (*callback)(void*);
if ( ( ndata < 0 ) || ( ndata > 3 ) ) { if ( ( ndata < 0 ) || ( ndata > 3 ) ) {
...@@ -275,6 +276,17 @@ void INSERT_TASK_map( const RUNTIME_option_t *options, ...@@ -275,6 +276,17 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
(data[i].desc)->get_blktile( data[i].desc, m, n ) ); (data[i].desc)->get_blktile( data[i].desc, m, n ) );
} }
/* Where to execute */
if ( op_fcts->cpufunc ) {
where |= STARPU_CPU;
}
if ( op_fcts->cudafunc ) {
where |= STARPU_CUDA;
}
if ( op_fcts->hipfunc ) {
where |= STARPU_HIP;
}
/* Insert the task */ /* Insert the task */
switch( ndata ) { switch( ndata ) {
case 1: case 1:
...@@ -291,6 +303,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options, ...@@ -291,6 +303,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
STARPU_EXECUTE_ON_WORKER, options->workerid, STARPU_EXECUTE_ON_WORKER, options->workerid,
STARPU_EXECUTE_WHERE, where,
STARPU_NAME, cl_name, STARPU_NAME, cl_name,
0 ); 0 );
break; break;
...@@ -310,6 +323,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options, ...@@ -310,6 +323,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
STARPU_EXECUTE_ON_WORKER, options->workerid, STARPU_EXECUTE_ON_WORKER, options->workerid,
STARPU_EXECUTE_WHERE, where,
STARPU_NAME, cl_name, STARPU_NAME, cl_name,
0 ); 0 );
break; break;
...@@ -330,6 +344,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options, ...@@ -330,6 +344,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
STARPU_EXECUTE_ON_WORKER, options->workerid, STARPU_EXECUTE_ON_WORKER, options->workerid,
STARPU_EXECUTE_WHERE, where,
STARPU_NAME, cl_name, STARPU_NAME, cl_name,
0 ); 0 );
break; break;
......
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