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

Mojo package

runtime

Provides Mojo access to the runtime that schedules and instruments kernels.

MAX kernels execute under the C++ AsyncRT runtime, and these modules are the thin Mojo surface onto it: tracing spans and profiling levels that compile away when profiling is disabled, queries for the parallelism and task assignment of the device context a kernel was scheduled on, and an owning handle that keeps a device allocation alive for as long as the runtime still refers to it.

Reach for tracing when instrumenting a kernel, and asyncrt when work partitioning depends on the worker count of the context it runs on. Despite the asyncrt name, nothing here is an async programming interface: there is no coroutine, task-spawning, or future API.

Modules​

Was this page helpful?