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

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommliu committed Dec 9, 2019
1 parent 8aff047 commit 176fc22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/operator/numpy/np_bincount_op-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ struct NumpyBincountParam : public dmlc::Parameter<NumpyBincountParam> {
};

inline bool NumpyBincountType(const nnvm::NodeAttrs& attrs,
std::vector<int> *in_attrs,
std::vector<int> *out_attrs) {
std::vector<int> *in_attrs,
std::vector<int> *out_attrs) {
const NumpyBincountParam& param = nnvm::get<NumpyBincountParam>(attrs.parsed);
if (!param.has_weights) {
return ElemwiseType<1, 1>(attrs, in_attrs, out_attrs) && in_attrs->at(0) != -1;
Expand Down
12 changes: 6 additions & 6 deletions src/operator/numpy/np_bincount_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ void NumpyBincountForwardImpl<gpu>(const OpContext &ctx,
});

MSHADOW_TYPE_SWITCH(data.dtype(), DType, {
MSHADOW_TYPE_SWITCH(out.dtype(), OType, {
size_t out_size = out.shape().Size();
Kernel<set_zero, gpu>::Launch(s, out_size, out.data().dptr<OType>());
Kernel<BincountFusedKernel, gpu>::Launch(
s, data_n, data.data().dptr<DType>(), out.data().dptr<OType>());
});
MSHADOW_TYPE_SWITCH(out.dtype(), OType, {
size_t out_size = out.shape().Size();
Kernel<set_zero, gpu>::Launch(s, out_size, out.data().dptr<OType>());
Kernel<BincountFusedKernel, gpu>::Launch(
s, data_n, data.data().dptr<DType>(), out.data().dptr<OType>());
});
});
}

NNVM_REGISTER_OP(_npi_bincount)
Expand Down

0 comments on commit 176fc22

Please sign in to comment.