diff --git a/metal/paddle-mobile/paddle-mobile/CustomNet/SuperResolutionNet.swift b/metal/paddle-mobile/paddle-mobile/CustomNet/SuperResolutionNet.swift index 18e07d0dca9eada1daf27c714bd5275b433ca73d..a388758da7c42231ade1b11f52c00de261027225 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 db8a3da966b1d156023fd2211fed183e3b16dd73..083e76e3d54cbc91912f24c88f03f720cb9ec7fa 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 {