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).

Python function

begin_launch_trace

begin_launch_trace()

max.driver.begin_launch_trace() → None

source

Starts a process-global recording of enqueued device operations.

Records kernel launches, memory copies, and memsets across all streams into one enqueue-ordered list, clearing any previous trace. No stream or device handle is needed, so work enqueued on streams the caller does not hold (e.g. a compiled graph’s internal stream) is still captured. Only CUDA and HIP devices record entries; on other devices the trace is always empty. Intended for tests and debugging: pair with take_launch_trace to assert which device work a code path enqueues and on which stream.