diff --git a/.gitmodules b/.gitmodules index 836d824a6f5a..b0bf4a300582 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "3rdparty/mshadow"] path = 3rdparty/mshadow - url = https://github.com/dmlc/mshadow.git + url = https://github.com/ZhennanQin/mshadow.git [submodule "3rdparty/dmlc-core"] path = 3rdparty/dmlc-core url = https://github.com/dmlc/dmlc-core.git diff --git a/3rdparty/mshadow b/3rdparty/mshadow index 6dc04f7c729c..40d0a53b67e8 160000 --- a/3rdparty/mshadow +++ b/3rdparty/mshadow @@ -1 +1 @@ -Subproject commit 6dc04f7c729cd5c6c6210d5d4d2026a26ce0bfbf +Subproject commit 40d0a53b67e88f346cefe29f7351bae451b3eae9 diff --git a/src/operator/convolution_v1-inl.h b/src/operator/convolution_v1-inl.h index 758ce12d8006..e0baa4efb1d3 100644 --- a/src/operator/convolution_v1-inl.h +++ b/src/operator/convolution_v1-inl.h @@ -335,10 +335,11 @@ class ConvolutionV1Op : public Operator { oshape[2] * oshape[3]); // param_.workspace is in elements of sizeof(DType) // if param_.workspace is set to zero the nstep_ equals ishape[0] (batch) - nstep_ = std::max( - std::min(static_cast(param_.workspace) / - (shape_colunit_.Size() + shape_dstunit_.Size()), ishape[0]), - 1); + nstep_ = + std::max(std::min(static_cast(param_.workspace / (shape_colunit_.Size() + + shape_dstunit_.Size())), + ishape[0]), + 1); mshadow::Shape<2> scol = mshadow::Shape2(shape_colunit_[0], shape_colunit_[1] * nstep_); diff --git a/src/operator/nn/deconvolution-inl.h b/src/operator/nn/deconvolution-inl.h index d89a489c0183..8f1470b9eb67 100644 --- a/src/operator/nn/deconvolution-inl.h +++ b/src/operator/nn/deconvolution-inl.h @@ -459,10 +459,11 @@ class DeconvolutionOp { oshape[1] / param_.num_group, oshape[2] * oshape[3]); // See convolution for workspace calculations. nstep_ will be the effective batch size - nstep_ = std::max( - std::min(static_cast(param_.workspace) / - (shape_colunit_.Size() + shape_dstunit_.Size()), ishape[0]), - 1); + nstep_ = + std::max(std::min(static_cast(param_.workspace / (shape_colunit_.Size() + + shape_dstunit_.Size())), + ishape[0]), + 1); mshadow::Shape<2> scol = mshadow::Shape2(shape_colunit_[0], shape_colunit_[1] * nstep_);