Metal Device Architecture on macOS versions before Sonoma

Hello, The latest version of Metal (on macOS 14) seems to have the instance property for the Metal device architecture.

I was curious how this could be achieved on versions of macOS prior to 14 programatically?

xcrun metal-arch 

The above command provides exactly what I need.

I was thinking that I could use Metal and IOKit to grab the architecture, but I am lead to believe that there is some kind of mapping in the metal-arch tool and it may not be that easy.

Any help would be greatly appreciated.

Thanks.

MTLDevice instance should have access to architecture: https://developer.apple.com/documentation/metal/mtldevice/4195341-architecture

Metal Device Architecture on macOS versions before Sonoma
 
 
Q