Skip to content

Commit

Permalink
fix compute function
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyfly committed Aug 6, 2021
1 parent 3b979c1 commit f4bd351
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions paddle/fluid/operators/expand_as_v2_op_npu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ class ExpandAsV2NPUKernel : public framework::OpKernel<T> {
"The rank (%d) of the input 'target_tensor' for "
"expand_as_v2 op must be less than or equal to %d.",
target_rank, MAX_RANK_SUPPORTED));

switch (target_rank) { REP_EXPAND_AS_TEMPLATE(MAX_RANK_SUPPORTED) }
ExpandAs(context);
}

protected:
template <int Rank>
void ExpandAs(const framework::ExecutionContext& context) const {
auto* in0 = context.Input<framework::Tensor>("X");
auto in_dims = in0->dims();
Expand Down

0 comments on commit f4bd351

Please sign in to comment.