How do I check programmatically if a device supports hardware Raytracing?

device.supportsRaytracing can be used to check if the device supports Raytracing. It seems most of the devices support Raytracing. However, only M3 and iPhone 15 Pro supports hardware Raytracing. How do I check programmatically if a device supports hardware Raytracing? Thank you.

You can check for support for MTLGPUFamilyApple9 family of devices using supportsFamily: query on the MTLDevice

How do I check programmatically if a device supports hardware Raytracing?
 
 
Q