stormlog.infer.trace_nsys
Import Nsight Systems SQLite exports as inference activity references.
nsys export --type sqlite REPORT.nsys-rep writes the CUPTI activity tables
and NVTX ranges of a report into SQLite. This reader turns them into the same
in-memory trace as the Kineto reader, so the import, iteration linking, and
accounting rules are shared:
GPU work comes from
CUPTI_ACTIVITY_KIND_KERNEL,_MEMCPYand_MEMSET; launch calls from_RUNTIME, which also holds driver calls. A report can hold several processes, so launches are keyed by process and correlation ID.Iteration ranges are NVTX ranges named
stormlog.iteration/...; emit them withiteration_range(..., nvtx=True).A GPU event’s
deviceIdis the CUDA device ordinal inside its process, afterCUDA_VISIBLE_DEVICES.TARGET_INFO_CUDA_DEVICEmaps each process’s ordinals toTARGET_INFO_GPUrows, which name the UUIDs. Older exporters (nsys 2024.4) do not write that table; a report of such an export that lists one GPU still names it, since nsys lists every GPU on the host. Otherwise the devices stay unnamed: re-export the report with a newer nsys.
Record CUDA graphs with --cuda-graph-trace=node. At the default graph-level
tracing nsys writes one CUPTI_ACTIVITY_KIND_GRAPH_TRACE row per graph
launch instead of its kernels. This reader does not import those rows; it
counts them in the summary and says how to re-record.
Functions
|
Read an |
|
(pid, tid) from an nsys globalTid: |