Mentions légales du service

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

starpu: Protect interface codelet in simulation mode

parent a90e1709
No related branches found
No related tags found
1 merge request!518gitlab-ci-initial-cache.cmake: CMAKE_C_FLAGS must be set as a cache variable...
Pipeline #1121406 passed
...@@ -178,8 +178,11 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A, ...@@ -178,8 +178,11 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A,
CHAM_desc_t descAB; CHAM_desc_t descAB;
cham_uplo_t uplo; cham_uplo_t uplo;
int M, N, MINMN, NB, LDAB, ABn; int M, N, MINMN, NB, LDAB, ABn;
#if !defined(CHAMELEON_SIMULATION)
int info; int info;
int KL, KU; int KL, KU;
char gbbrd_vect;
#endif
chamctxt = chameleon_context_self(); chamctxt = chameleon_context_self();
if ( sequence->status != CHAMELEON_SUCCESS ) { if ( sequence->status != CHAMELEON_SUCCESS ) {
...@@ -205,13 +208,13 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A, ...@@ -205,13 +208,13 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A,
/* Convert matrix to band form */ /* Convert matrix to band form */
chameleon_pztile2band( uplo, A, &descAB, sequence, request ); chameleon_pztile2band( uplo, A, &descAB, sequence, request );
#if !defined(CHAMELEON_SIMULATION)
/* NCC = 0, C = NULL, we do not update any matrix with new singular vectors */ /* NCC = 0, C = NULL, we do not update any matrix with new singular vectors */
/* On exit, AB = U (S +~ E) VT */ /* On exit, AB = U (S +~ E) VT */
KL = uplo == ChamUpper ? 0 : NB; KL = uplo == ChamUpper ? 0 : NB;
KU = uplo == ChamUpper ? NB : 0; KU = uplo == ChamUpper ? NB : 0;
/* Manage the case where only singular values are required */ /* Manage the case where only singular values are required */
char gbbrd_vect;
if ( jobu == ChamNoVec ) { if ( jobu == ChamNoVec ) {
if ( jobvt == ChamNoVec ) { if ( jobvt == ChamNoVec ) {
gbbrd_vect = 'N'; gbbrd_vect = 'N';
...@@ -228,6 +231,7 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A, ...@@ -228,6 +231,7 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A,
gbbrd_vect = 'B'; gbbrd_vect = 'B';
} }
} }
#endif
CHAMELEON_Desc_Flush( A, sequence ); CHAMELEON_Desc_Flush( A, sequence );
CHAMELEON_Desc_Flush( &descAB, sequence ); CHAMELEON_Desc_Flush( &descAB, sequence );
......
...@@ -26,6 +26,7 @@ struct zprint_args_s { ...@@ -26,6 +26,7 @@ struct zprint_args_s {
const char *header; const char *header;
}; };
#if !defined(CHAMELEON_SIMULATION)
static inline int static inline int
zprint_cpu( void *op_args, zprint_cpu( void *op_args,
cham_uplo_t uplo, int m, int n, int ndata, cham_uplo_t uplo, int m, int n, int ndata,
...@@ -43,17 +44,20 @@ zprint_cpu( void *op_args, ...@@ -43,17 +44,20 @@ zprint_cpu( void *op_args,
} }
assert( tileA->format & CHAMELEON_TILE_FULLRANK ); assert( tileA->format & CHAMELEON_TILE_FULLRANK );
#if !defined(CHAMELEON_SIMULATION)
CORE_zprint( options->file, options->header, uplo, CORE_zprint( options->file, options->header, uplo,
tempmm, tempnn, m, n, A, lda ); tempmm, tempnn, m, n, A, lda );
#endif
return 0; return 0;
} }
#endif
static cham_map_operator_t zprint_map = { static cham_map_operator_t zprint_map = {
.name = "zprint", .name = "zprint",
#if !defined(CHAMELEON_SIMULATION)
.cpufunc = zprint_cpu, .cpufunc = zprint_cpu,
#else
.cpufunc = NULL,
#endif
.cudafunc = NULL, .cudafunc = NULL,
.hipfunc = NULL, .hipfunc = NULL,
}; };
......
...@@ -21,16 +21,14 @@ ...@@ -21,16 +21,14 @@
static void cl_ipiv_init_cpu_func(void *descr[], void *cl_arg) static void cl_ipiv_init_cpu_func(void *descr[], void *cl_arg)
{ {
#if !defined(CHAMELEON_SIMULATION)
int *ipiv = (int *)STARPU_VECTOR_GET_PTR(descr[0]); int *ipiv = (int *)STARPU_VECTOR_GET_PTR(descr[0]);
int i, m0, n;
#if !defined(CHAMELEON_SIMULATION) starpu_codelet_unpack_args( cl_arg, &m0, &n );
{
int i, m0, n;
starpu_codelet_unpack_args( cl_arg, &m0, &n );
for( i=0; i<n; i++ ) { for( i=0; i<n; i++ ) {
ipiv[i] = m0 + i + 1; ipiv[i] = m0 + i + 1;
}
} }
#endif #endif
} }
......
...@@ -280,9 +280,9 @@ void INSERT_TASK_zgetrf_blocked_offdiag( const RUNTIME_option_t *options, ...@@ -280,9 +280,9 @@ void INSERT_TASK_zgetrf_blocked_offdiag( const RUNTIME_option_t *options,
0 ); 0 );
} }
static const CHAMELEON_Complex64_t zone = (CHAMELEON_Complex64_t)1.0;
#if !defined(CHAMELEON_SIMULATION) #if !defined(CHAMELEON_SIMULATION)
static const CHAMELEON_Complex64_t zone = (CHAMELEON_Complex64_t)1.0;
static void cl_zgetrf_blocked_trsm_cpu_func(void *descr[], void *cl_arg) static void cl_zgetrf_blocked_trsm_cpu_func(void *descr[], void *cl_arg)
{ {
int m, n, h, ib; int m, n, h, ib;
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
CHAMELEON_CL_CB( zgetrf_nopiv_percol_diag, cti_handle_get_m(task->handles[0]), 0, 0, M ) CHAMELEON_CL_CB( zgetrf_nopiv_percol_diag, cti_handle_get_m(task->handles[0]), 0, 0, M )
CHAMELEON_CL_CB( zgetrf_nopiv_percol_trsm, cti_handle_get_m(task->handles[0]), 0, 0, M ) CHAMELEON_CL_CB( zgetrf_nopiv_percol_trsm, cti_handle_get_m(task->handles[0]), 0, 0, M )
#if !defined(CHAMELEON_SIMULATION)
static const CHAMELEON_Complex64_t zone = (CHAMELEON_Complex64_t) 1.0; static const CHAMELEON_Complex64_t zone = (CHAMELEON_Complex64_t) 1.0;
static const CHAMELEON_Complex64_t mzone = (CHAMELEON_Complex64_t)-1.0; static const CHAMELEON_Complex64_t mzone = (CHAMELEON_Complex64_t)-1.0;
#if !defined(CHAMELEON_SIMULATION)
static void cl_zgetrf_nopiv_percol_diag_cpu_func( void *descr[], void *cl_arg ) static void cl_zgetrf_nopiv_percol_diag_cpu_func( void *descr[], void *cl_arg )
{ {
CHAM_tile_t *tileA, *tileU; CHAM_tile_t *tileA, *tileU;
......
...@@ -355,7 +355,9 @@ struct starpu_data_interface_ops cppi_ops = ...@@ -355,7 +355,9 @@ struct starpu_data_interface_ops cppi_ops =
}; };
static int compare_pivots( cham_flttype_t type, int h, void * redux, void * input ){ #if !defined(CHAMELEON_SIMULATION)
static inline int
compare_pivots( cham_flttype_t type, int h, void * redux, void * input ){
if ( type == ChamRealFloat ) if ( type == ChamRealFloat )
{ {
float *valredux = redux; float *valredux = redux;
...@@ -439,12 +441,14 @@ cl_cppi_redux_cpu_func(void *descr[], void *cl_arg) ...@@ -439,12 +441,14 @@ cl_cppi_redux_cpu_func(void *descr[], void *cl_arg)
return; return;
} }
#endif
/* /*
* Codelet definition * Codelet definition
*/ */
CODELETS_CPU(cppi_redux, cl_cppi_redux_cpu_func) CODELETS_CPU(cppi_redux, cl_cppi_redux_cpu_func)
#if !defined(CHAMELEON_SIMULATION)
static void static void
cl_cppi_init_redux_cpu_func( void *descr[], void *cl_arg ) cl_cppi_init_redux_cpu_func( void *descr[], void *cl_arg )
{ {
...@@ -460,6 +464,7 @@ cl_cppi_init_redux_cpu_func( void *descr[], void *cl_arg ) ...@@ -460,6 +464,7 @@ cl_cppi_init_redux_cpu_func( void *descr[], void *cl_arg )
memset( cppi_redux->pivot.pivrow, 0, size ); memset( cppi_redux->pivot.pivrow, 0, size );
memset( cppi_redux->pivot.diagrow, 0, size ); memset( cppi_redux->pivot.diagrow, 0, size );
} }
#endif
/* /*
* Codelet definition * Codelet definition
......
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