11. Viewing a Program Tree
The Program Tree report shows a hierarchical view of the steps in the program that is run on the IPU. The report has a menu on the left-hand side that lists the Control Programs and Functions. The program steps contained within the selected control program or function are displayed in the main report area, on the right.
Click on one of the Control Program or Function numbers in the left-hand column to see the sequence of instructions that are contained within it.
You can view any debug information that has been captured for the selected program step. See Viewing Debug Information for more details.
The program steps in the main report area are listed hierarchically, and you can collapse or open steps that have nested steps with them by clicking on them. A small grey triangle at the start identifies steps that have sub-steps: if it’s pointing to the right, then that step is collapsed, and all of its sub-steps are currently hidden. Click the step to open up that step and show all its sub-steps. All steps are initially shown opened up.
Each of the program steps is colour-coded, making it easier to pick out particular steps that you’re interested in viewing. Where steps corresponding to those found in the Execution Trace report, they are coloured the same.
When you select a step that is associated with other program steps, they are all highlighted in yellow. Details of that vertex are then displayed in the tabbed section below the main program tree.
For a detailed explanation of what each of these program steps involve, please refer to the Poplar & PopLibs API Reference Guide.
11.1. Selecting a compilation step
The Program Tree report shows the tree associated with the currently selected compilation step.
Select other compilation steps to view their program trees by choosing from the drop-down list in the top left-hand corner.
11.2. Searching for program steps
You can search for a particular step by typing its name into the Search box at the top of the report window, and pressing
Program steps that match your search term are highlighted in yellow in the main part of the report.
Control Programs and Functions that contain matching steps are also highlighted in the left-hand window.
You can scroll through the results, either by pressing
Enter repeatedly, or by clicking the arrow buttons under the search box.
Single arrows move the result selection back and forward by one, and double-arrows move by ten.
When comparing two reports, two sets of results are displayed, and you can step through them separately. The top set of results shows matches in the source report (on the left), and the bottom set of results shows matches in the target report (on the right). Match highlighting works independently in both reports.
If Show Program IDs is enabled, you can search for a step’s program ID as well as its type or name.
11.3. Details tab
When a program step is selected, more details of that step are displayed in the Details tab, such as the ID, type and name of the step.
If there are any vertices associated with that step, they are listed in the table below, with the following details:
The name of the vertex class, together with a small blue icon indicating whether the vertex was written in C++ or Assembler (ASM).
The memory size occupied by each vertex instance of this type.
The number of instances of this vertex created from the selected program step.
If the program is an exchange, you can also see the size of the exchanges, and a list of which variables were involved. For exchanges between tiles, the FROM and TO tiles are displayed, and for StreamCopy programs, you’ll see the amount of data transferred from the host to the IPUs, and from the IPUs to the host. You can read more about exchange data in the Memory Report.
You can sort the vertex types listed in the Details tab of the Program Tree by name, memory size, or by the number of instances in the selected program step.
11.4. Viewing debug information
Clicking on a program step reveals debug information that was captured during program compilation. This reveals all the steps that are needed to execute the selected operation. In addition, when you select the debug information, the program steps created for that API call are highlighted in the Program Tree.
The debug information is the same as that found in the Liveness report.
11.5. Change Layout
When comparing the Program Tree of two reports a button in the top right hand corner allows you to arrange the Program Trees side by side or one on top of the other.
11.6. Viewing options
There is one option for viewing the program tree, which you can select from the Options drop-down menu in the top right-hand corner of the report screen:
Show Program IDs: Whether to append the ID of each program to its label in the tree.