Skip to content

Commit 32f6299

Browse files
authored
[XPU] Fix argmax to adapt dynamic shape (#10126) (#10129)
1 parent 2072742 commit 32f6299

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lite/kernels/xpu/argmax_compute.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ void ArgmaxCompute::Run() {
5454
CHECK_EQ(r, 0);
5555
} else if (param.dtype == 2) {
5656
// int32
57+
out_int64_xpu_guard_->Reserve(out->numel() * sizeof(int64_t));
5758
int64_t* out_int64_data =
5859
reinterpret_cast<int64_t*>(out_int64_xpu_guard_->addr_);
5960
int r = xdnn::argmax<float, int64_t>(

0 commit comments

Comments
 (0)