Commit 22869caf authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Add codelets in all three runtimes

parent eb02ab84
......@@ -98,7 +98,7 @@
*
* @param[out] WORK
* Workspace array of size LDWORK-by-NB.
* LDWORK = N if side =MorseLeft, or M if side = MorseRight.
* LDWORK = N if side = MorseLeft, or M if side = MorseRight.
*
*******************************************************************************
*
......
......@@ -26,6 +26,84 @@
#
###
# List of codelets required by all runtimes
# -----------------------------------------
set(CODELETS_ZSRC
codelets/codelet_ztile_zero.c
codelets/codelet_zasum.c
##################
# BLAS 1
##################
codelets/codelet_zaxpy.c
##################
# BLAS 3
##################
codelets/codelet_zgemm.c
codelets/codelet_zhemm.c
codelets/codelet_zher2k.c
codelets/codelet_zherk.c
codelets/codelet_zsymm.c
codelets/codelet_zsyr2k.c
codelets/codelet_zsyrk.c
codelets/codelet_ztrmm.c
codelets/codelet_ztrsm.c
##################
# LAPACK
##################
codelets/codelet_zgeadd.c
codelets/codelet_zlascal.c
codelets/codelet_zgelqt.c
codelets/codelet_zgeqrt.c
codelets/codelet_zgessm.c
codelets/codelet_zgessq.c
codelets/codelet_zgetrf.c
codelets/codelet_zgetrf_incpiv.c
codelets/codelet_zgetrf_nopiv.c
codelets/codelet_zhe2ge.c
codelets/codelet_zherfb.c
codelets/codelet_zhessq.c
codelets/codelet_zlacpy.c
codelets/codelet_zlange.c
codelets/codelet_zlanhe.c
codelets/codelet_zlansy.c
codelets/codelet_zlantr.c
codelets/codelet_zlaset2.c
codelets/codelet_zlaset.c
codelets/codelet_zlatro.c
codelets/codelet_zlauum.c
codelets/codelet_zplghe.c
codelets/codelet_zplgsy.c
codelets/codelet_zplrnt.c
codelets/codelet_zplssq.c
codelets/codelet_zpotrf.c
codelets/codelet_zssssm.c
codelets/codelet_zsyssq.c
codelets/codelet_zsytrf_nopiv.c
codelets/codelet_ztpqrt.c
codelets/codelet_ztpmqrt.c
codelets/codelet_ztradd.c
codelets/codelet_ztrasm.c
codelets/codelet_ztrssq.c
codelets/codelet_ztrtri.c
codelets/codelet_ztslqt.c
codelets/codelet_ztsmlq.c
codelets/codelet_ztsmqr.c
codelets/codelet_ztsmlq_hetra1.c
codelets/codelet_ztsmqr_hetra1.c
codelets/codelet_ztsqrt.c
codelets/codelet_ztstrf.c
codelets/codelet_zttlqt.c
codelets/codelet_zttmlq.c
codelets/codelet_zttmqr.c
codelets/codelet_zttqrt.c
codelets/codelet_zunmlq.c
codelets/codelet_zunmqr.c
##################
# BUILD
##################
codelets/codelet_zbuild.c
)
# Check for the subdirectories
# ----------------------------
if( CHAMELEON_SCHED_QUARK )
......
......@@ -88,77 +88,7 @@ set(RUNTIME_COMMON
# ------------------------------------------------------
set(RUNTIME_SRCS_GENERATED "")
set(ZSRC
codelets/codelet_ztile_zero.c
codelets/codelet_zasum.c
##################
# BLAS 1
##################
codelets/codelet_zaxpy.c
##################
# BLAS 3
##################
codelets/codelet_zgemm.c
codelets/codelet_zhemm.c
codelets/codelet_zher2k.c
codelets/codelet_zherk.c
codelets/codelet_zsymm.c
codelets/codelet_zsyr2k.c
codelets/codelet_zsyrk.c
codelets/codelet_ztrmm.c
codelets/codelet_ztrsm.c
##################
# LAPACK
##################
codelets/codelet_zgeadd.c
codelets/codelet_zlascal.c
codelets/codelet_zgelqt.c
codelets/codelet_zgeqrt.c
codelets/codelet_zgessm.c
codelets/codelet_zgessq.c
codelets/codelet_zgetrf.c
codelets/codelet_zgetrf_incpiv.c
codelets/codelet_zgetrf_nopiv.c
codelets/codelet_zhe2ge.c
codelets/codelet_zherfb.c
codelets/codelet_zhessq.c
codelets/codelet_zlacpy.c
codelets/codelet_zlange.c
codelets/codelet_zlanhe.c
codelets/codelet_zlansy.c
codelets/codelet_zlantr.c
codelets/codelet_zlaset2.c
codelets/codelet_zlaset.c
codelets/codelet_zlatro.c
codelets/codelet_zlauum.c
codelets/codelet_zplghe.c
codelets/codelet_zplgsy.c
codelets/codelet_zplrnt.c
codelets/codelet_zplssq.c
codelets/codelet_zpotrf.c
codelets/codelet_zssssm.c
codelets/codelet_zsyssq.c
codelets/codelet_zsytrf_nopiv.c
codelets/codelet_ztradd.c
codelets/codelet_ztrasm.c
codelets/codelet_ztrssq.c
codelets/codelet_ztrtri.c
codelets/codelet_ztslqt.c
codelets/codelet_ztsmlq.c
codelets/codelet_ztsmqr.c
codelets/codelet_ztsmlq_hetra1.c
codelets/codelet_ztsmqr_hetra1.c
codelets/codelet_ztsqrt.c
codelets/codelet_ztstrf.c
codelets/codelet_zttlqt.c
codelets/codelet_zttmlq.c
codelets/codelet_zttmqr.c
codelets/codelet_zttqrt.c
codelets/codelet_zunmlq.c
codelets/codelet_zunmqr.c
##################
# BUILD
##################
codelets/codelet_zbuild.c
${CODELETS_ZSRC}
)
precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"
......
/**
*
* @copyright (c) 2009-2016 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelet_ztpqrt.c
*
* MORSE codelets kernel
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 0.9.0
* @author Mathieu Faverge
* @date 2016-12-15
* @precisions normal z -> s d c
*
**/
#include "runtime/parsec/include/morse_parsec.h"
static int
CORE_ztpmqrt_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *side;
MORSE_enum *trans;
int *M;
int *N;
int *K;
int *L;
int *ib;
const MORSE_Complex64_t *V;
int *ldv;
const MORSE_Complex64_t *T;
int *ldt;
MORSE_Complex64_t *A;
int *lda;
MORSE_Complex64_t *B;
int *ldb;
MORSE_Complex64_t *WORK;
dague_dtd_unpack_args(
this_task,
UNPACK_VALUE, &side,
UNPACK_VALUE, &trans,
UNPACK_VALUE, &M,
UNPACK_VALUE, &N,
UNPACK_VALUE, &K,
UNPACK_VALUE, &L,
UNPACK_VALUE, &ib,
UNPACK_DATA, &V,
UNPACK_VALUE, &ldv,
UNPACK_DATA, &T,
UNPACK_VALUE, &ldt,
UNPACK_DATA, &A,
UNPACK_VALUE, &lda,
UNPACK_DATA, &B,
UNPACK_VALUE, &ldb,
UNPACK_SCRATCH, &WORK );
CORE_ztpmqrt( *side, *trans, *M, *N, *K, *L, *ib,
V, *ldv, T, *ldt, A, *lda, B, *ldb, WORK );
return 0;
}
void MORSE_TASK_ztpmqrt( const MORSE_option_t *options,
MORSE_enum side, MORSE_enum trans,
int M, int N, int K, int L, int ib, int nb,
const MORSE_desc_t *V, int Vm, int Vn, int ldv,
const MORSE_desc_t *T, int Tm, int Tn, int ldt,
const MORSE_desc_t *A, int Am, int An, int lda,
const MORSE_desc_t *B, int Bm, int Bn, int ldb )
{
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
dague_insert_task(
DAGUE_dtd_handle, CORE_ztpmqrt_parsec, "tpmqrt",
sizeof(MORSE_enum), &side, VALUE,
sizeof(MORSE_enum), &trans, VALUE,
sizeof(int), &M, VALUE,
sizeof(int), &N, VALUE,
sizeof(int), &K, VALUE,
sizeof(int), &L, VALUE,
sizeof(int), &ib, VALUE,
PASSED_BY_REF, RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), INPUT | REGION_FULL,
sizeof(int), &ldv, VALUE,
PASSED_BY_REF, RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), INPUT | REGION_FULL,
sizeof(int), &ldt, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT | REGION_FULL,
sizeof(int), &lda, VALUE,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT | REGION_FULL,
sizeof(int), &ldb, VALUE,
sizeof(MORSE_Complex64_t)*ib*nb, NULL, SCRATCH,
0);
}
/**
*
* @copyright (c) 2009-2016 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelet_ztpqrt.c
*
* MORSE codelets kernel
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 0.9.0
* @author Mathieu Faverge
* @date 2016-12-15
* @precisions normal z -> s d c
*
**/
#include "runtime/parsec/include/morse_parsec.h"
static int
CORE_ztpqrt_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
int *M;
int *N;
int *L;
int *ib;
MORSE_Complex64_t *A;
int *lda;
MORSE_Complex64_t *B;
int *ldb;
MORSE_Complex64_t *T;
int *ldt;
MORSE_Complex64_t *WORK;
dague_dtd_unpack_args(
this_task,
UNPACK_VALUE, &M,
UNPACK_VALUE, &N,
UNPACK_VALUE, &L,
UNPACK_VALUE, &ib,
UNPACK_DATA, &A,
UNPACK_VALUE, &lda,
UNPACK_DATA, &B,
UNPACK_VALUE, &ldb,
UNPACK_DATA, &T,
UNPACK_VALUE, &ldt,
UNPACK_SCRATCH, &WORK );
CORE_ztpqrt( *M, *N, *L, *ib,
A, *lda, B, *ldb, T, *ldt, WORK );
return 0;
}
void MORSE_TASK_ztpqrt( const MORSE_option_t *options,
int M, int N, int L, int ib, int nb,
const MORSE_desc_t *A, int Am, int An, int lda,
const MORSE_desc_t *B, int Bm, int Bn, int ldb,
const MORSE_desc_t *T, int Tm, int Tn, int ldt )
{
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
dague_insert_task(
DAGUE_dtd_handle, CORE_ztpqrt_parsec, "tpqrt",
sizeof(int), &M, VALUE,
sizeof(int), &N, VALUE,
sizeof(int), &L, VALUE,
sizeof(int), &ib, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT | REGION_U | REGION_D,
sizeof(int), &lda, VALUE,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT | REGION_FULL,
sizeof(int), &ldb, VALUE,
PASSED_BY_REF, RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), INOUT | REGION_FULL,
sizeof(int), &ldt, VALUE,
sizeof(MORSE_Complex64_t)*ib*nb, NULL, SCRATCH,
0);
}
......@@ -86,77 +86,7 @@ set(RUNTIME_COMMON
# ------------------------------------------------------
set(RUNTIME_SRCS_GENERATED "")
set(ZSRC
codelets/codelet_ztile_zero.c
codelets/codelet_zasum.c
##################
# BLAS 1
##################
codelets/codelet_zaxpy.c
##################
# BLAS 3
##################
codelets/codelet_zgemm.c
codelets/codelet_zhemm.c
codelets/codelet_zher2k.c
codelets/codelet_zherk.c
codelets/codelet_zsymm.c
codelets/codelet_zsyr2k.c
codelets/codelet_zsyrk.c
codelets/codelet_ztrmm.c
codelets/codelet_ztrsm.c
##################
# LAPACK
##################
codelets/codelet_zgeadd.c
codelets/codelet_zlascal.c
codelets/codelet_zgelqt.c
codelets/codelet_zgeqrt.c
codelets/codelet_zgessm.c
codelets/codelet_zgessq.c
codelets/codelet_zgetrf.c
codelets/codelet_zgetrf_incpiv.c
codelets/codelet_zgetrf_nopiv.c
codelets/codelet_zhe2ge.c
codelets/codelet_zherfb.c
codelets/codelet_zhessq.c
codelets/codelet_zlacpy.c
codelets/codelet_zlange.c
codelets/codelet_zlanhe.c
codelets/codelet_zlansy.c
codelets/codelet_zlantr.c
codelets/codelet_zlaset2.c
codelets/codelet_zlaset.c
codelets/codelet_zlatro.c
codelets/codelet_zlauum.c
codelets/codelet_zplghe.c
codelets/codelet_zplgsy.c
codelets/codelet_zplrnt.c
codelets/codelet_zplssq.c
codelets/codelet_zpotrf.c
codelets/codelet_zssssm.c
codelets/codelet_zsyssq.c
codelets/codelet_zsytrf_nopiv.c
codelets/codelet_ztradd.c
codelets/codelet_ztrasm.c
codelets/codelet_ztrssq.c
codelets/codelet_ztrtri.c
codelets/codelet_ztslqt.c
codelets/codelet_ztsmlq.c
codelets/codelet_ztsmqr.c
codelets/codelet_ztsmlq_hetra1.c
codelets/codelet_ztsmqr_hetra1.c
codelets/codelet_ztsqrt.c
codelets/codelet_ztstrf.c
codelets/codelet_zttlqt.c
codelets/codelet_zttmlq.c
codelets/codelet_zttmqr.c
codelets/codelet_zttqrt.c
codelets/codelet_zunmlq.c
codelets/codelet_zunmqr.c
##################
# BUILD
##################
codelets/codelet_zbuild.c
${CODELETS_ZSRC}
)
precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"
......
/**
*
* @copyright (c) 2009-2016 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelet_ztpqrt.c
*
* MORSE codelets kernel
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 0.9.0
* @author Mathieu Faverge
* @date 2016-12-15
* @precisions normal z -> s d c
*
**/
#include "runtime/quark/include/morse_quark.h"
static void
CORE_ztpmqrt_quark( Quark *quark )
{
MORSE_enum side;
MORSE_enum trans;
int M;
int N;
int K;
int L;
int ib;
const MORSE_Complex64_t *V;
int ldv;
const MORSE_Complex64_t *T;
int ldt;
MORSE_Complex64_t *A;
int lda;
MORSE_Complex64_t *B;
int ldb;
MORSE_Complex64_t *WORK;
quark_unpack_args_16( quark, side, trans, M, N, K, L, ib,
V, ldv, T, ldt, A, lda, B, ldb, WORK );
CORE_ztpmqrt( side, trans, M, N, K, L, ib,
V, ldv, T, ldt, A, lda, B, ldb, WORK );
}
void MORSE_TASK_ztpmqrt( const MORSE_option_t *options,
MORSE_enum side, MORSE_enum trans,
int M, int N, int K, int L, int ib, int nb,
const MORSE_desc_t *V, int Vm, int Vn, int ldv,
const MORSE_desc_t *T, int Tm, int Tn, int ldt,
const MORSE_desc_t *A, int Am, int An, int lda,
const MORSE_desc_t *B, int Bm, int Bn, int ldb )
{
quark_option_t *opt = (quark_option_t*)(options->schedopt);
DAG_CORE_TSMQR;
QUARK_Insert_Task(
opt->quark, CORE_ztpmqrt_quark, (Quark_Task_Flags*)opt,
sizeof(MORSE_enum), &side, VALUE,
sizeof(MORSE_enum), &trans, VALUE,
sizeof(int), &M, VALUE,
sizeof(int), &N, VALUE,
sizeof(int), &K, VALUE,
sizeof(int), &L, VALUE,
sizeof(int), &ib, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), INPUT,
sizeof(int), &ldv, VALUE,
sizeof(MORSE_Complex64_t)*ib*nb, RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), INPUT,
sizeof(int), &ldt, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT,
sizeof(int), &lda, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT,
sizeof(int), &ldb, VALUE,
sizeof(MORSE_Complex64_t)*ib*nb, NULL, SCRATCH,
0);
}
/**
*
* @copyright (c) 2009-2016 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelet_ztpqrt.c
*
* MORSE codelets kernel
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 0.9.0
* @author Mathieu Faverge
* @date 2016-12-15
* @precisions normal z -> s d c
*
**/
#include "runtime/quark/include/morse_quark.h"
static void
CORE_ztpqrt_quark( Quark *quark )
{
int M;
int N;
int L;
int ib;
MORSE_Complex64_t *A;
int lda;
MORSE_Complex64_t *B;
int ldb;
MORSE_Complex64_t *T;
int ldt;
MORSE_Complex64_t *WORK;
quark_unpack_args_11( quark, M, N, L, ib,
A, lda, B, ldb, T, ldt, WORK );
CORE_ztpqrt( M, N, L, ib,
A, lda, B, ldb, T, ldt, WORK );
}
void MORSE_TASK_ztpqrt( const MORSE_option_t *options,
int M, int N, int L, int ib, int nb,
const MORSE_desc_t *A, int Am, int An, int lda,
const MORSE_desc_t *B, int Bm, int Bn, int ldb,
const MORSE_desc_t *T, int Tm, int Tn, int ldt )
{
quark_option_t *opt = (quark_option_t*)(options->schedopt);
DAG_CORE_TSQRT;
QUARK_Insert_Task(
opt->quark, CORE_ztpqrt_quark, (Quark_Task_Flags*)opt,
sizeof(int), &M, VALUE,
sizeof(int), &N, VALUE,
sizeof(int), &L, VALUE,
sizeof(int), &ib, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT | QUARK_REGION_U | QUARK_REGION_D,
sizeof(int), &lda, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT,
sizeof(int), &ldb, VALUE,
sizeof(MORSE_Complex64_t)*nb*ib, RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), OUTPUT,
sizeof(int), &ldt, VALUE,
sizeof(MORSE_Complex64_t)*(ib+1)*nb, NULL, SCRATCH,
0);
}
......@@ -106,77 +106,7 @@ set_source_files_properties(control/runtime_profiling.c PROPERTIES COMPILE_FLAGS
set(RUNTIME_SRCS_GENERATED "")
set(ZSRC
codelets/codelet_zcallback.c
codelets/codelet_ztile_zero.c
codelets/codelet_zasum.c
##################
# BLAS 1
##################
codelets/codelet_zaxpy.c