Metal.Device
Represents the GPU device capable of executing Metal commands. See MTLDevice.
val sexp_of_t : t -> Sexplib0.Sexp.t
val create_system_default : unit -> t
Returns the default Metal device for the system. See MTLCreateSystemDefaultDevice.
val copy_all_devices : unit -> t array
Returns an array of all the Metal device instances in the system. See MTLCopyAllDevices.
module GPUFamily : sig ... end
Represents a Metal GPU family, categorizing devices by feature set and capability. See MTLGPUFamily.
val supports_family : t -> GPUFamily.t -> bool
Checks if the device supports the specified GPU family. See supportsFamiliy:.
module ArgumentBuffersTier : sig ... end
Describes the level of support for argument buffers. See MTLArgumentBuffersTier.
type attributes = {
name : string;
registry_id : Unsigned.ULLong.t;
max_threads_per_threadgroup : Size.t;
max_buffer_length : Unsigned.ULong.t;
max_threadgroup_memory_length : Unsigned.ULong.t;
argument_buffers_support : ArgumentBuffersTier.t;
recommended_max_working_set_size : Unsigned.ULLong.t;
is_low_power : bool;
is_removable : bool;
is_headless : bool;
has_unified_memory : bool;
peer_count : Unsigned.ULong.t;
peer_group_id : Unsigned.ULLong.t;
supported_gpu_families : GPUFamily.t list;
}
Metal device attributes relevant for compute tasks.
val sexp_of_attributes : attributes -> Sexplib0.Sexp.t
val get_attributes : t -> attributes
Fetches the static compute-relevant attributes of the device.