Skip to content

Commit

Permalink
[XPU] fix axis(-1) in the GatherCompute function (PaddlePaddle#10387)
Browse files Browse the repository at this point in the history
  • Loading branch information
linkk08 authored Sep 11, 2023
1 parent f030cc3 commit 67c77cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lite/kernels/xpu/gather_compute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void GatherCompute<DataType, IndexType, PType>::Run() {
<< " xpu only support axis int32 type";
auto* axis_data = param.Axis->template data<int>();
axis = axis_data[0];
} else {
} else if (param.axis != -1) {
axis = param.axis;
}
std::vector<int> x_dims(x->dims().data().begin(), x->dims().data().end());
Expand Down

0 comments on commit 67c77cc

Please sign in to comment.