Skip to content

Commit

Permalink
Move copy version increment to CPU hook
Browse files Browse the repository at this point in the history
The new copy versioning in PaRSEC requires this only for
CPU tasks to make sure the results are handled correctly.

Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Apr 4, 2024
1 parent ae62f5b commit 6cbb9b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/ExternalDependenciesVersions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set(TTG_TRACKED_VG_CMAKE_KIT_TAG 7ea2d4d3f8854b9e417f297fd74d6fc49aa13fd5) # used to provide "real" FindOrFetchBoost
set(TTG_TRACKED_CATCH2_VERSION 3.5.0)
set(TTG_TRACKED_MADNESS_TAG 2eb3bcf0138127ee2dbc651f1aabd3e9b0def4e3)
set(TTG_TRACKED_PARSEC_TAG 0b3140f58ad9dc78a3d64da9fd73ecc7f443ece7)
set(TTG_TRACKED_PARSEC_TAG fc18d7881059a520e73cb7ccb6b56e6da705635e)
set(TTG_TRACKED_BTAS_TAG 4e8f5233aa7881dccdfcc37ce07128833926d3c2)
set(TTG_TRACKED_TILEDARRAY_TAG 493c109379a1b64ddd5ef59f7e33b95633b68d73)

Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindOrFetchPARSEC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (NOT TARGET PaRSEC::parsec)

FetchContent_Declare(
PARSEC
GIT_REPOSITORY https://github.com/devreal/parsec-1.git
GIT_REPOSITORY https://github.com/abouteiller/parsec.git
GIT_TAG ${TTG_TRACKED_PARSEC_TAG}
)
FetchContent_MakeAvailable(PARSEC)
Expand Down
3 changes: 1 addition & 2 deletions ttg/ttg/parsec/ttg.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ namespace ttg_parsec {
inline void transfer_ownership_impl(ttg_data_copy_t *copy, int device) {
if constexpr(!std::is_const_v<std::tuple_element_t<I, typename TT::input_values_tuple_type>>) {
copy->transfer_ownership(PARSEC_FLOW_ACCESS_RW, device);
copy->inc_current_version();
}
}

Expand Down Expand Up @@ -4266,8 +4267,6 @@ struct ttg::detail::value_copy_handler<ttg::Runtime::PaRSEC> {
/* this copy won't be modified anymore so mark it as read-only */
copy->reset_readers();
}
/* the value was potentially changed, so increment version */
copy->inc_current_version();
}
/* We're coming from a writer so mark the data as modified.
* That way we can force a pushout in prepare_send if we move to read-only tasks (needed by PaRSEC). */
Expand Down

0 comments on commit 6cbb9b3

Please sign in to comment.