How to use MetalPeformancePrimitives

I am trying to learn the new Metal Peformance Primitives APIs. I have added the MetalPeformancePrimitives framework and included the header in my shader code as per documentation

#include <MetalPeformancePrimitives/MetalPeformancePrimitives.h>

Unfortunately, Xcode complains that the header cannot be found. How do I include it properly?

I am using Xcode 26 on Tahoe. The MetalPeformancePrimitives framework is present on my machine and I can inspect the headers in the filesystem.

Hello,

What versions of macOS 26.x and Xcode 26.x are you using?

Was your Xcode project created from a Metal 4 template or is it a modification of a Metal 3 project?

Otherwise, that include directive looks correct.

Thanks for getting back to me! It appears that upgrading to Xcode 26.1 has fixed the issue, and the headers are now detected correctly.

By the way, I noticed that there is a lot of discrepancy between the documentation and the shipped APIs. I suppose you guys are aware of this and working on a fix? And we really need a Performance Primitives tuning guide. The API is very flexible and finding settings that actually work well for performance can be challenging. For example, I am yet to find a tile size for which using a multi-simdgroup execution scope would not result in performance regression. Also, what about bfloat?

Glad to hear it re: upgrading to Xcode 26.1.

As for discrepancy between shipping API and docs that's problematic and we'd appreciate help in identifying these areas.

A performance tuning guide sounds helpful.

bfloat type support likewise compelling for machine learning.

We'd appreciate any feedback you could provide for documentation in an enhancement request.

How to use MetalPeformancePrimitives
 
 
Q