diff --git a/metal/paddle-mobile-demo/paddle-mobile-demo/Net/Net.swift b/metal/paddle-mobile-demo/paddle-mobile-demo/Net/Net.swift index 0b8b428c735186c56be9ecfc5443f660d3f51f73..d7738a30a285a586ca98670f3a759cf37fcb5bc5 100644 --- a/metal/paddle-mobile-demo/paddle-mobile-demo/Net/Net.swift +++ b/metal/paddle-mobile-demo/paddle-mobile-demo/Net/Net.swift @@ -45,7 +45,6 @@ protocol Net { } extension Net { - mutating func load() throws { let queue = MetalHelper.shared.queue let loader = Loader.init() diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ElementwiseAddKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ElementwiseAddKernel.swift index c80df94bb52608e777208c36bb86133a0ec24e77..e8e9dffc4562f0fc411e81e25f245b09ce292b0b 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ElementwiseAddKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ElementwiseAddKernel.swift @@ -27,7 +27,7 @@ struct ElementwiseAddMetalParam { class ElementwiseAddKernel: Kernel, Computable { required init(device: MTLDevice, param: ElementwiseAddParam

) { super.init(device: device, inFunctionName: "elementwise_add") - param.output.initTexture(device: device, inTranspose: param.inputX.transpose) + param.output.initTexture(device: device, inTranspose: param.inputX.transpose, computePrecision: computePrecision) } func compute(commandBuffer: MTLCommandBuffer, param: ElementwiseAddParam

) throws {