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
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)
Bases: Enum
The direction of a memcpy entry.
DTOD
DTOD = 3
DTOH
DTOH = 2
HTOD
HTOD = 1
NONE
NONE = 0
OperationKind
class OperationKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases: Enum
The kind of operation a trace entry describes.
KERNEL_LAUNCH
KERNEL_LAUNCH = 0
MEMCPY
MEMCPY = 1
MEMSET
MEMSET = 2
block_x
property block_x
(self) -> int
block_y
property block_y
(self) -> int
block_z
property block_z
(self) -> int
grid_x
property grid_x
(self) -> int
grid_y
property grid_y
(self) -> int
grid_z
property grid_z
(self) -> int
kind
property kind
The kind of operation this entry represents.
memcpy_byte_size
property memcpy_byte_size
(self) -> int
memcpy_kind
property memcpy_kind
The copy direction; NONE unless kind is MEMCPY.
memset_byte_size
property memset_byte_size
(self) -> int
memset_value
property memset_value
(self) -> int
memset_value_size
property memset_value_size
(self) -> int
name
property name
The kernel name, or the driver API name for copies/memsets (e.g. cuMemcpyHtoD).
semantic_hash
property semantic_hash
Deterministic, address-free hash of the operation parameters.
shared_mem_bytes
property shared_mem_bytes
(self) -> int
stream_index
property stream_index
Identifies the stream this operation was enqueued on, assigned in first-seen order within a trace.