提交 66fd854f 编写于 作者: L liuruilong

commit for test

上级 749dbc93
......@@ -50,11 +50,11 @@ public class SuperResolutionNet: Net{
texture.updateDims(inTensorDim: Dim.init(inDim: [texture.tensorDim[0], texture.tensorDim[1], inputDim[1], inputDim[2]]), inDim: newDim)
texture.initTexture(device: device, inTranspose: [0, 1, 2, 3], computePrecision: computePrecision)
let output: FetchHolder = program.scope.output() as! FetchHolder
output.dim = newDim
output.capacity = newDim.numel()
output.paddedCapacity = newDim.numel() * 4
output.initBuffer(device: device)
// let output: FetchHolder = program.scope.output() as! FetchHolder
// output.dim = newDim
// output.capacity = newDim.numel()
// output.paddedCapacity = newDim.numel() * 4
// output.initBuffer(device: device)
}
}
}
......
......@@ -15,7 +15,7 @@
import Foundation
let testTo = 22
let testTo = 2
var isTest = false
......@@ -81,7 +81,7 @@ public class Executor<P: PrecisionType> {
for block in inProgram.programDesc.blocks {
//block.ops.count
for i in 0..<block.ops.count {
for i in 0..<testTo {
let opDesc = block.ops[i]
do {
......@@ -125,7 +125,7 @@ public class Executor<P: PrecisionType> {
let inputTexture = InputTexture.init(inMTLTexture: resInput, inExpectDim: dim)
program.scope.setInput(input: inputTexture)
//(ops.count - except)
for i in 0..<(ops.count - except) {
for i in 0..<(testTo - except) {
let op = ops[i]
do {
try op.run(device: device, buffer: buffer)
......@@ -161,6 +161,7 @@ public class Executor<P: PrecisionType> {
for op in SSelf.ops {
op.delogOutput()
}
return
var resultHolder: GPUResultHolder
if except > 0 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册