LeanProfiler

6.2. Run a model command🔗

Arguments after the executable name go to TorchLean's model runner:

LEAN_PROFILE=1 \
LEAN_PROFILE_OUT=build/traces/mlp-cpu.json \
LEAN_PROFILE_SUMMARY_OUT=build/summaries/mlp-cpu.json \
LEAN_PROFILE_PROCESS_NAME="TorchLean MLP CPU" \
lake exe leanprofiler_torchlean mlp --device cpu

The outer event tree is:

main
└── torchlean.mlp

That span measures the host path through the command. It does not invent layer, graph-node, tensor operation, kernel, loader-worker, or optimizer events. Add narrower spans only where the running program knows the corresponding boundary.