提交 73a01087 编写于 作者: L liuruilong

prelu init buff

上级 11d8528b
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import Foundation import Foundation
let testTo = 99 let testTo = 10
public class ResultHolder<P: PrecisionType> { public class ResultHolder<P: PrecisionType> {
public let dim: [Int] public let dim: [Int]
...@@ -62,7 +62,7 @@ public class Executor<P: PrecisionType> { ...@@ -62,7 +62,7 @@ public class Executor<P: PrecisionType> {
queue = inQueue queue = inQueue
for block in inProgram.programDesc.blocks { for block in inProgram.programDesc.blocks {
//block.ops.count //block.ops.count
for i in 0..<4 { for i in 0..<testTo {
let op = block.ops[i] let op = block.ops[i]
do { do {
let op = try OpCreator<P>.shared.creat(device: inDevice, opDesc: op, scope: inProgram.scope) let op = try OpCreator<P>.shared.creat(device: inDevice, opDesc: op, scope: inProgram.scope)
......
...@@ -17,6 +17,7 @@ class PreluKernel<P: PrecisionType>: Kernel, Computable{ ...@@ -17,6 +17,7 @@ class PreluKernel<P: PrecisionType>: Kernel, Computable{
} else { } else {
super.init(device: device, inFunctionName: "prelu_other") super.init(device: device, inFunctionName: "prelu_other")
} }
param.alpha.initBuffer(device: device)
param.output.initTexture(device: device, inTranspose: param.input.transpose) param.output.initTexture(device: device, inTranspose: param.input.transpose)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册