Post

Replies

Boosts

Views

Activity

Reply to macOS 15.x crashes in MetalPerformanceShadersGraph
According to the declaration of the initWithMPSGraphPackageAtURL:compilationDescriptor: method it does not accept the nil URL. That's probably the reason why the app crashes in the provided example. The problem in our case, however, is that we are not using the MPSGraphExecutable directly, but trying to load a CoreML model. The MPS seems to be used under the hood and we do not have control over it. What we already know is that CoreML creates an MPS graph package somewhere under ~/Library/Caches directory when it loads the model for the first time. It tries to load the graph on a subsequent use from the caches. And that's the moment when it crashes the app instead of handling the error. Naively, we would expect CoreML to return an NSError from [MLModel modelWithContentsOfURL:configuration:error:] method instead of crashing. But it does not happen. What we've also noticed, is that these caches are taking a log of disk space. In our case it's hundreds of megabytes on Sequoia. It was taking much less on previous OS versions (just some megabytes). Can it be that there is just not enough room for all the caches on a user machine, so that they get corrupted?
2w