For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
GmemTrace
struct GmemTrace
HBM-backed trace buffer.
store(offset, ts) writes ts to ptr[offset]. 8 bytes of kernel
arg.
Fieldsβ
- βptr (
UnsafePointer[UInt64, MutAnyOrigin]): Device pointer to au64buffer sized for the caller'snum_blocks * events_per_blockslot count, zero-initialized on first use.
Implemented traitsβ
AnyType,
Copyable,
DevicePassable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TraceBuf,
TrivialRegisterPassable
comptime membersβ
device_typeβ
comptime device_type = GmemTrace
Device-side type alias. GmemTrace is trivially device-passable.
Methodsβ
__init__β
__init__(ptr: UnsafePointer[UInt64, MutAnyOrigin]) -> Self
Wraps a device pointer as a trace buffer.
Args:
- βptr (
UnsafePointer[UInt64, MutAnyOrigin]): Device-sideUnsafePointer[UInt64]with room fornum_blocks * events_per_blockslots, zero-initialized on first use.
storeβ
store(self, offset: Int, val: UInt64)
Writes a timestamp into the device-side trace buffer.
Args:
get_type_nameβ
static get_type_name() -> String
Returns the type name for runtime diagnostics.
Returns:
String: Always "GmemTrace".
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!