Post

Replies

Boosts

Views

Activity

Reply to Apps crashing when distributed via TestFlight
Fine, we've figured out what's caused problem. It was one of frameworks that we depend on. How we figured it out? There is "View device logs" button in Devices and simulators window (in Xcode). And its the only place where we've found some info about crash. So the log says that it couldn't find some framework, so we researched and found that there is some strange behavior, when you build from Xcode it runs ok, but when archived framework not attached to build so it caused crash. We updated that framework and everything works fine now.
Dec ’20
Reply to Example code for MPS graph not working
Hello there! I tried my best again and here what I got: First If you replace MTLCommandBuffer with MPSCommandBuffer     func encodeTrainingBatch(commandBuffer: MPSCommandBuffer,                              sourceTensorData: MPSGraphTensorData,                              labelsTensorData: MPSGraphTensorData,                              completion: ((Float) -> Void)?) -> MPSGraphTensorData { and call it like this:         let commandBuffer = gCommandQueue.makeCommandBuffer()!         let mpsCommandBuffer = MPSCommandBuffer(commandBuffer: commandBuffer)         var yLabels: MPSNDArray? = nil         let xInput = dataset.getRandomTrainingBatch(device: gDevice, batchSize: batchSize, labels: &yLabels)         _ = classiferGraph.encodeTrainingBatch(commandBuffer: mpsCommandBuffer,                                                sourceTensorData: MPSGraphTensorData(xInput),                                                labelsTensorData: MPSGraphTensorData(yLabels!),                                                completion: updateProgressCubeAndLoss)         mpsCommandBuffer.commitAndContinue() it starts working... But only on iPad version on Mac :D It won't do anything on physical iPhone device (more on this down the line) Second one If you replace graph.encode(to: to graph.runAsync( you no longer need to control commandBuffer and it's also solves the issue Third As I mentioned previously, you can replace MTLCommandBuffer with MPSCommandBuffer it will solve the issue on iPad build running on macOS. BUT it not working on physical iPhone. I mean, it doesn't crash, but descriptor not calling completionHandler. BUT If you add completion handler with addCompletedHandler on commandBuffer, it WILL run! Appendix I don't know why it works the way I explained before, but it seems that for now best way is to use runAsync because it does not need MPSCommandBuffer which cause the bug #1 and it calls completionHandler of MPSGraphExecutionDescriptor in every configuration Hope it will help someone and I hope for Apple developers answers >_>
Nov ’22