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

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommliu committed May 11, 2020
1 parent 5ff5b15 commit 99cbb64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/operator/tensor/elemwise_binary_scalar_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class BinaryScalarOp : public UnaryOp {
public:
template<typename OP>
static void Compute_(const nnvm::NodeAttrs &attrs,
mshadow::Stream<cpu>* s,
mshadow::Stream<cpu>* s,
const std::vector<TBlob> &inputs,
const std::vector<OpReqType> &req,
const std::vector<TBlob> &outputs) {
Expand All @@ -235,7 +235,7 @@ class BinaryScalarOp : public UnaryOp {
using namespace mshadow;
using namespace mshadow::expr;
const double alpha = nnvm::get<double>(attrs.parsed);
MSHADOW_REAL_TYPE_SWITCH(outputs[0].type_flag_, DType, {
MSHADOW_TYPE_SWITCH(outputs[0].type_flag_, DType, {
MXNET_ASSIGN_REQ_SWITCH(req[0], Req, {
mxnet_op::Kernel<mxnet_op::op_with_req<OP, Req>, cpu>::Launch(
s, inputs[0].Size(), outputs[0].dptr<DType>(), inputs[0].dptr<DType>(), DType(alpha));
Expand All @@ -262,7 +262,7 @@ class BinaryScalarOp : public UnaryOp {
using namespace mshadow;
using namespace mshadow::expr;
TBlob temp_tblob;
MSHADOW_REAL_TYPE_SWITCH(outputs[0].type_flag_, DType, {
MSHADOW_TYPE_SWITCH(outputs[0].type_flag_, DType, {
if (common::is_int(inputs[0].type_flag_)) {
Tensor<xpu, 1, DType> temp_tensor =
ctx.requested[0].get_space_typed<xpu, 1, DType>(Shape1(inputs[0].Size()), s);
Expand Down

0 comments on commit 99cbb64

Please sign in to comment.