|
| 1 | + |
| 2 | +Profiling modes |
| 3 | +--------------- |
| 4 | + |
| 5 | + In addition to clicking on the **Capture profile** button or by using the |
| 6 | + capture profile hotkey, a **Dispatch range** can be specified for OpenCL |
| 7 | + applications. To configure the panel to capture an OpenCL Dispatch range, |
| 8 | + go back to the **Connection** tab and click on the **Edit** button |
| 9 | + next to the Enable profiling checkbox. With Advanced mode turned off, there |
| 10 | + will be one **Edit** button next to the Enable profiling checkbox. If |
| 11 | + Advanced mode is active, each row will have an **Edit** button next to each |
| 12 | + Profiling enable checkbox. Click the **Edit** button for the row which has a |
| 13 | + filter matching the target application to be profiled. A dialog box will |
| 14 | + then open: |
| 15 | + |
| 16 | +.. image:: media/Capture_1.png |
| 17 | + |
| 18 | +The API combobox is used to select which profiling option(s) are displayed |
| 19 | +for a supported API. The **Auto detect** API selection acts as a catch-all |
| 20 | +if the API isn't chosen, and only supports the **Trigger mechanism**. |
| 21 | + |
| 22 | +Selecting **OpenCL** for the *API* and choosing **Dispatch range** for the |
| 23 | +*Profile mode* will display start and end dispatch edit boxes. For example, |
| 24 | +the values 5 and 20 could be entered and the profile would consist of 15 |
| 25 | +dispatches starting with the 5th dispatch. The 20th dispatch is not included |
| 26 | +in the trace. |
| 27 | + |
| 28 | +The number of dispatches captured is limited to 50 at present to prevent the |
| 29 | +amount of captured data becoming too large. |
| 30 | + |
| 31 | +.. image:: media/Capture_4.png |
| 32 | + |
| 33 | +Below the profile mode is an option to allow detailed instruction tracing. |
| 34 | +Normally this is disabled but a hexadecimal API PSO hash value may be specified. |
| 35 | +During capture, any event with the same API PSO hash will have its instruction |
| 36 | +timings recorded and these can be viewed in the Instruction Timing tab in the |
| 37 | +Radeon GPU Profiler. Refer to the documentation with the Radeon GPU Profiler to |
| 38 | +understand the capture granularity and limitations of instruction tracing. API |
| 39 | +PSO hash values should be non-zero and less than UINT64_MAX, otherwise |
| 40 | +instruction tracing will be disabled. |
| 41 | + |
| 42 | +.. image:: media/Capture_5.png |
| 43 | + |
| 44 | +The normal workflow would follow this pattern: |
| 45 | + |
| 46 | +- A profile would be taken in the traditional way without the API PSO hash |
| 47 | + specified. |
| 48 | + |
| 49 | +- The profile can be loaded into the Radeon GPU Profiler and inspected to find |
| 50 | + an event of interest. |
| 51 | + |
| 52 | +- The API PSO hash value can be copied to the clipboard from the UI. |
| 53 | + |
| 54 | +- The API PSO hash value can then be pasted into the edit box in the Radeon |
| 55 | + Developer Panel and the application can then be restarted and profiled in |
| 56 | + the same way as before. Obviously, it is important that the scene in the |
| 57 | + application is similar when taking both captures so that the same API PSO is |
| 58 | + being executed on the GPU. |
| 59 | + |
| 60 | +Once the profile configuration settings have been entered for the target |
| 61 | +application, click the **OK** button to close the dialog. Start the target |
| 62 | +application in the normal way. |
| 63 | + |
| 64 | +**Notes:** |
| 65 | + |
| 66 | +- Currently for Vulkan, the API PSO needs to be specified before the |
| 67 | + application is started. For DX12 it is possible to take a profile, change the |
| 68 | + PSO value and take another profile in the same session. |
| 69 | + |
| 70 | +- It is important that the API PSO hash be identical between the 2 profiles. |
| 71 | + For example, modifying shader code could change the API PSO hash. |
| 72 | + |
| 73 | +- The **Restore Defaults** will restore the defaults for the API selected in |
| 74 | + the API combobox for the current target application. |
| 75 | + |
| 76 | + If **Dispatch range** has been specified, the profile will be carried out |
| 77 | + automatically according to the parameters specified. Therefore, on the |
| 78 | + **Profiler** tab, the **Capture profile** button will be grayed out. Once |
| 79 | + the profile has been taken, it will be added to the **Recently collected |
| 80 | + profiles** list. |
| 81 | + |
| 82 | + RDP will detect the API type of a running target application and automatically |
| 83 | + apply the appropriate profile options. If for example, an **OpenCL** application |
| 84 | + is started, the profile options entered in the Profile configuration dialog box |
| 85 | + for the **OpenCL** API will be applied. If a graphics application is started, |
| 86 | + the **Trigger mechanism** profile mode will be applied. |
| 87 | + |
| 88 | +**Note:** Only recent drivers support these new profile modes. If the driver |
| 89 | +doesn't support a particular profile mode, a warning message will be displayed |
| 90 | +and profiling for that run of the application will be disabled. The default |
| 91 | +**Trigger mechanism** profile mode should always work. |
0 commit comments