IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

DeviceSpec

struct DeviceSpec

A DeviceSpec represents a single model/sku of device. It enumerates identifying information and provides sufficiently detailed information to compile for a device and to set up a control plane for it at runtime.

Fields within this should be considered const, with DeviceSpec being a static description of the device as it exists.

Fields

  • name (StaticString): The unique name of this specific model of device, as enumerated by the driver.
  • info (Optional[GPUInfo]): Extended device information that has not yet been inlined into DeviceSpec. This is not expected to be optional "forever", but is necessary to allow the Python HAL bindings to not require a non-CPU-device be connected to the system to import them. See DRIV-208.

Implemented traits

AnyType, Copyable, ImplicitlyDeletable, Movable