Essentials
Versions and Support
Metal.macos_version — Function
Metal.darwin_version — Function
Metal.metal_support — Function
Metal.metal_support()::VersionNumberReturns the highest supported version for the Metal Shading Language.
See also Metal.metallib_support and Metal.air_support.
Metal.metallib_support — Function
Metal.metallib_support()::VersionNumberReturns the highest supported version for the metallib file format.
See also Metal.air_support and Metal.metal_support.
Metal.air_support — Function
Metal.air_support()::VersionNumberReturns the highest supported version for the embedded AIR bitcode format.
See also Metal.metallib_support and Metal.metal_support.
Global State
Metal.device! — Function
device!(dev::MTLDevice)Sets the Metal GPU device associated with the current Julia task.
Metal.MTL.devices — Function
devices()Get an iterator for the compute devices.
Metal.device — Function
device()::MTLDeviceReturn the Metal GPU device associated with the current Julia task.
Since all M-series systems currently only externally show a single GPU, this function effectively returns the only system GPU.
device(<:MtlArray)Get the Metal device for an MtlArray.
Metal.global_queue — Function
global_queue(dev::MTLDevice)::MTLCommandQueueReturn the Metal command queue associated with the current Julia thread.
Metal.synchronize — Function
synchronize(queue)Wait for currently committed GPU work on this queue to finish.
Create a new MTLCommandBuffer from the global command queue, commit it to the queue, and simply wait for it to be completed. Since command buffers should execute in a First-In-First-Out manner, this synchronizes the GPU.
Metal.device_synchronize — Function
device_synchronize()Synchronize all committed GPU work across all global queues