diff --git a/metal/paddle-mobile/paddle-mobile/Executor.swift b/metal/paddle-mobile/paddle-mobile/Executor.swift index a799ec7d1074e8dc372c3801a028050e0beb602e..303e35bf73d5c90dc6311aa29b25e77b47ba053b 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 d1d82aeb539e9c433c579e797c187c682b2ac235..ad925eb174414ed8f48cc8dd5bf090bc2ed0aed2 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) }