From 66fd854f4bb09b73b18441d57f45ee006c57b57e Mon Sep 17 00:00:00 2001 From: liuruilong Date: Thu, 3 Jan 2019 10:36:06 +0800 Subject: [PATCH] commit for test --- .../paddle-mobile/CustomNet/SuperResolutionNet.swift | 10 +++++----- .../paddle-mobile/framework/Executor.swift | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/metal/paddle-mobile/paddle-mobile/CustomNet/SuperResolutionNet.swift b/metal/paddle-mobile/paddle-mobile/CustomNet/SuperResolutionNet.swift index 18e07d0dca..a388758da7 100644 --- a/metal/paddle-mobile/paddle-mobile/CustomNet/SuperResolutionNet.swift +++ b/metal/paddle-mobile/paddle-mobile/CustomNet/SuperResolutionNet.swift @@ -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) } } } diff --git a/metal/paddle-mobile/paddle-mobile/framework/Executor.swift b/metal/paddle-mobile/paddle-mobile/framework/Executor.swift index db8a3da966..083e76e3d5 100644 --- a/metal/paddle-mobile/paddle-mobile/framework/Executor.swift +++ b/metal/paddle-mobile/paddle-mobile/framework/Executor.swift @@ -15,7 +15,7 @@ import Foundation -let testTo = 22 +let testTo = 2 var isTest = false @@ -81,7 +81,7 @@ public class Executor { for block in inProgram.programDesc.blocks { //block.ops.count - for i in 0.. { 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 { for op in SSelf.ops { op.delogOutput() } + return var resultHolder: GPUResultHolder if except > 0 { -- GitLab