Skip to main content

alloc_trace_on

Function alloc_trace_on 

Source
pub fn alloc_trace_on() -> bool
Expand description

MEMRA_ALLOC_TRACE=1 (gate-harness instrument, default OFF, never a serving flag): every Engine device allocation funnel (alloc_uninit and the zeroed / typed / host-upload wrappers) prints [alloc-trace] <bytes> bytes from <file>:<line> naming the CALLER (#[track_caller]). Why: the nsys trace of the B200 GLM-5.3-Flash decode (2026-09-03) counted ~1,545 cuMemAllocAsync / cuMemFreeAsync pairs per token (1.8 ms of host API time per token) with no host stacks; this names the Rust lines that churn the pool.