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

Commit

Permalink
change back to MSHADOW_TYPE_SWITCH
Browse files Browse the repository at this point in the history
  • Loading branch information
haojin2 committed Apr 11, 2019
1 parent cc6a684 commit bb297b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/operator/tensor/broadcast_reduce_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,12 @@ void ReduceAxesComputeImpl(const OpContext& ctx,
mxnet::TShape src_shape, dst_shape;
BroadcastReduceShapeCompact(inputs[0].shape_, small, &src_shape, &dst_shape);
Stream<xpu> *s = ctx.get_stream<xpu>();
MXNET_ACC_TYPE_SWITCH(inputs[0].type_flag_, DType, AType, {
MSHADOW_TYPE_SWITCH(inputs[0].type_flag_, DType, {
MSHADOW_TYPE_SWITCH(outputs[0].type_flag_, OType, {
const TBlob in_data = inputs[0].reshape(src_shape);
const TBlob out_data = outputs[0].reshape(dst_shape);
BROADCAST_NDIM_SWITCH(dst_shape.ndim(), NDim, {
typedef typename std::conditional<safe_acc, AType, DType>::type AccType;
size_t workspace_size = broadcast::ReduceWorkspaceSize<NDim, AccType>(
size_t workspace_size = broadcast::ReduceWorkspaceSize<NDim, DType>(
s, out_data.shape_, req[0], in_data.shape_);
Tensor<xpu, 1, char> workspace =
ctx.requested[0].get_space_typed<xpu, 1, char>(Shape1(workspace_size), s);
Expand Down

0 comments on commit bb297b8

Please sign in to comment.