Module Metal_api.Device

type t = {
  1. id : int;
  2. handle : Metal_types.mtl_device;
  3. name : string;
  4. max_threads_per_threadgroup : Metal_types.mtl_size Ctypes.structure;
  5. max_threadgroup_memory : int;
  6. supports_fp64 : bool;
  7. is_cpu : bool;
}
val init : unit -> unit
val count : unit -> int
val get_all_handles : unit -> Metal_types.mtl_device array
val make_device : int -> unit Ctypes_static.ptr -> t
val get_uncached : int -> t
val cache : (int, t) Stdlib.Hashtbl.t
val cache_lock : Stdlib.Mutex.t
val get : int -> t
val id : t -> int
val name : t -> string
val handle : t -> Metal_types.mtl_device
val max_buffer_length : t -> int

The largest MTLBuffer this device allocates, in bytes (maxBufferLength).

recommendedMaxWorkingSetSize in bytes: on Apple silicon, the share of unified memory the GPU may keep resident without degrading.