Skip to content

Commit

Permalink
Hotfix for assert in ttg_data_copy
Browse files Browse the repository at this point in the history
This needs to be carefully investigated: when moving a Tensor
into another Tensor the underlying Buffer does not register its data
properly because the buffer thinks it's already been moved.

This change forces re-registration everytime but there might be a catch...

Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
  • Loading branch information
devreal committed Jul 22, 2024
1 parent 6f5e5d8 commit 6b2092a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ttg/ttg/parsec/ttg_data_copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,15 @@ namespace ttg_parsec {
ttg_parsec_data_wrapper_t& ttg_parsec_data_wrapper_t::operator=(ttg_parsec_data_wrapper_t&& other) {
m_data = std::move(other.m_data);
/* check whether the owning ttg_data_copy has already moved us */
if (other.m_ttg_copy != m_ttg_copy) {
//if (other.m_ttg_copy != m_ttg_copy) {
/* remove from old ttg copy */
other.remove_from_owner();

if (nullptr != m_ttg_copy) {
/* register with the new ttg_copy */
m_ttg_copy->add_device_data(this);
}
}
//}
return *this;
}

Expand Down

0 comments on commit 6b2092a

Please sign in to comment.