From c54ee0ba6f1fc1638c12b827996243fef5570023 Mon Sep 17 00:00:00 2001 From: ChaiBapchya Date: Thu, 22 Aug 2019 17:37:22 -0700 Subject: [PATCH 1/4] change int to index t and remove the check --- src/operator/random/sample_multinomial_op.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/operator/random/sample_multinomial_op.h b/src/operator/random/sample_multinomial_op.h index 5a0b9bb21acb..67d5291b9ef9 100644 --- a/src/operator/random/sample_multinomial_op.h +++ b/src/operator/random/sample_multinomial_op.h @@ -71,8 +71,8 @@ inline bool SampleMultinomialOpShape(const nnvm::NodeAttrs& attrs, if (!ndim_is_known(ishape)) return false; MSHADOW_TYPE_SWITCH(param.dtype, DType, { - CHECK_LE(ishape[ishape.ndim() - 1], mxnet::common::MaxIntegerValue()) - << "'dtype' does not have a sufficient precision to represent the indices of the input array."; + // CHECK_LE(ishape[ishape.ndim() - 1], mxnet::common::MaxIntegerValue()) + // << "'dtype' does not have a sufficient precision to represent the indices of the input array."; }); if (ishape.ndim() == 1) { @@ -121,7 +121,7 @@ inline bool SampleMultinomialOpType(const nnvm::NodeAttrs& attrs, struct SampleMultinomialKernel { template - MSHADOW_XINLINE static void Map(int i, index_t K, index_t M, + MSHADOW_XINLINE static void Map(index_t i, index_t K, index_t M, DType* dist, float* uniform, float* cum_table, IType* out, DType* prob) { double acc = 0.0; From 5a47fdf317cf769da71e1ed8ff612510f56e3c7e Mon Sep 17 00:00:00 2001 From: ChaiBapchya Date: Fri, 23 Aug 2019 11:09:41 -0700 Subject: [PATCH 2/4] fix lint --- src/operator/random/sample_multinomial_op.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/operator/random/sample_multinomial_op.h b/src/operator/random/sample_multinomial_op.h index 67d5291b9ef9..e5ecadaf0c24 100644 --- a/src/operator/random/sample_multinomial_op.h +++ b/src/operator/random/sample_multinomial_op.h @@ -70,11 +70,6 @@ inline bool SampleMultinomialOpShape(const nnvm::NodeAttrs& attrs, const mxnet::TShape& ishape = (*in_attrs)[0]; if (!ndim_is_known(ishape)) return false; - MSHADOW_TYPE_SWITCH(param.dtype, DType, { - // CHECK_LE(ishape[ishape.ndim() - 1], mxnet::common::MaxIntegerValue()) - // << "'dtype' does not have a sufficient precision to represent the indices of the input array."; - }); - if (ishape.ndim() == 1) { if (param.shape.ndim() > 0) { SHAPE_ASSIGN_CHECK(*out_attrs, 0, param.shape); From d8190c5ee7c6db2a6d19271886d4e61f495f3b1a Mon Sep 17 00:00:00 2001 From: ChaiBapchya Date: Fri, 23 Aug 2019 15:25:51 -0700 Subject: [PATCH 3/4] Trigger notification From ce8cb1bff047a62d026b73edcca666b1d8d8732c Mon Sep 17 00:00:00 2001 From: ChaiBapchya Date: Fri, 23 Aug 2019 18:19:58 -0700 Subject: [PATCH 4/4] Trigger notification coz of laop crash