Essentials
Versions and Support
Missing docstring for Metal.macos_version. Check Documenter's build log for details.
Missing docstring for Metal.darwin_version. Check Documenter's build log for details.
Metal.metal_support — FunctionMetal.metal_support()::VersionNumberReturns the highest supported version for the Metal Shading Language.
See also Metal.metallib_support and Metal.air_support.
Metal.metallib_support — FunctionMetal.metallib_support()::VersionNumberReturns the highest supported version for the metallib file format.
See also Metal.air_support and Metal.metal_support.
Metal.air_support — FunctionMetal.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! — Functiondevice!(dev::MTLDevice)Sets the Metal GPU device associated with the current Julia task.
Metal.MTL.devices — Functiondevices()Get an iterator for the compute devices.
Metal.device — Functiondevice()::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 — Functionglobal_queue(dev::MTLDevice)::MTLCommandQueueReturn the Metal command queue associated with the current Julia thread.
Metal.synchronize — Functionsynchronize(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 — Functiondevice_synchronize()Synchronize all committed GPU work across all global queues