Skip to content

Commit

Permalink
Merge pull request #310 from devreal/hotfix-device-execution
Browse files Browse the repository at this point in the history
Hotfixes for device execution
  • Loading branch information
devreal authored Nov 25, 2024
2 parents 334b83d + d623e87 commit 59e7452
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions ttg/ttg/device/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ namespace ttg::device {
}


template <std::size_t i, typename valueT, typename... out_keysT, typename... out_valuesT,
ttg::Runtime Runtime = ttg::ttg_runtime>
template <std::size_t i, typename valueT, ttg::Runtime Runtime = ttg::ttg_runtime>
inline detail::send_t sendv(valueT &&value) {
return sendv(i, std::forward<valueT>(value));
}
Expand Down Expand Up @@ -283,8 +282,7 @@ namespace ttg::device {
}
}

template <size_t KeyId, size_t I, size_t... Is, typename... RangesT, typename valueT,
typename... out_keysT, typename... out_valuesT>
template <size_t KeyId, size_t I, size_t... Is, typename... RangesT, typename valueT>
inline void prepare_broadcast(const std::tuple<RangesT...> &keylists, valueT &&value) {
using key_t = typename broadcast_keylist_trait<
std::tuple_element_t<KeyId, std::tuple<std::remove_reference_t<RangesT>...>>
Expand Down
3 changes: 2 additions & 1 deletion ttg/ttg/parsec/ttg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,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<uint64_t>::max(); // used internally
gpu_task->pushout = 0;
gpu_task->submit = &TT::device_static_submit<Space>;

Expand Down Expand Up @@ -3840,6 +3840,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 */
Expand Down

0 comments on commit 59e7452

Please sign in to comment.