Displaying Profile Data
Previewing on the GUI
- In a thread-level unit, if a unit contains multiple rows of data, the data distribution in the unit is displayed in thumbnail mode without expanding the unit, as shown by 1 in Figure 1.
- If the process-level unit is not expanded, the process-level unit is filled in gray based on the data on the timeline in the thread level to display the data distribution in the thread-level unit, as shown by 2 in Figure 1.
CPU, Memory, and Network usage data, that is, numeric events, are displayed in bar charts on the timeline, as shown by 3 in Figure 1. The preview function is not supported.
Displaying Data in the Cluster Scenario
You can import and display cluster data to MindStudio Insight without manually merging multiple single-card data. MindStudio Insight supports multiple hosts and cards in the training scenario and multiple cards in the inference scenario. It can automatically identify all trace_view.json and msprof*.json files in the imported folder. Figure 2 shows the timeline data of 16 cards.
In a cluster scenario, you can hover the pointer over the card number to quickly locate the file directory corresponding to the card data. The file directory corresponding to the card is displayed. For example, if you hover the pointer over 0, the file directory corresponding to the card is displayed, as shown in Figure 3.
Displaying and Comparing Data by Card/Unit
When filtering data by card and unit, you can select the card and unit in sequence to display the filtering information.
- Display by card: displays only one card. Click
in the upper left corner of the page, select Card Filter, click the text box, and select 1 from the drop-down list. The timeline information of card 1 is displayed, as shown in Figure 4.
- Display by unit: displays only the Overlap Analysis unit of each card. Click
on the toolbar in the upper left corner of the page, choose Units Filter, and click the text box. Select Overlap Analysis from the drop-down list. The timeline information of the Overlap Analysis unit is displayed, as shown in Figure 5.
Pinning and Comparing Data by Unit
- MindStudio Insight supports fixing and pinning units. You can drag the collapsed units to freely sort them, facilitating comparison with other levels of the same type.
If the level-2 and level-3 units in the pinned card are also pinned, you can only drag and drop the card-level units. Similarly, if the level-3 units in the pinned level-2 units are also pinned, you can only drag and drop the level-2 units.
For example, click
next to a level-3 unit name in cards 0, 1, and 2 to pin the unit name. Click
again to unpin the unit name, as shown in Figure 6. - MindStudio Insight also allows you to pin the communication units in the same communication group by one click.Right-click the Group sub-unit under the Communication unit and choose Pin (Same Group group name) from the shortcut menu to pin all units in the communication group. This makes it easier to view and compare the units, as shown in Figure 7.
Right-click a pinned unit and choose Unpin (Same Group group name) or Unpin (all) from the shortcut menu to unpin the unit, as shown in Figure 8.
Click Unpin (Same Group group name) to unpin all units in the communication group, and click Unpin (all) to unpin all pinned units.
Supporting Single Card and Unit Time Alignment
In the single-card, cluster, and multi-model scenarios, the relative positions of timelines are automatically aligned. If automatic alignment is not required, right-click anywhere, choose Recover cards default offset from the shortcut menu to restore the default offsets of all cards and models, and manually align the relative positions.
- Manually aligning the relative positions to the start position
In the Offset dialog box, click
(Align to Start). The offset of the leftmost thread data in the card from the initial position (00:00.000) of the timeline is displayed in the Timestamp Offset(ns) text box. Then press Enter. The Timeline tab page aligns the thread data with the initial position of the timeline.As shown in Figure 9, the offset of the leftmost thread data on card 0 from the initial position of the timeline is 7,293,500 ns.
- Manually setting the offset
In the multi-host multi-card scenario, the time on the host may be inaccurate. As a result, the relative positions of timelines of multiple cards may be inaccurate. MindStudio Insight supports time calibration in the single-card dimension, as shown in Figure 10. You can set the offset to move the timeline of a single card leftward or rightward to calibrate the time. The unit of the offset is ns. A negative value indicates rightward movement, and a positive value indicates leftward movement.
To calibrate time more flexibly, MindStudio Insight also supports time calibration by unit, as shown in Figure 11. On the Timeline tab page, expand the card, click Offset next to the required level-2 unit name, enter a value in the text box, and press Enter to adjust the unit time. In the DB scenario, you need to expand the host name and adjust the time on the level-2 units under host and each card.
Displaying Multiple Hosts and Cards
When multiple hosts and cards are imported, data can be displayed by host in MindStudio Insight, as shown in Figure 12.
- In the figure, 1 indicates the host name, which consists of hostName and hostUid.
- In the figure, 2 indicates the card layer, which displays the corresponding unit based on the card sequence number of the current host.
- In the figure, 3 indicates the parameter configuration item. In the multi-host multi-card scenario, you need to select Host Name and then select Rank ID under the host for configuration.
If the imported DB file contains the HOST_INFO table, this configuration item is displayed on the System View tab page (when Stats System View or Expert System View is selected) and the Find tab page on the Timeline tab page.
This function can be displayed only in the unified DB scenario.
Setting and Viewing Markers
- Region markerOn the Timeline page, select an area and click
or press K to mark and save the selected area, as shown in Figure 13.
Double-click a marker to set the marker pair attributes. You can modify the marker pair name and color, and delete the marker pair, as shown in Figure 14.
- Single-point markerClick anywhere in the uppermost empty unit or press K to generate a single-point marker, as shown in Figure 15.
Double-click a marker to set its attributes. You can modify the marker name and color, and delete the marker.
- Marker managementClick
on the toolbar in the upper left corner to view all marker information, as shown in Figure 16.
- Click the
icon corresponding to a marker to delete the marker. - Click Clear in the lower part of the dialog box to delete all markers.
- Click a region marker. The Slice Detail tab page in the lower part of the page displays the duration information of the region.
- If a marker is not displayed on the current visualization page, click the
icon corresponding to the marker to go to the marker page. - Click the color icon corresponding to a marker to set the color to facilitate marker category management.
- Click the
Displaying Operator Flows
- MindStudio Insight displays the operator flows. You can click an operator with a flow to display the flow associated with the operator. Even if the process at the start point or end point of the flow is folded, the flow does not disappear, as shown in Figure 17.
- If the processes at the start point and end point of a flow are collapsed, the flow disappears.
- In MindStudio Insight, flows are connected only to the first operator delivered in the same batch. In the Ascend hardware unit, if you click an operator and find that the associated flow is connected to another operator, the two operators are delivered in the same batch.
- MindStudio Insight supports full flows. You can click
on the toolbar in the upper left corner of the page. In the dialog box that is displayed, you can select one or more flow types. Alternatively, you can search for a flow type by keyword in the search box and select the corresponding flow type. All flows of the corresponding type are displayed in the graphical pane, as shown in Figure 18.
A maximum of 10 flow types can be selected.
The mappings between the application-layer operators and the NPU operators delivered and executed through flows are as follows:
- HostToDevice
- Delivery and execution mappings from CANN-layer nodes (operators) to NPU operators on Ascend Hardware (host to device).
- Delivery and execution mappings from CANN-layer nodes (operators) to communication operators (host to device).
- async_npu
- Delivery and execution mappings from application-layer operators to NPU operators on Ascend Hardware.
- Delivery and execution mappings from application-layer operators to communication operators.
- async_task_queue: mappings from enqueue to dequeue at the application layer, which is used only in the PyTorch scenario.
- fwdbwd: mappings from the forward API to the backward API, which is used only in the PyTorch scenario.
- MSTX: delivery and execution mappings from dotting data to NPU operators on Ascend Hardware.
- Whether mappings between layers are displayed depends on whether the data is collected in a specific scenario.
- The flow between layers is associated with whether the layers are expanded. If a flow type is selected and the corresponding layer is not expanded, the flow of this type is not displayed.
- HostToDevice
Selectively Analyzing Multi-Card Data
When data of more than 16 cards is imported to MindStudio Insight, you can selectively analyze the data on the Timeline tab page. You can perform one-click global analysis or partial analysis.
- One-click global analysis: On the Timeline tab page, click Start Global Analysis to analyze all card data, as shown in Figure 19. After all card data is analyzed, the Start Global Analysis button disappears.
- Partial analysis: If only some card data needs to be analyzed, click
next to Rank ID to analyze the data of the selected card, as shown in Figure 20. After the card data is analyzed, the button disappears, as shown in card 0 and card 1 in the figure.
If a large number of cards are imported, you can use the card filter function to locate the cards whose data needs to be analyzed. On the toolbar of the Timeline tab page, click
, choose Card Filter, and click the text box. Select the cards to be displayed from the drop-down list. The corresponding information is displayed on the Timeline tab page. Click
next to card ID to analyze data. As shown in Figure 21, cards 2, 5, and 7 are selected for analysis. - Card parsing in the same communication group: After a card is parsed, right-click the Group sub-unit in the communication group and choose Parse Cards of Related Group from the shortcut menu. All cards related to the communication group of the unit are parsed, as shown in Figure 22. After the parsing is complete, the shortcut menu changes to Parsed All Cards of Related Group and is dimmed.
Aligning Custom Operator Time
MindStudio Insight supports aligning the time of selected operators using the shortcut keys, which facilitates operator information comparison.
- Aligning the operator time
- On the Timeline tab page, right-click an operator and choose Set base slice from the shortcut menu to set the selected operator as the base slice, as shown in Figure 23.
- Select the operator in the level-2 unit that is different from the base slice.
- Press L (left alignment) to align the selected operator with the left boundary of the base slice, as shown in Figure 24.
Press R (right alignment) to align the selected operator with the right boundary of the base slice, as shown in Figure 25.
Regardless of whether the selected operator is left-aligned or right-aligned, the operator in the NPU unit whose device is the same as that of the selected operator also shifts.
- Clearing base slice
Right-click any position in the unit and choose Clear base slice from the shortcut menu to cancel the base slice, as shown in Figure 26.
- Recovering cards default offset
If the operator time alignment operation has been performed, right-click any position in the unit and choose Recover cards default offset from the shortcut menu to restore the default offset, as shown in Figure 27.


























