This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-294] Fix element wise multiply for csr ndarrays #10452
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can you add a test which calls elemwise_mul with same ndarray ? |
Thanks, added |
anirudh2290
reviewed
Apr 9, 2018
if (!same_lhs_rhs) { | ||
OpBase::FillDense<DType>(s, rhs_row.shape_.Size(), DType(0), req, rhs_row.dptr_); | ||
} | ||
OpBase::FillDense<DType>(s, rhs_row.shape_.Size(), DType(0), req, rhs_row.dptr_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its the same_lhs_rhs can we point to the same tensor for both lhs and rhs instead of calling filldense for rhs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion, changed
Seems like a flaky test, opened an issue for the same: #10476. Can you please retrigger. |
anirudh2290
approved these changes
Apr 10, 2018
@anirudh2290 Build passed |
anirudh2290
approved these changes
Apr 10, 2018
@eric-haibin-lin can this be merged ? |
rahul003
added a commit
to rahul003/mxnet
that referenced
this pull request
Jun 4, 2018
* initialize rhs * add test for elemwise op on same array * dont declare memory for rhs if same array * dont declare memory for rhs if same array * assign lhs to rhs if same arr * whitespace changes * lint fix * trigger ci
zheng-da
pushed a commit
to zheng-da/incubator-mxnet
that referenced
this pull request
Jun 28, 2018
* initialize rhs * add test for elemwise op on same array * dont declare memory for rhs if same array * dont declare memory for rhs if same array * assign lhs to rhs if same arr * whitespace changes * lint fix * trigger ci
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes Issue #10431
JIRA
Tensor value was being used without initialization causing garbage values to crop up and make the product wrong.
First use with
+=
https://github.com/apache/incubator-mxnet/blob/6f6a1dc4d350dcec3058abbe4ca5123b5fce536e/src/operator/tensor/elemwise_binary_op-inl.h#L339
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
@eric-haibin-lin @anirudh2290 @cjolivier01 Please review