From d53e6084786b999f5f7111916344f0a7db3d1187 Mon Sep 17 00:00:00 2001 From: nsarkauskas Date: Tue, 26 Nov 2024 13:38:40 -0800 Subject: [PATCH] need to find a way to schedule executor tasks --- .../cl/hier/allgatherv/allgatherv.c | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/cl/hier/allgatherv/allgatherv.c b/src/components/cl/hier/allgatherv/allgatherv.c index 8cb6516dfa..6710517c77 100755 --- a/src/components/cl/hier/allgatherv/allgatherv.c +++ b/src/components/cl/hier/allgatherv/allgatherv.c @@ -106,7 +106,7 @@ UCC_CL_HIER_PROFILE_FUNC(ucc_status_t, ucc_cl_hier_allgatherv_init, ucc_count_t *leader_counts = NULL; size_t dt_size = ucc_dt_size(coll_args->args.dst.info_v.datatype); int in_place = 0; - int is_contig = 0; + int is_contig = 1; ucc_schedule_t *schedule; ucc_cl_hier_schedule_t *cl_schedule; ucc_status_t status; @@ -119,6 +119,8 @@ UCC_CL_HIER_PROFILE_FUNC(ucc_status_t, ucc_cl_hier_allgatherv_init, size_t leader_disps_size; size_t total_count; void *node_gathered_data; + //ucc_ee_executor_task_args_t eargs = {0}; + //ucc_ee_executor_t *exec; schedule = &ucc_cl_hier_get_schedule(cl_team)->super.super; if (ucc_unlikely(!schedule)) { @@ -245,10 +247,23 @@ UCC_CL_HIER_PROFILE_FUNC(ucc_status_t, ucc_cl_hier_allgatherv_init, ucc_coll_init(SCORE_MAP(cl_team, NODE), &args, &tasks[n_tasks]), out, status); n_tasks++; - } - if (!is_contig) { - printf("not contig, scheduling unpack operation\n"); + if (!is_contig) { + printf("not contig, scheduling unpack operation\n"); /* + UCC_CHECK_GOTO(ucc_coll_task_get_executor(&schedule->super, &exec), out, status); + eargs.task_type = UCC_EE_EXECUTOR_TASK_COPY; + size_t disp_counter = ucc_coll_args_get_total_count(&args.args, args.args.dst.info_v.counts, team_size); + for (i = team_size - 1; i >= 0; i++) { + size_t this_rank_count = ucc_coll_args_get_count(&args.args, args.args.dst.info_v.counts, i); + disp_counter -= this_rank_count; + eargs.copy.src = PTR_OFFSET(args.args.dst.info_v.buffer, disp_counter * dt_size); + eargs.copy.dst = PTR_OFFSET(args.args.dst.info_v.buffer, ucc_coll_args_get_displacement(&args.args, args.args.dst.info_v.displacements, i) * dt_size); + eargs.copy.len = this_rank_count * dt_size; + ucc_ee_executor_task_t **ee_task_pp = NULL; + UCC_CHECK_GOTO(ucc_ee_executor_task_post(exec, &eargs, &tasks[n_tasks]), out, status); + n_tasks++; + }*/ + } } UCC_CHECK_GOTO(ucc_event_manager_subscribe(