[Fix] Producer clone and Tensor copy
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
Merge request reports
Activity
changed milestone to %aidge_core - v0.4.0
added Fix 🔥🔥 TopicTensor labels
requested review from @cmoineau
assigned to @pineapple
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 // } Yes I think it should be kept for now because it shows how to perform a copy between different backends
Edited by Maxence Naud
mentioned in merge request aidge_backend_opencv!22 (merged)
requested review from @olivierbichler
OpenCV module fixed in aidge_backend_opencv!22 (merged)
added StatusReview Ready label
mentioned in merge request aidge_learning!24 (merged)
Learning module fixed in aidge_learning!24 (merged)
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
Toggle commit list-
4cd0fd80...9fd586b0 - 2 commits from branch
enabled an automatic merge when all merge checks for 5cc265ab pass
mentioned in commit 9295445c