From 78d77a1ebcced00334583aaded7e8e0dcda933a8 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Thu, 21 Nov 2024 09:03:23 -0500 Subject: [PATCH 1/3] Destroy device coroutine once all sends have been issued Signed-off-by: Joseph Schuchart --- ttg/ttg/parsec/ttg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ttg/ttg/parsec/ttg.h b/ttg/ttg/parsec/ttg.h index 47ab79068..b0b94a902 100644 --- a/ttg/ttg/parsec/ttg.h +++ b/ttg/ttg/parsec/ttg.h @@ -3837,6 +3837,7 @@ namespace ttg_parsec { task->tt->set_outputs_tls_ptr(old_output_tls_ptr); detail::parsec_ttg_caller = nullptr; } + dev_task.destroy(); // safe to destroy the coroutine now } #endif // TTG_HAVE_DEVICE /* the coroutine should have completed and we cannot access the promise anymore */ From 1978022af7089b6ec4be6c9e6dc122472f9ffebc Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Thu, 21 Nov 2024 09:08:51 -0500 Subject: [PATCH 2/3] Remove more superfluous parameter packs from device sendv/bcast Signed-off-by: Joseph Schuchart --- ttg/ttg/device/task.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ttg/ttg/device/task.h b/ttg/ttg/device/task.h index 476119886..a6b83eaf2 100644 --- a/ttg/ttg/device/task.h +++ b/ttg/ttg/device/task.h @@ -244,8 +244,7 @@ namespace ttg::device { } - template + template inline detail::send_t sendv(valueT &&value) { return sendv(i, std::forward(value)); } @@ -283,8 +282,7 @@ namespace ttg::device { } } - template + template inline void prepare_broadcast(const std::tuple &keylists, valueT &&value) { using key_t = typename broadcast_keylist_trait< std::tuple_element_t...>> From d623e873c743cc2f3bf2f77423641297c3c64c0d Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Thu, 21 Nov 2024 09:10:55 -0500 Subject: [PATCH 3/3] PaRSEC requires last_data_check_epoch to be initialized to non-zero No dox, no problem. Signed-off-by: Joseph Schuchart --- ttg/ttg/parsec/ttg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttg/ttg/parsec/ttg.h b/ttg/ttg/parsec/ttg.h index b0b94a902..27755eea5 100644 --- a/ttg/ttg/parsec/ttg.h +++ b/ttg/ttg/parsec/ttg.h @@ -1507,7 +1507,7 @@ namespace ttg_parsec { PARSEC_OBJ_CONSTRUCT(gpu_task, parsec_list_item_t); gpu_task->ec = parsec_task; gpu_task->task_type = 0; // user task - gpu_task->last_data_check_epoch = 0; // used internally + gpu_task->last_data_check_epoch = std::numeric_limits::max(); // used internally gpu_task->pushout = 0; gpu_task->submit = &TT::device_static_submit;