Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/mshadow
Submodule mshadow updated 1 files
+1 −1 mshadow/tensor.h
9 changes: 5 additions & 4 deletions src/operator/convolution_v1-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<index_t>(
std::min(static_cast<index_t>(param_.workspace) /
(shape_colunit_.Size() + shape_dstunit_.Size()), ishape[0]),
1);
nstep_ =
std::max<index_t>(std::min(static_cast<index_t>(param_.workspace / (shape_colunit_.Size() +
shape_dstunit_.Size())),
ishape[0]),
1);

mshadow::Shape<2> scol = mshadow::Shape2(shape_colunit_[0],
shape_colunit_[1] * nstep_);
Expand Down
9 changes: 5 additions & 4 deletions src/operator/nn/deconvolution-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<index_t>(
std::min(static_cast<index_t>(param_.workspace) /
(shape_colunit_.Size() + shape_dstunit_.Size()), ishape[0]),
1);
nstep_ =
std::max<index_t>(std::min(static_cast<index_t>(param_.workspace / (shape_colunit_.Size() +
shape_dstunit_.Size())),
ishape[0]),
1);

mshadow::Shape<2> scol = mshadow::Shape2(shape_colunit_[0],
shape_colunit_[1] * nstep_);
Expand Down