Essentials
Versions and Support
Metal.macos_version
— FunctionMetal.darwin_version
— FunctionMetal.darwin_version() -> VersionNumber
Returns the host Darwin kernel version.
See also Metal.macos_version
.
Metal.metal_support
— FunctionMetal.metal_support() -> VersionNumber
Returns the highest supported version for the Metal Shading Language.
See also Metal.metallib_support
and Metal.air_support
.
Metal.metallib_support
— FunctionMetal.metallib_support() -> VersionNumber
Returns the highest supported version for the metallib file format.
See also Metal.air_support
and Metal.metal_support
.
Metal.air_support
— FunctionMetal.air_support() -> VersionNumber
Returns 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()::MTLDevice
Return 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)::MTLCommandQueue
Return 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