From 73a01087953b17f7ef30d3349b6ff027d06fd99c Mon Sep 17 00:00:00 2001 From: liuruilong Date: Wed, 29 Aug 2018 15:42:42 +0800 Subject: [PATCH] prelu init buff --- metal/paddle-mobile/paddle-mobile/Executor.swift | 4 ++-- .../paddle-mobile/Operators/Kernels/PreluKernel.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/metal/paddle-mobile/paddle-mobile/Executor.swift b/metal/paddle-mobile/paddle-mobile/Executor.swift index a799ec7d10..303e35bf73 100644 --- a/metal/paddle-mobile/paddle-mobile/Executor.swift +++ b/metal/paddle-mobile/paddle-mobile/Executor.swift @@ -14,7 +14,7 @@ import Foundation -let testTo = 99 +let testTo = 10 public class ResultHolder { public let dim: [Int] @@ -62,7 +62,7 @@ public class Executor { queue = inQueue for block in inProgram.programDesc.blocks { //block.ops.count - for i in 0..<4 { + for i in 0...shared.creat(device: inDevice, opDesc: op, scope: inProgram.scope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/PreluKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/PreluKernel.swift index d1d82aeb53..ad925eb174 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/PreluKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/PreluKernel.swift @@ -17,6 +17,7 @@ class PreluKernel: Kernel, Computable{ } else { super.init(device: device, inFunctionName: "prelu_other") } + param.alpha.initBuffer(device: device) param.output.initTexture(device: device, inTranspose: param.input.transpose) } -- GitLab