This document is relevant for: Inf2, Trn1, Trn2, Trn3
System Profile#
Important
Upcoming change: In a future Neuron release, the Unified Trace Viewer will replace the System Trace Viewer in Neuron Explorer. You will still be able to view system profiles: the Unified Trace Viewer includes the System Trace Viewer tracks together with the device profiles captured for each process. For details, see Announcing the Unified Trace Viewer as the default timeline in a future Neuron release.
The Neuron System Profile show a system-level granularity of execution across instances and workers in your workload. This provides visibility into Neuron Runtime API calls and ML framework function calls (PyTorch or JAX) to help identify bottlenecks in distributed workloads. The Neuron Explorer UI provides system-level widgets for an extensible and customizable workflow.
Tip
To see device events on the same clock-synchronized timeline as the framework, Neuron Runtime, and host events from a system profile, use the Unified Trace Viewer (Developer Preview).
System Trace Viewer#
The System Trace Viewer provides an interactive timeline interface with time range selection, configurable event grouping, system event details on hover, and linking of hardware events to Device Trace Viewer widgets.
You can see events in the Neuron Runtime and correlate them with hardware execution events on the Neuron Devices.
Like the Device Trace Viewer, the System Trace Viewer keeps a history of the views you visit, so you can return to an earlier view. See View history.
You can also see the device memory (HBM) allocations for each Neuron device over time. Hovering over these memory usage events shows a breakdown by usage category.
Track Descriptions#
Each track in the System Trace Viewer has a description of what it holds. To see a track’s description, hover over its name. To keep the description open, click the name. The description closes when you click the name again, click somewhere else, scroll the timeline, or press Escape.
An event track’s description starts with the source of the track’s events. For example, the description of a neuron_rt track says that it holds work the Neuron Runtime did on the host CPU, such as loading models, starting executions, and copying tensors. Next, the description lists each field used to group the track’s events, such as nc_idx, pcore_idx, or worker_gid. Each field is shown with its value for that track and an explanation of what it means. Which fields appear depends on the grouping option selected in Settings. Host-device transfer, transfer bandwidth, HBM usage, and host CPU utilization tracks also have descriptions.
Note
Neuron Explorer stores these descriptions in the profile when it processes it. A profile processed with an earlier version of Neuron Explorer has no descriptions. To add them, reprocess the profile.
Memory Viewer Integration#
The System Trace Viewer is linked to the Memory Viewer widget, so you can move between runtime events and the memory they allocate:
From the timeline to the Memory Viewer — click an HBM allocation event (
nrt_dma_mem_allocornrt_dma_mem_dealloc) to open the Memory Viewer. The HBM tab switches to the Snapshot view at that timestamp, with the allocation selected.
From the Memory Viewer to the timeline — click an allocation in the PyTorch Allocator tab to highlight the runtime events in the System Trace Viewer that share its trace ID. To clear the highlight, click an empty area of the timeline or press Escape.
The PyTorch Allocator tab and the call stacks on HBM allocations require a PyTorch memory snapshot captured with the profile. See Capturing a PyTorch memory snapshot.
Visualizing Host Device Transfers#
The System Trace Viewer includes tracks for host-device data transfers, which are often a significant contributor to end-to-end latency and can reveal whether a workload is bottlenecked on PCIe traffic. host_to_device transfers move data from CPU RAM to device HBM (for example, loading model weights or input tensors), while device_to_host transfers move data in the reverse direction (for example, returning output tensors to the host). For each direction, two tracks are shown:
A transfer events track that displays each individual transfer as a discrete event on the timeline. This is useful for correlating specific transfers with surrounding runtime and hardware events to understand when and why a transfer occurred.
A transfer bandwidth track that plots the PCIe bandwidth consumed by transfers in that direction over time. This helps identify how close the workload is to the link’s practical throughput limit.
For distributed workloads, transfer tracks are aggregated by Instance ID and NeuronCore. For example, i-046decdee2ea88e5a/NC:0/host_to_device_transfers shows transfers from host to device on instance i-046decdee2ea88e5a that are required for model execution on NeuronCore 0 of that instance.
Other grouping options are available in the System Trace Viewer settings. The default Instance + NeuronCore grouping renders one set of transfer tracks per NeuronCore on each instance in the workload, which is useful for pinpointing per-core behavior. The Instance grouping aggregates transfers across all NeuronCores on a given instance, producing a single set of tracks per instance, which is useful for comparing total host-device traffic between instances.
To see host-device DMA engine activity on the same timeline as a NeuronCore’s instructions, open a device profile. See Host-device DMA tracks.
Linking Transfers to Framework Operations#
Clicking a host-device transfer triggered by the ML framework draws an arrow to the framework operation that triggered it. See Host-device transfers on the Dependency Chain Viewer page.
Visualizing Host CPU Utilization#
The System Trace Viewer can display per-core host CPU utilization at the bottom of the timeline. Each CPU core is shown as a separate track that plots its utilization percentage (0–100%) over time, which helps identify host-side CPU bottlenecks and correlate them with runtime and hardware activity.
Prerequisite: CPU utilization must be captured during profiling by including ProfileMode.CPU_UTIL in the profiling modes, which produces the cpu_util.pb output file. See Capture profiles with Neuron Explorer for details. If the profile does not contain CPU utilization data, no tracks are shown.
This visualization is off by default. To enable it, open the System Trace Viewer settings and turn on the Host CPU Utilization toggle (Show CPU utilization). The tracks are added at the bottom of the timeline, one per core, labeled <instance_id>/CPU:<cpu_id>/host_cpu_util.
Hovering over a point shows the utilization value at that time. When utilization varies within a sampled window, the hover text reports the average, minimum, and maximum utilization for that window so you can spot short spikes in CPU activity.
Note
All sampled cores are shown, regardless of whether they correspond to Neuron-related activity.
Adding Widgets#
The System Profile supports both System and Device widgets, enabling multi-profile analysis, for example comparing annotated device events across different devices.
To add a widget:
Click the Add Widget button to open the Add Widget modal.
Select a Device or System widget.
Click a widget tile to load it with the selected profile. Each tile is tagged with its supported profile type (system, device, or both).
To load multiple instances of the same widget type for different profiles, repeat the steps above and select a different profile each time.
After adding a widget, you can switch to a different profile by using the profile dropdown at the top of the widget.
Settings#
The System Trace Viewer supports multiple grouping modes to organize events for different analysis perspectives. You can switch between the following grouping modes in the settings to focus your analysis on different aspects of system performance:
Grouping Option |
Description |
Example |
|---|---|---|
Default |
Groups events by instance ID, process ID, and event source, with an additional tier of grouping based on the event source.
For framework events, the operator dispatch events ( |
Framework dispatch events: |
CPU vs Device Grouping |
Groups events by event source (CPU or Neuron device events) |
Runtime events: |
NeuronCore Grouping |
Groups events by individual NeuronCore |
|
Thread Grouping |
Groups events by thread identifier |
|
Process Grouping |
Groups events by process identifier |
|
Instance Grouping |
Groups all events by instance only |
|
To choose which fields system event hovers show, see Hover options.
Event Details#
Clicking on trace events in the timeline populates the Event Details widget with a list of properties for the system trace event.
Search#
The Search widget is also available in the System Trace Viewer, allowing you to search for events across all visible tracks. For system profiles, search results from multiple tracks accumulate in the Search Results Table as responses arrive.
For full usage details including navigation and clearing results, see Search in the Device Trace Viewer.
Source Code Linking#
When capturing profiles through the native PyTorch profiling API, using with_stack=True will record source information in the framework events.
If the source code is uploaded in the Source Code section of the upload dialog, for any framework event with <source_file>(<line_number>) in the name, you can Cmd+click (macOS) or Ctrl+click (Windows/Linux) on the event to scroll to the corresponding
source code line in the Code Viewer.
Device Profile Linking#
The System Trace Viewer links hardware events to the Device Trace Viewer, which renders the corresponding device traces.
Navigating from the System Trace Viewer to a Device Trace Viewer can be accomplished in two ways:
Open the Device Profile List Modal#
To see a list of all device profiles captured during your workload:
Click the “Device Profiles List” button in the top right action bar of the System Trace Viewer to open a modal containing a list of device profiles
Select a Device Profile and click Submit to open the Device Trace Viewer with the selected device profile
Drill-down from Hardware Events#
To drill-down from a hardware event to the Device Trace Viewer:
Find a hardware event such as
nc_exec_runningClick on the hardware event
Wait for the Device Trace Viewer to open
This will open a new Device Trace Viewer with the selected device profile showing detailed hardware events. To learn about device profiles, see Device Profiles in Neuron Explorer.
To see the device profile on the same timeline as the system events instead, without opening a separate viewer, use the Unified Trace Viewer.
Dependency Chain Viewer#
Click an event that has a flow_id to draw arrows to the events linked to it and list them in the Dependency Chain Viewer widget.
See System event dependencies on the Dependency Chain Viewer page.
This document is relevant for: Inf2, Trn1, Trn2, Trn3