You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/22 04:36:33 UTC
[GitHub] eric-haibin-lin opened a new issue #9176: row_sparse ndarray + 0 should not return dense ndarray
eric-haibin-lin opened a new issue #9176: row_sparse ndarray + 0 should not return dense ndarray
URL: https://github.com/apache/incubator-mxnet/issues/9176
Currently `nd._plus_scalar(row_sparse, 0)` and `nd._minus_scalar(row_sparse, 0)` return dense NDArray. Instead it can return a row-sparse NDArray directly. This is causing extra conversions when checkpointing the model, as `module.get_params` calls [this](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/module/executor_group.py#L414-L416) which in turn calls `nd._plus_scalar(row_sparse, 0)`.
To support sparse ndarray output for these two operators we just need to update the infer storage logic [here](https://github.com/apache/incubator-mxnet/blob/05047ad8fee4e8ee63ae2b7f96e7e9c7684fa4a0/src/operator/tensor/elemwise_binary_scalar_op_basic.cc#L61-L66)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services