Skip to content

Commit

Permalink
Merge pull request dmlc#115 from sbodenstein/master
Browse files Browse the repository at this point in the history
Fix bug in AddTakeGrad
  • Loading branch information
tqchen committed Apr 25, 2016
2 parents be90db1 + 2cce4d5 commit f08c7b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mshadow/cuda/tensor_gpu-inl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ inline void AddTakeGrad(Tensor<gpu, 2, DType> dst,
const Tensor<gpu, 2, DType> &src) {
const int kUnitBits = kMemUnitBits + 1;
dim3 dimBlock(1 << kUnitBits);
dim3 dimGrid(dst.size(1) >> kUnitBits);
dim3 dimGrid((dst.size(1) + (1 << kUnitBits) - 1) >> kUnitBits);

CHECK_EQ(dst.size(1), src.size(1)) << "AddtTakeGrad: shape mismatch";
CHECK_EQ(index.size(0), src.size(0)) << "AddtTakeGrad: shape mismatch";
Expand Down

0 comments on commit f08c7b6

Please sign in to comment.