Skip to content
Snippets Groups Projects

[Fix] Producer clone and Tensor copy

Merged Maxence Naud requested to merge fix_207-producer-clone into dev

Context

Closes #207 (closed)

Major modifications

  • Tensor

    • add compound assignment operator (+=, -=, *=, /=) with Tensor and arithmetic values
    • add operator(+, -, *, /) with arithmetic values
    • add friend symetric operator (+, -, *) with arithmetic values
    • add fmt parsing function (now you can display a Tensor with fmt)
    • Add move assignment operator
    • Fix 'Tensor::clone()' if original Tensor has no implementation
    • Change Tensor::operator= behaviour to always perform a shallow copy in case of copy constructor/assignment operator calls
  • Pop_Op: fix kernel that should not be inplace

  • Data: add copy/move constructor/assignment operator

Edited by Maxence Naud

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
140 // return *this;
141 // }
142 // resize(other.dims(), other.strides());
143 // setDataType(other.dataType(), false); // do not convert existing data
144 // if (other.hasImpl()) {
145 // if (hasImpl()) {
146 // // copyFrom(other);
147 // // } else {
148 // // Perform a shallow copy only
149 // setImpl(other.mImpl, other.mImplOffset);
150 // }
151 // } else {
152 // setImpl(nullptr);
153 // }
154 // return *this;
155 // }
  • I confirm that it fixes the issue. But I am not sure deep dwon about what was the issue, I will investigate a bit more.

    Furthermore, the fix creates 2 fails in aidge_learning:

    5 - [learning/Adam] update (Failed) 6 - [learning/SGD] update (Failed)

    I will investigate on this.

  • requested review from @olivierbichler

  • Author Maintainer

    OpenCV module fixed in aidge_backend_opencv!22 (merged)

  • Maxence Naud added 2 commits

    added 2 commits

    • 3f12c96d - enhance: add debug details for tensor comparison
    • 4cd0fd80 - Upd: Tensor operators and fmt display

    Compare with previous version

  • mentioned in merge request aidge_learning!24 (merged)

  • Author Maintainer

    Learning module fixed in aidge_learning!24 (merged)

  • Maxence Naud changed the description

    changed the description

  • Cyril Moineau approved this merge request

    approved this merge request

  • Maxence Naud added 10 commits

    added 10 commits

    • 4cd0fd80...9fd586b0 - 2 commits from branch dev
    • 7e4e784d - Add copy/move constructor/assignment operator for Data class
    • 77d70664 - Improve copy/move/clone behaviour consistency
    • 2e5ace67 - Add python binding for 'Operator::clone' enabling deep copy of operators in Python
    • 39fe5ef8 - Fix 'Producer_Op::clone' to create a new producer and not use shallow copy
    • b3a41e3d - Fix 'Pop_Op::forward' that should not be inplace
    • 49abcf60 - Small improvements of some tests
    • 84bef9d2 - enhance: add debug details for tensor comparison
    • 5cc265ab - Upd: Tensor operators and fmt display

    Compare with previous version

  • Maxence Naud enabled an automatic merge when all merge checks for 5cc265ab pass

    enabled an automatic merge when all merge checks for 5cc265ab pass

  • Maxence Naud mentioned in commit 9295445c

    mentioned in commit 9295445c

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading