sxjscience commented on a change in pull request #19044:
URL: https://github.com/apache/incubator-mxnet/pull/19044#discussion_r479891385
##########
File path: src/operator/numpy/np_pad_op-inl.h
##########
@@ -720,20 +729,44 @@ void NumpyPadOpImpl(const TBlob& in_data,
template<typename xpu>
void NumpyPadOpBackImpl(const TBlob& in_data,
const TBlob& out_data,
+ index_t* ishape,
+ index_t* oshape,
index_t dsize,
+ const NumpyPadParam& param,
const std::vector<OpReqType>& req,
mxnet_op::Stream<xpu> *s) {
- using namespace mxnet_op;
- using namespace mshadow;
- MSHADOW_TYPE_SWITCH_WITH_BOOL(out_data.type_flag_, DType, {
- MXNET_ASSIGN_REQ_SWITCH(req[0], req_type, {
- Kernel<pad_grad<xpu, req_type>, xpu>::Launch(
- s, dsize, out_data.dptr<DType>(), in_data.dptr<DType>());
- });
- });
+ using namespace mxnet_op;
+ using namespace mshadow;
+ int mode = param.mode;
Review comment:
Need to raise an error when mode is not constant.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]