Skip to main content
Log in

Mojo module

device_context

Structs

  • DeviceBuffer: Represents a block of device-resident storage. For GPU devices, a device buffer is allocated in the device's global memory.
  • DeviceContext: Represents a single stream of execution on a particular accelerator (GPU). A DeviceContext serves as the low-level interface to the accelerator inside a MAX custom operation and provides methods for allocating buffers on the device, copying data between host and device, and for compiling and running functions (also known as kernels) on the device.
  • DeviceExternalFunction:
  • DeviceFunction: Represents a compiled device function. From inside a MAX custom operation, use DeviceContext.compile_function() to compile a function and use enqueue_function() to launch it on the accelerator.