Commit a66c9261 authored by Mathieu Faverge's avatar Mathieu Faverge

Add missing codelet for the parsec interface

parent d13b7e8a
......@@ -27,6 +27,7 @@
#
###
cmake_minimum_required(VERSION 2.8)
# check if magma_dgetrf_incpiv_gpu is accessible in libmagma and activate it in chameleon
if ( CBLAS_FOUND AND LAPACKE_FOUND AND LAPACK_FOUND AND CUDA_FOUND AND CUDA_CUBLAS_LIBRARIES AND MAGMA_FOUND )
......@@ -73,10 +74,10 @@ precisions_rules_py(RUNTIME_COMMON_GENERATED "${ZSRC}"
TARGETDIR "control")
set(RUNTIME_COMMON
control/runtime_control.c
control/runtime_async.c
control/runtime_context.c
control/runtime_control.c
control/runtime_descriptor.c
control/runtime_async.c
control/runtime_options.c
control/runtime_profiling.c
codelets/codelet_dataflush.c
......@@ -109,6 +110,7 @@ set(ZSRC
# LAPACK
##################
codelets/codelet_zgeadd.c
codelets/codelet_zlascal.c
codelets/codelet_zgelqt.c
codelets/codelet_zgeqrt.c
codelets/codelet_zgessm.c
......@@ -116,6 +118,8 @@ set(ZSRC
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
......@@ -124,6 +128,7 @@ set(ZSRC
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
......@@ -140,6 +145,8 @@ set(ZSRC
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
......@@ -153,7 +160,6 @@ set(ZSRC
##################
codelets/codelet_zbuild.c
)
list(REMOVE_DUPLICATES ZSRC)
precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"
PRECISIONS "${CHAMELEON_PRECISION}"
......@@ -171,9 +177,9 @@ set_property(TARGET chameleon_parsec PROPERTY LINKER_LANGUAGE Fortran)
set_property(TARGET chameleon_parsec PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
target_link_libraries(chameleon_parsec coreblas ${PARSEC_LIBRARIES_DEP})
if(CHAMELEON_USE_CUDA OR CHAMELEON_USE_MAGMA)
if(CHAMELEON_USE_CUDA)
target_link_libraries(chameleon_parsec cudablas)
endif(CHAMELEON_USE_CUDA OR CHAMELEON_USE_MAGMA)
endif(CHAMELEON_USE_CUDA)
add_dependencies(chameleon_parsec
chameleon_include
......@@ -182,6 +188,10 @@ add_dependencies(chameleon_parsec
runtime_parsec_include
)
if (CHAMELEON_USE_CUDA AND NOT CHAMELEON_SIMULATION)
add_dependencies(chameleon_starpu cudablas_include)
endif()
# installation
# ------------
install(TARGETS chameleon_parsec
......
......@@ -23,7 +23,8 @@
#include "runtime/parsec/include/morse_parsec.h"
static int
CORE_dzasum_parsec(dague_execution_unit_t *context, dague_execution_context_t *this_task)
CORE_dzasum_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *storev;
MORSE_enum *uplo;
......
......@@ -28,7 +28,8 @@
*
**/
static int
CORE_zgemm_parsec(dague_execution_unit_t *context, dague_execution_context_t *this_task)
CORE_zgemm_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *transA;
MORSE_enum *transB;
......
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelet_zhe2ge.c
*
* MORSE codelets kernel
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @precisions normal z -> c d s
*
**/
#include "runtime/quark/include/morse_parsec.h"
/**
*
* @ingroup CORE_MORSE_Complex64_t
*
**/
static inline static int
CORE_zhe2ge_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *uplo;
int *M;
int *N;
const MORSE_Complex64_t *A;
int *LDA;
MORSE_Complex64_t *B;
int *LDB;
dague_dtd_unpack_args(this_task,
UNPACK_VALUE, &uplo,
UNPACK_VALUE, &M,
UNPACK_VALUE, &N,
UNPACK_DATA, &A,
UNPACK_VALUE, &LDA,
UNPACK_DATA, &B,
UNPACK_VALUE, &LDB);
CORE_zhe2ge(uplo, M, N, A, LDA, B, LDB);
}
void MORSE_TASK_zhe2ge(const MORSE_option_t *options,
MORSE_enum uplo,
int m, int n, int mb,
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);
insert_task_generic_fptr(
DAGUE_dtd_handle, CORE_zhe2ge_parsec, "he2ge",
sizeof(MORSE_enum), &uplo, VALUE,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
sizeof(MORSE_Complex64_t)*mb*mb, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT | REGION_FULL,
sizeof(int), &lda, VALUE,
sizeof(MORSE_Complex64_t)*mb*mb, RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn), OUTPUT | REGION_FULL,
sizeof(int), &ldb, VALUE,
0);
}
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file qwrapper_zherfb.c
*
* PLASMA core_blas quark wrapper
* PLASMA is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.8.0
* @author Hatem Ltaief
* @date 2010-11-15
* @precisions normal z -> c d s
*
**/
#include "runtime/quark/include/morse_parsec.h"
static int
CORE_zherfb_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *uplo;
int *n;
int *k;
int *ib;
int *nb;
MORSE_Complex64_t *A;
int *lda;
MORSE_Complex64_t *T;
int *ldt;
MORSE_Complex64_t *C;
int *ldc;
MORSE_Complex64_t *WORK;
int *ldwork;
dague_dtd_unpack_args(this_task,
UNPACK_VALUE, &uplo,
UNPACK_VALUE, &n,
UNPACK_VALUE, &k,
UNPACK_VALUE, &ib,
UNPACK_VALUE, &nb,
UNPACK_DATA, &A,
UNPACK_VALUE, &lda,
UNPACK_DATA, &T,
UNPACK_VALUE, &ldt,
UNPACK_DATA, &C,
UNPACK_VALUE, &ldc,
UNPACK_SCRATCH, &WORK,
UNPACK_VALUE, &ldwork);
CORE_zherfb(uplo, n, k, ib, nb,
A, lda, T, ldt,
C, ldc, WORK, ldwork);
}
void MORSE_TASK_zherfb(const MORSE_option_t *options,
MORSE_enum uplo,
int n, int k, int ib, int nb,
const MORSE_desc_t *A, int Am, int An, int lda,
const MORSE_desc_t *T, int Tm, int Tn, int ldt,
const MORSE_desc_t *C, int Cm, int Cn, int ldc)
{
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
insert_task_generic_fptr(
DAGUE_dtd_handle, CORE_zherfb_parsec, "herfb",
sizeof(MORSE_enum), &uplo, VALUE,
sizeof(int), &n, VALUE,
sizeof(int), &k, VALUE,
sizeof(int), &ib, VALUE,
sizeof(int), &nb, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR(A, MORSE_Complex64_t, Am, An), (uplo == MorseUpper) ? INOUT | REGION_U : INOUT | REGION_L,
sizeof(int), &lda, VALUE,
sizeof(MORSE_Complex64_t)*ib*nb, RTBLKADDR(T, MORSE_Complex64_t, Tm, Tn), INPUT | REGION_FULL,
sizeof(int), &ldt, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR(C, MORSE_Complex64_t, Cm, Cn), (uplo == MorseUpper) ? INOUT | REGION_D | REGION_U : INOUT | REGION_D | REGION_L,
sizeof(int), &ldc, VALUE,
sizeof(MORSE_Complex64_t)*2*nb*nb, NULL, SCRATCH,
sizeof(int), &nb, VALUE,
0);
}
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelet_zlascal.c
*
* MORSE codelets kernel
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.5.0
* @comment This file has been automatically generated
* from Plasma 2.5.0 for MORSE 1.0.0
* @author Julien Langou
* @author Henricus Bouwmeester
* @author Mathieu Faverge
* @author Emmanuel Agullo
* @author Cedric Castagnede
* @date 2010-11-15
* @precisions normal z -> c d s
*
**/
#include "runtime/quark/include/morse_parsec.h"
/***************************************************************************//**
*
* @ingroup CORE_MORSE_Complex64_t
*
**/
static inline int
CORE_zlascal_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *uplo;
int *M;
int *N;
MORSE_Complex64_t *alpha;
MORSE_Complex64_t *A;
int *LDA;
dague_dtd_unpack_args(this_task,
UNPACK_VALUE, &uplo,
UNPACK_VALUE, &M,
UNPACK_VALUE, &N,
UNPACK_VALUE, &alpha,
UNPACK_DATA, &A,
UNPACK_VALUE, &LDA);
CORE_zlascal(uplo, M, N, alpha, A, LDA);
}
void MORSE_TASK_zlascal(const MORSE_option_t *options,
MORSE_enum uplo,
int m, int n, int nb,
MORSE_Complex64_t alpha,
const MORSE_desc_t *A, int Am, int An, int lda)
{
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
insert_task_generic_fptr(
DAGUE_dtd_handle, CORE_zlascal_parsec, "lascal",
sizeof(MORSE_enum), &uplo, VALUE,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
sizeof(MORSE_Complex64_t), &alpha, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INOUT | REGION_FULL,
sizeof(int), &lda, VALUE,
0);
}
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
* @file qwrapper_zlatro.c
*
* PLASMA core_blas quark wrapper
* PLASMA is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.8.0
* @author Azzam Haidar
* @date 2010-11-15
* @precisions normal z -> c d s
*
**/
#include "runtime/parsec/include/morse_parsec.h"
static int
CORE_zlatro_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *uplo;
MORSE_enum *trans;
int *M;
int *N;
const MORSE_Complex64_t *A;
int *LDA;
MORSE_Complex64_t *B;
int *LDB;
dague_dtd_unpack_args(this_task,
UNPACK_VALUE, &uplo,
UNPACK_VALUE, &trans,
UNPACK_VALUE, &M,
UNPACK_VALUE, &N,
UNPACK_DATA, &A,
UNPACK_VALUE, &LDA,
UNPACK_DATA, &B,
UNPACK_VALUE, &LDB);
CORE_zlatro(uplo, trans, M, N,
A, LDA, B, LDB);
}
/***************************************************************************//**
*
**/
void MORSE_TASK_zlatro(const MORSE_option_t *options,
MORSE_enum uplo, MORSE_enum trans,
int m, int n, int mb,
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);
insert_task_generic_fptr(
DAGUE_dtd_handle, CORE_zlatro_parsec, "latro",
sizeof(MORSE_enum), &uplo, VALUE,
sizeof(MORSE_enum), &trans, VALUE,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
sizeof(MORSE_Complex64_t)*mb*mb, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT | REGION_FULL,
sizeof(int), &lda, VALUE,
sizeof(MORSE_Complex64_t)*mb*mb, RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn), OUTPUT | REGION_FULL,
sizeof(int), &ldb, VALUE,
0);
}
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelet_ztsmlq_hetra1.c
*
* PLASMA core_blas quark wrapper
* PLASMA is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.8.0
* @author Hatem Ltaief
* @author Mathieu Faverge
* @author Jakub Kurzak
* @author Azzam Haidar
* @date 2010-11-15
* @precisions normal z -> c d s
*
**/
#include "runtime/quark/include/morse_parsec.h"
static int
CORE_ztsmlq_hetra1_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *side;
MORSE_enum *trans;
int *m1;
int *n1;
int *m2;
int *n2;
int *k;
int *ib;
MORSE_Complex64_t *A1;
int *lda1;
MORSE_Complex64_t *A2;
int *lda2;
MORSE_Complex64_t *V;
int *ldv;
MORSE_Complex64_t *T;
int *ldt;
MORSE_Complex64_t *WORK;
int *ldwork;
dague_dtd_unpack_args(this_task,
UNPACK_VALUE, &side,
UNPACK_VALUE, &trans,
UNPACK_VALUE, &m1,
UNPACK_VALUE, &n1,
UNPACK_VALUE, &m2,
UNPACK_VALUE, &n2,
UNPACK_VALUE, &k,
UNPACK_VALUE, &ib,
UNPACK_DATA, &A1,
UNPACK_VALUE, &lda1,
UNPACK_DATA, &A2,
UNPACK_VALUE, &lda2,
UNPACK_DATA, &V,
UNPACK_VALUE, &ldv,
UNPACK_DATA, &T,
UNPACK_VALUE, &ldt,
UNPACK_SCRATCH, &WORK,
UNPACK_VALUE, &ldwork);
CORE_ztsmlq_hetra1(side, trans, m1, n1, m2, n2, k, ib,
A1, lda1, A2, lda2,
V, ldv, T, ldt,
WORK, ldwork);
}
void MORSE_TASK_ztsmlq_hetra1(const MORSE_option_t *options,
MORSE_enum side, MORSE_enum trans,
int m1, int n1, int m2, int n2, int k, int ib, int nb,
const MORSE_desc_t *A1, int A1m, int A1n, int lda1,
const MORSE_desc_t *A2, int A2m, int A2n, int lda2,
const MORSE_desc_t *V, int Vm, int Vn, int ldv,
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);
insert_task_generic_fptr(
DAGUE_dtd_handle, CORE_ztsmlq_hetra1_parsec, "tsmlq_hetra1",
sizeof(MORSE_enum), &side, VALUE,
sizeof(MORSE_enum), &trans, VALUE,
sizeof(int), &m1, VALUE,
sizeof(int), &n1, VALUE,
sizeof(int), &m2, VALUE,
sizeof(int), &n2, VALUE,
sizeof(int), &k, VALUE,
sizeof(int), &ib, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR(A1, MORSE_Complex64_t, A1m, A1n), INOUT | REGION_U | REGION_D,
sizeof(int), &lda1, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR(A2, MORSE_Complex64_t, A2m, A2n), INOUT | REGION_FULL,
sizeof(int), &lda2, VALUE,
sizeof(MORSE_Complex64_t)*nb*nb, RTBLKADDR(V, MORSE_Complex64_t, Vm, Vn), INPUT | REGION_FULL,
sizeof(int), &ldv, VALUE,
sizeof(MORSE_Complex64_t)*ib*nb, RTBLKADDR(T, MORSE_Complex64_t, Tm, Tn), INPUT | REGION_FULL,
sizeof(int), &ldt, VALUE,
sizeof(MORSE_Complex64_t)*ib*nb, NULL, SCRATCH,
sizeof(int), &ldwork, VALUE,
0);
}
......@@ -45,24 +45,24 @@ CORE_ztsmqr_parsec(dague_execution_unit_t *context, dague_execution_context_t *t
int *ldwork;
dague_dtd_unpack_args(this_task,
UNPACK_VALUE, &side,
UNPACK_VALUE, &trans,
UNPACK_VALUE, &m1,
UNPACK_VALUE, &n1,
UNPACK_VALUE, &m2,
UNPACK_VALUE, &n2,
UNPACK_VALUE, &k,
UNPACK_VALUE, &ib,
UNPACK_DATA, &A1,
UNPACK_VALUE, &lda1,
UNPACK_DATA, &A2,
UNPACK_VALUE, &lda2,
UNPACK_DATA, &V,
UNPACK_VALUE, &ldv,
UNPACK_DATA, &T,
UNPACK_VALUE, &ldt,
UNPACK_VALUE, &side,
UNPACK_VALUE, &trans,
UNPACK_VALUE, &m1,
UNPACK_VALUE, &n1,
UNPACK_VALUE, &m2,
UNPACK_VALUE, &n2,
UNPACK_VALUE, &k,
UNPACK_VALUE, &ib,
UNPACK_DATA, &A1,
UNPACK_VALUE, &lda1,
UNPACK_DATA, &A2,
UNPACK_VALUE, &lda2,
UNPACK_DATA, &V,
UNPACK_VALUE, &ldv,
UNPACK_DATA, &T,
UNPACK_VALUE, &ldt,
UNPACK_SCRATCH, &WORK,
UNPACK_VALUE, &ldwork
UNPACK_VALUE, &ldwork
);
......
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file codelets_ztsmqr_hetra1.c
*
* PLASMA core_blas quark wrapper
* PLASMA is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.8.0
* @author Hatem Ltaief
* @author Mathieu Faverge
* @author Jakub Kurzak
* @author Azzam Haidar
* @date 2010-11-15
* @precisions normal z -> c d s
*
**/
#include "runtime/quark/include/morse_parsec.h"
static int
CORE_ztsmqr_hetra1_parsec(dague_execution_unit_t *context,
dague_execution_context_t *this_task)
{
MORSE_enum *side;
MORSE_enum *trans;
int *m1;
int *n1;
int *m2;
int *n2;
int *k;
int *ib;
MORSE_Complex64_t *A1;
int *lda1;
MORSE_Complex64_t *A2;
int *lda2;
MORSE_Complex64_t *V;
int *ldv;
MORSE_Complex64_t *T;
int *ldt;
MORSE_Complex64_t *WORK;
int *ldwork;
dague_dtd_unpack_args(this_task,
UNPACK_VALUE, &side,
UNPACK_VALUE, &trans,