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

Commit

Permalink
* Fix GPU Bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
hanke580 committed Feb 18, 2020
1 parent 1380559 commit cd9f984
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/operator/numpy/np_elemwise_broadcast_op_extended.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ MXNET_OPERATOR_REGISTER_BINARY_BROADCAST(broadcast_fmax)
.set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_broadcast_fmax"});

NNVM_REGISTER_OP(_backward_broadcast_fmax)
.add_alias("_backward_npi_fmax")
.set_num_inputs(3)
.set_num_outputs(2)
.set_attr<nnvm::TIsBackward>("TIsBackward", true)
Expand All @@ -398,6 +399,7 @@ MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR(_fmax_scalar)
.add_alias("_npi_fmax_scalar");

MXNET_OPERATOR_REGISTER_BINARY(_backward_fmax_scalar)
.add_alias("_backward_npi_fmax_scalar")
.add_argument("scalar", "float", "scalar value")
.set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); })
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::ge>);
Expand All @@ -408,6 +410,7 @@ MXNET_OPERATOR_REGISTER_BINARY_BROADCAST(broadcast_fmin)
.set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_broadcast_fmin"});

NNVM_REGISTER_OP(_backward_broadcast_fmin)
.add_alias("_backward_npi_fmin")
.set_num_inputs(3)
.set_num_outputs(2)
.set_attr<nnvm::TIsBackward>("TIsBackward", true)
Expand All @@ -429,6 +432,7 @@ MXNET_OPERATOR_REGISTER_NP_BINARY_SCALAR(_fmin_scalar)
.add_alias("_npi_fmin_scalar");

MXNET_OPERATOR_REGISTER_BINARY(_backward_fmin_scalar)
.add_alias("_backward_npi_fmin_scalar")
.add_argument("scalar", "float", "scalar value")
.set_attr_parser([](NodeAttrs *attrs) { attrs->parsed = std::stod(attrs->dict["scalar"]); })
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>);
Expand Down

0 comments on commit cd9f984

Please sign in to comment.