cjolivier01 commented on a change in pull request #9625: sparse regression
operators
URL: https://github.com/apache/incubator-mxnet/pull/9625#discussion_r165851301
##
File path: src/operator/regression_output-inl.h
##
@@ -121,6 +175,67 @@ void RegressionBackward(const nnvm::NodeAttrs& attrs,
});
}
+
+template
+inline void RegressionBackwardCSRImpl(mshadow::Stream *s,
+ const RegressionOutputParam& param,
+ const OpReqType req,
+ const NDArray &data, const NDArray
&label,
+ const NDArray &data_grad, const bool
sparse_kernel) {
+ using namespace mshadow;
+ using namespace mxnet_op;
+ using namespace csr;
+ const TShape dshape = data.shape();
+ const nnvm::dim_t num_rows = dshape[0];
+ const nnvm::dim_t row_length = dshape[1];
+ MSHADOW_IDX_TYPE_SWITCH(label.aux_type(kIndPtr), RType, {
+MSHADOW_IDX_TYPE_SWITCH(label.aux_type(kIdx), IType, {
+ MSHADOW_REAL_TYPE_SWITCH(label.dtype(), DType, {
+MXNET_ASSIGN_REQ_SWITCH(req, Req, {
+ const RType* label_indptr = label.aux_data(kIndPtr).dptr();
Review comment:
probably this 4-deep switch is what is causing the error when it gets
instantiated too many times
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:
us...@infra.apache.org
With regards,
Apache Git Services