Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-1253] fix control_flow_op #13555

Merged
merged 3 commits into from
Dec 11, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
change type for M
  • Loading branch information
apeforest committed Dec 6, 2018
commit 08f49775535d10d5efd310be1f33306f55aae146
4 changes: 2 additions & 2 deletions src/operator/tensor/control_flow_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct where_batch {
// CType is the condition data type
template<typename DType, typename CType>
MSHADOW_XINLINE static void Map(index_t i, DType* out, const CType* cond,
const DType* x, const DType* y, int M) {
const DType* x, const DType* y, index_t M) {
KERNEL_ASSIGN(out[i], req, (0 != cond[i/M]? x[i] : y[i]));
}
};
Expand Down Expand Up @@ -163,7 +163,7 @@ struct where_batch_backward {
template<typename DType, typename CType>
MSHADOW_XINLINE static void Map(index_t i, DType* grad_out,
const DType* grad_in,
const CType* cond, int M) {
const CType* cond, index_t M) {
KERNEL_ASSIGN(grad_out[i], req,
((0 == cond[i/M])^negate)? grad_in[i] : static_cast<DType>(0));
}
Expand Down