Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/core/CL/cl_kernels/common/unpooling_layer.cl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Arm Limited.
* Copyright (c) 2020-2021,2026 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -68,5 +68,9 @@ __kernel void max_unpooling_layer_2(
unsigned int index = *((__global unsigned int *)indices.ptr);
DATA_TYPE value = *((__global DATA_TYPE *)input.ptr);

*((__global DATA_TYPE *)tensor3D_index2ptr(&output, WIDTH_DST, HEIGHT_DST, DEPTH_DST, index)) = value;
}
unsigned int total_elements = (unsigned int) (WIDTH_DST * HEIGHT_DST * DEPTH_DST);
if(index < total_elements)
{
*((__global DATA_TYPE *)tensor3D_index2ptr(&output, WIDTH_DST, HEIGHT_DST, DEPTH_DST, index)) = value;
}
}