From 7a79e244d503395b4b2dd447b08ee1312c0fd242 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Thu, 17 Oct 2024 11:33:05 +0200 Subject: [PATCH] runtime/options: add a withlacpy field to ease the switch from runtime cpy to lacpy kernel --- include/chameleon/runtime_struct.h | 3 ++- runtime/openmp/control/runtime_options.c | 5 +++-- runtime/parsec/control/runtime_options.c | 27 ++++++++++++------------ runtime/quark/control/runtime_options.c | 27 ++++++++++++------------ runtime/starpu/control/runtime_options.c | 3 ++- 5 files changed, 35 insertions(+), 30 deletions(-) diff --git a/include/chameleon/runtime_struct.h b/include/chameleon/runtime_struct.h index 72e353acc..4c1b9c521 100644 --- a/include/chameleon/runtime_struct.h +++ b/include/chameleon/runtime_struct.h @@ -17,7 +17,7 @@ * @author Cedric Castagnede * @author Florent Pruvost * @author Philippe Virouleau - * @date 2024-03-16 + * @date 2024-10-17 * */ #ifndef _chameleon_runtime_struct_h_ @@ -103,6 +103,7 @@ typedef struct runtime_option_s { int priority; /**< Define the submitted task priority */ int workerid; /**< Define the prefered worker id to perform the tasks */ int forcesub; /**< Force task submission if true */ + int withlacpy; /**< Flag to force the use of lacpy copies */ int withcuda; /**< Flag to know if cuda is enabled/disabled */ size_t ws_wsize; /**< Define the worker workspace size */ size_t ws_hsize; /**< Define the host workspace size for hybrid CPU/GPU kernel */ diff --git a/runtime/openmp/control/runtime_options.c b/runtime/openmp/control/runtime_options.c index 77f4a5132..11ecfb4de 100644 --- a/runtime/openmp/control/runtime_options.c +++ b/runtime/openmp/control/runtime_options.c @@ -11,12 +11,12 @@ * * @brief Chameleon OpenMP options routines * - * @version 1.2.0 + * @version 1.3.0 * @author Cedric Augonnet * @author Mathieu Faverge * @author Cedric Castagnede * @author Philippe Virouleau - * @date 2022-02-22 + * @date 2024-10-17 * */ #include "chameleon_openmp.h" @@ -31,6 +31,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, options->priority = RUNTIME_PRIORITY_MIN; options->workerid = -1; options->forcesub = 0; + options->withlacpy = 0; options->ws_wsize = 0; options->ws_hsize = 0; options->ws_worker = NULL; diff --git a/runtime/parsec/control/runtime_options.c b/runtime/parsec/control/runtime_options.c index edb2017e5..a4f8c0fff 100644 --- a/runtime/parsec/control/runtime_options.c +++ b/runtime/parsec/control/runtime_options.c @@ -11,10 +11,10 @@ * * @brief Chameleon PaRSEC options routines * - * @version 1.2.0 + * @version 1.3.0 * @author Reazul Hoque * @author Mathieu Faverge - * @date 2022-02-22 + * @date 2024-10-17 * */ #include "chameleon_parsec.h" @@ -22,17 +22,18 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, RUNTIME_sequence_t *sequence, RUNTIME_request_t *request ) { - options->sequence = sequence; - options->request = request; - options->profiling = CHAMELEON_STATISTICS == CHAMELEON_TRUE; - options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; - options->priority = RUNTIME_PRIORITY_MIN; - options->workerid = -1; - options->forcesub = 0; - options->ws_wsize = 0; - options->ws_hsize = 0; - options->ws_worker = NULL; - options->ws_host = NULL; + options->sequence = sequence; + options->request = request; + options->profiling = CHAMELEON_STATISTICS == CHAMELEON_TRUE; + options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; + options->priority = RUNTIME_PRIORITY_MIN; + options->workerid = -1; + options->forcesub = 0; + options->withlacpy = 0; + options->ws_wsize = 0; + options->ws_hsize = 0; + options->ws_worker = NULL; + options->ws_host = NULL; return; } diff --git a/runtime/quark/control/runtime_options.c b/runtime/quark/control/runtime_options.c index 8c0902633..5cb4ac313 100644 --- a/runtime/quark/control/runtime_options.c +++ b/runtime/quark/control/runtime_options.c @@ -11,12 +11,12 @@ * * @brief Chameleon Quark options routines * - * @version 1.2.0 + * @version 1.3.0 * @author Vijay Joshi * @author Cedric Castagnede * @author Florent Pruvost * @author Mathieu Faverge - * @date 2022-02-22 + * @date 2024-10-17 * */ #include "chameleon_quark.h" @@ -34,18 +34,19 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, qopt->flags.thread_set_to_manual_scheduling = -1; /* Initialize options */ - options->sequence = sequence; - options->request = request; - options->profiling = CHAMELEON_STATISTICS == CHAMELEON_TRUE; - options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; - options->priority = RUNTIME_PRIORITY_MIN; - options->workerid = -1; - options->forcesub = 0; + options->sequence = sequence; + options->request = request; + options->profiling = CHAMELEON_STATISTICS == CHAMELEON_TRUE; + options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; + options->priority = RUNTIME_PRIORITY_MIN; + options->workerid = -1; + options->forcesub = 0; + options->withlacpy = 0; - options->ws_wsize = 0; - options->ws_hsize = 0; - options->ws_worker = NULL; - options->ws_host = NULL; + options->ws_wsize = 0; + options->ws_hsize = 0; + options->ws_worker = NULL; + options->ws_host = NULL; /* quark in options */ qopt->quark = (Quark*)(chamctxt->schedopt); diff --git a/runtime/starpu/control/runtime_options.c b/runtime/starpu/control/runtime_options.c index 8ec2551f5..64f3b569e 100644 --- a/runtime/starpu/control/runtime_options.c +++ b/runtime/starpu/control/runtime_options.c @@ -16,7 +16,7 @@ * @author Mathieu Faverge * @author Cedric Castagnede * @author Florent Pruvost - * @date 2023-07-04 + * @date 2024-10-17 * */ #include "chameleon_starpu_internal.h" @@ -32,6 +32,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, options->priority = RUNTIME_PRIORITY_MIN; options->workerid = (schedopt == NULL) ? -1 : schedopt->workerid; options->forcesub = 0; + options->withlacpy = 0; options->withcuda = (chamctxt->ncudas > 0); options->ws_wsize = 0; options->ws_hsize = 0; -- GitLab