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 class

LaunchTraceEntry

LaunchTraceEntry

class max.driver.LaunchTraceEntry

source

Bases: object

One operation recorded by max.driver.begin_launch_trace.

Describes a kernel launch, memory copy, or memset enqueued on a device stream. Only the field group matching kind is meaningful; the other groups hold zero values. stream_index identifies which stream enqueued the operation, so entries from different streams can be told apart in the single enqueue-ordered list. semantic_hash is a deterministic hash of the launch parameters that excludes memory addresses, so it is stable across runs and suitable for change-detection in tests.

MemcpyKind

class MemcpyKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

source

Bases: Enum

The direction of a memcpy entry.

DTOD

DTOD = 3

source

DTOH

DTOH = 2

source

HTOD

HTOD = 1

source

NONE

NONE = 0

source

OperationKind

class OperationKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

source

Bases: Enum

The kind of operation a trace entry describes.

KERNEL_LAUNCH

KERNEL_LAUNCH = 0

source

MEMCPY

MEMCPY = 1

source

MEMSET

MEMSET = 2

source

block_x

property block_x

source

(self) -> int

block_y

property block_y

source

(self) -> int

block_z

property block_z

source

(self) -> int

grid_x

property grid_x

source

(self) -> int

grid_y

property grid_y

source

(self) -> int

grid_z

property grid_z

source

(self) -> int

kind

property kind

source

The kind of operation this entry represents.

memcpy_byte_size

property memcpy_byte_size

source

(self) -> int

memcpy_kind

property memcpy_kind

source

The copy direction; NONE unless kind is MEMCPY.

memset_byte_size

property memset_byte_size

source

(self) -> int

memset_value

property memset_value

source

(self) -> int

memset_value_size

property memset_value_size

source

(self) -> int

name

property name

source

The kernel name, or the driver API name for copies/memsets (e.g. cuMemcpyHtoD).

semantic_hash

property semantic_hash

source

Deterministic, address-free hash of the operation parameters.

shared_mem_bytes

property shared_mem_bytes

source

(self) -> int

stream_index

property stream_index

source

Identifies the stream this operation was enqueued on, assigned in first-seen order within a trace.