From 0d0c95825eab1f8d3f929a43cb6300040daa0604 Mon Sep 17 00:00:00 2001 From: dolphin8 Date: Mon, 3 Sep 2018 20:12:05 +0800 Subject: [PATCH] fix elewise_add 16bit --- .../paddle-mobile/Operators/Kernels/metal/Elementwise.metal | 1 + 1 file changed, 1 insertion(+) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/metal/Elementwise.metal b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/metal/Elementwise.metal index 9258c06ed7..b152df8281 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/metal/Elementwise.metal +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/metal/Elementwise.metal @@ -84,6 +84,7 @@ kernel void elementwise_add_half(texture2d_array inputX [[te int32_t ytrans[4] = {pm.ytrans[0], pm.ytrans[1], pm.ytrans[2], pm.ytrans[3]}; int32_t yshift = 4 - pm.ylen - pm.axis; for (int n = 0; n < 4; n++) { + x_xyzn[3] = n; xyzn2abcd(pm.xdim[3], x_xyzn, x_abcd); invtrans(xtrans, x_abcd, t_abcd); for (int k = pm.axis; k < (pm.axis + pm.ylen); k++) { -- GitLab