Skip to content

Commit

Permalink
Allow for non-coro device tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
devreal committed Dec 20, 2023
1 parent 65ffd4c commit e7bba1b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ttg/ttg/parsec/ttg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,11 @@ namespace ttg_parsec {

/* when we come back here, the flows in gpu_task are set (see register_device_memory) */

if (nullptr == task->suspended_task_address) {
/* short-cut in case the task returned immediately */
return PARSEC_HOOK_RETURN_DONE;
}

// get the device task from the coroutine handle
auto dev_task = ttg::device::detail::device_task_handle_type::from_address(task->suspended_task_address);

Expand Down Expand Up @@ -3542,10 +3547,6 @@ ttg::abort(); // should not happen

task_t *task = (task_t*)parsec_task;

if constexpr (derived_has_device_op()) {
assert(task->is_dummy() || nullptr != task->suspended_task_address);
}

/* if we still have a coroutine handle we invoke it one more time to get the sends/broadcasts */
if (task->suspended_task_address) {
#ifdef TTG_HAVE_DEVICE
Expand Down

0 comments on commit e7bba1b

Please sign in to comment.