Skip to main content
Log in

Mojo module

device

Defines the types and functions to interact with hardware devices.

For example, you can create a CPU device like this:

from max.driver import cpu_device

def main():
device = cpu_device()
from max.driver import cpu_device

def main():
device = cpu_device()

Structs

  • Device: Represents a logical instance of a device, for eg: CPU. This can be used to allocate and manage memory in a device's address space, and to compile and execute models and graphs on a device.

Functions

Was this page helpful?