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,
CHAM_desc_t descAB;
cham_uplo_t uplo;
int M, N, MINMN, NB, LDAB, ABn;
#if !defined(CHAMELEON_SIMULATION)
int info;
int KL, KU;
char gbbrd_vect;
#endif
chamctxt = chameleon_context_self();
if ( sequence->status != CHAMELEON_SUCCESS ) {
......@@ -205,13 +208,13 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A,
/* Convert matrix to band form */
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 */
/* On exit, AB = U (S +~ E) VT */
KL = uplo == ChamUpper ? 0 : NB;
KU = uplo == ChamUpper ? NB : 0;
/* Manage the case where only singular values are required */
char gbbrd_vect;
if ( jobu == ChamNoVec ) {
if ( jobvt == ChamNoVec ) {
gbbrd_vect = 'N';
......@@ -228,6 +231,7 @@ chameleon_pzgebrd_gb2bd( cham_job_t jobu, cham_job_t jobvt, CHAM_desc_t *A,
gbbrd_vect = 'B';
}
}
#endif
CHAMELEON_Desc_Flush( A, sequence );
CHAMELEON_Desc_Flush( &descAB, sequence );
......
......@@ -26,6 +26,7 @@ struct zprint_args_s {
const char *header;
};
#if !defined(CHAMELEON_SIMULATION)
static inline int
zprint_cpu( void *op_args,
cham_uplo_t uplo, int m, int n, int ndata,
......@@ -43,17 +44,20 @@ zprint_cpu( void *op_args,
}
assert( tileA->format & CHAMELEON_TILE_FULLRANK );
#if !defined(CHAMELEON_SIMULATION)
CORE_zprint( options->file, options->header, uplo,
tempmm, tempnn, m, n, A, lda );
#endif
return 0;
}
#endif
static cham_map_operator_t zprint_map = {
.name = "zprint",
#if !defined(CHAMELEON_SIMULATION)
.cpufunc = zprint_cpu,
#else
.cpufunc = NULL,
#endif
.cudafunc = NULL,
.hipfunc = NULL,
};
......
......@@ -21,16 +21,14 @@
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 i, m0, n;
#if !defined(CHAMELEON_SIMULATION)
{
int i, m0, n;
starpu_codelet_unpack_args( cl_arg, &m0, &n );
starpu_codelet_unpack_args( cl_arg, &m0, &n );
for( i=0; i<n; i++ ) {
ipiv[i] = m0 + i + 1;
}
for( i=0; i<n; i++ ) {
ipiv[i] = m0 + i + 1;
}
#endif
}
......
......@@ -280,9 +280,9 @@ void INSERT_TASK_zgetrf_blocked_offdiag( const RUNTIME_option_t *options,
0 );
}
static const CHAMELEON_Complex64_t zone = (CHAMELEON_Complex64_t)1.0;
#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)
{
int m, n, h, ib;
......
......@@ -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_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 mzone = (CHAMELEON_Complex64_t)-1.0;
#if !defined(CHAMELEON_SIMULATION)
static void cl_zgetrf_nopiv_percol_diag_cpu_func( void *descr[], void *cl_arg )
{
CHAM_tile_t *tileA, *tileU;
......
......@@ -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 )
{
float *valredux = redux;
......@@ -439,12 +441,14 @@ cl_cppi_redux_cpu_func(void *descr[], void *cl_arg)
return;
}
#endif
/*
* Codelet definition
*/
CODELETS_CPU(cppi_redux, cl_cppi_redux_cpu_func)
#if !defined(CHAMELEON_SIMULATION)
static void
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.diagrow, 0, size );
}
#endif
/*
* 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