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

Device-to-device copy.

DTOH​

DTOH = 2

source

Device-to-host copy.

HTOD​

HTOD = 1

source

Host-to-device copy.

NONE​

NONE = 0

source

Not a memcpy; the entry is a kernel launch or memset.

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

A compute kernel launched on the device.

MEMCPY​

MEMCPY = 1

source

A memory copy between device or host locations.

MEMSET​

MEMSET = 2

source

A region of memory filled with a value.

block_x​

property block_x

source

X dimension of each thread block.

block_y​

property block_y

source

Y dimension of each thread block.

block_z​

property block_z

source

Z dimension of each thread block.

grid_x​

property grid_x

source

X dimension of the launch grid, in blocks.

grid_y​

property grid_y

source

Y dimension of the launch grid, in blocks.

grid_z​

property grid_z

source

Z dimension of the launch grid, in blocks.

kind​

property kind

source

The kind of operation this entry represents.

memcpy_byte_size​

property memcpy_byte_size

source

Bytes copied; zero unless kind is MEMCPY.

memcpy_kind​

property memcpy_kind

source

The copy direction; NONE unless kind is MEMCPY.

memset_byte_size​

property memset_byte_size

source

Bytes written; zero unless kind is MEMSET.

memset_value​

property memset_value

source

The fill value; zero unless kind is MEMSET.

memset_value_size​

property memset_value_size

source

Element size of the fill value in bytes; zero unless kind is MEMSET.

name​

property name

source

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

semantic_hash​

property semantic_hash

source

Deterministic, address-free hash of the operation parameters.

shared_mem_bytes​

property shared_mem_bytes

source

Bytes of dynamic shared memory requested by the launch.

stream_index​

property stream_index

source

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