-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[MXNET-117] [WIP] [DO NOT MERGE] Sparse operator broadcast_mul/div(csr, dense) = csr #10150
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,8 +120,13 @@ Example:: | |
| broadcast_mul(x, y) = [[ 0., 0., 0.], | ||
| [ 1., 1., 1.]] | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to clarify what's supported/not supported in doc like https://mxnet.incubator.apache.org/versions/master/api/python/ndarray/sparse.html#mxnet.ndarray.sparse.dot
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please only add the docs for broadcast_mul here. |
||
| Supported sparse operations: | ||
| broadcast_mul(csr, dense(1D)) = csr | ||
|
|
||
| )code" ADD_FILELINE) | ||
| .set_attr<FCompute>("FCompute<cpu>", BinaryBroadcastCompute<cpu, op::mshadow_op::mul>) | ||
| .set_attr<FComputeEx>("FComputeEx<cpu>", BinaryBroadcastComputeCsrEx<cpu, op::mshadow_op::mul>) | ||
| .set_attr<FInferStorageType>("FInferStorageType", BinaryBroadcastMulStorageType) | ||
| .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_broadcast_mul"}); | ||
|
|
||
|
|
||
|
|
@@ -154,8 +159,13 @@ Example:: | |
| broadcast_div(x, y) = [[ 3., 3., 3.], | ||
| [ 2., 2., 2.]] | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please update doc for broadcast_div
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| Supported sparse operations: | ||
| broadcast_div(csr, dense(1D)) = csr | ||
|
|
||
| )code" ADD_FILELINE) | ||
| .set_attr<FCompute>("FCompute<cpu>", BinaryBroadcastCompute<cpu, op::mshadow_op::div>) | ||
| .set_attr<FComputeEx>("FComputeEx<cpu>", BinaryBroadcastComputeCsrEx<cpu, op::mshadow_op::div>) | ||
| .set_attr<FInferStorageType>("FInferStorageType", BinaryBroadcastMulStorageType) | ||
| .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_broadcast_div"}); | ||
|
|
||
| NNVM_REGISTER_OP(_backward_broadcast_div) | ||
|
|
||
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.
col_vec could be part of the template
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.
This flag may actually be abandoned later, will do if it still exists later.