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

Commit f52ddb8

Browse files
committed
Fix
1 parent b1a0d4c commit f52ddb8

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/operator/numpy/np_elemwise_broadcast_logic_op.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,14 @@ static constexpr char func_less_equal_scalar_cpu[] = "less_equal_scalar_cpu";
259259
static constexpr char func_less_equal_scalar_gpu[] = "less_equal_scalar_gpu";
260260

261261
#if MXNET_USE_TVM_OP
262-
#define MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR_LOGIC_CPU(name) \
263-
NNVM_REGISTER_OP(_npi_##name##_scalar) \
264-
.set_attr<FCompute>("FCompute<cpu>", TVMBinaryBroadcastScalarCompute{func_##name##scalar_cpu})
262+
#define MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR_LOGIC_CPU(name) \
263+
NNVM_REGISTER_OP(_npi_##name##_scalar) \
264+
.set_attr<FCompute>("FCompute<cpu>", TVMBinaryBroadcastScalarCompute{func_##name##_scalar_cpu})
265265

266266
#if MXNET_USE_CUDA
267-
#define MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR_LOGIC_GPU(name) \
268-
NNVM_REGISTER_OP(_npi_##name##_scalar) \
269-
.set_attr<FCompute>("FCompute<gpu>", TVMBinaryBroadcastScalarCompute{func_##name##scalar_gpu})
267+
#define MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR_LOGIC_GPU(name) \
268+
NNVM_REGISTER_OP(_npi_##name##_scalar) \
269+
.set_attr<FCompute>("FCompute<gpu>", TVMBinaryBroadcastScalarCompute{func_##name##_scalar_gpu})
270270

271271
MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR_LOGIC_GPU(equal);
272272
MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR_LOGIC_GPU(not_equal);

src/operator/tensor/elemwise_binary_broadcast_op.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ void BinaryBroadcastComputeLogic(const nnvm::NodeAttrs& attrs,
337337
mshadow::Shape<NDim> rstride = mxnet_op::calc_stride(new_rshape.get<NDim>());
338338
mxnet_op::Kernel<mxnet_op::binary_broadcast_kernel<NDim, DType, bool, OP>, xpu>::
339339
template LaunchEx(s, new_oshape.Size(), req[0], lstride, rstride, oshape,
340-
inputs[0].dptr<DType>(), inputs[1].dptr<DType>(), outputs[0].dptr<bool>());
340+
inputs[0].dptr<DType>(), inputs[1].dptr<DType>(),
341+
outputs[0].dptr<bool>());
341342
});
342343
});
343344
}

src/operator/tensor/elemwise_binary_op.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ class ElemwiseBinaryOp : public OpBase {
515515
if (size != 0) {
516516
Kernel<mxnet_op::op_with_req<OP, Req>, xpu>::Launch(s, size,
517517
outputs[0].dptr<bool>(),
518-
inputs[0].dptr<DType>(), inputs[1].dptr<DType>());
518+
inputs[0].dptr<DType>(),
519+
inputs[1].dptr<DType>());
519520
}
520521
});
521522
});

0 commit comments

Comments
 (0)