Intel® Graphics Performance Analyzers Framework: Metrics Collector
Learn more about collecting metrics. Explore choosing the metrics you want and storing them to a .csv file for analysis and for regression comparisons.
Hello. I'm Jay Ravi. I'm one of the engineers on the Graphics Performance Analyzers team at Intel and this is episode three of our GPA Framework Quick Tip series. Last time, Justin demonstrated use of deferred and subcapture features in GPA Framework. For this quick tip, I'd like to show you our GPA Metrics Collector Command Line tool. GPA Metrics Collector provides query-based, frame-level metrics and supports gathering metrics on DX11, DX12, and Vulkan applications both on Intel hardware and non-Intel hardware.
Note that metrics on non-Intel hardware are limited to only graphics API-based query metrics alone. Let's begin by listing available metrics. We need a captured stream for this step. Please refer to previous quick tip videos on how to do that. I already have a D3D12 stream captured here. You can check the list of available metrics for it by typing the tool name followed by the stream path and the -s option.
This lists all the available metrics on your GPU device for your application's graphics API. Here's a list of available metrics on Intel Integrated GPU on an Intel Alchemist GPU. The number of metrics could be way more than an integrated GPU. Notice that among the many metrics available, there are metrics specifically available for ray tracing workloads as well. The list of available metrics is graphics API dependent, GPU device dependent, and driver dependent.
So be sure to update your drivers to always get the latest list of metrics for your GPU. To gather metrics on a terminal window, type the tool name followed by the path to the stream and the frame number with the --frame-index or -f option. Now let's write that data to a .csv file to make some sense of it.
Use the -c option to specify an output file path, and let's include units for each metrics with the -you option. Since we didn't explicitly specify the metrics we require, the tool will gather data for all available metrics. Now let’s explicitly list a metrics group we are interested in, in this case, the Render Basic set. Use the --metrics-list/-m to request specific metrics groups and metrics within each group.
Here's another example with metrics from two different groups. For more advanced usages, please review the Help text. Let's move on to range aggregation. GPA Metrics Collector automatically detects graphics API call boundaries where GPU work is executed. An example of this would be the beginning and ending of command lists. Notice that in our .csv files metric values are displayed per GPU call range in each column. You can condense the values for queried ranges to report a single value for each metric using the range aggregation option -r. Moving on to multiple frames, we can extend metrics collection over a contiguous range of frames as well. Specify -f as before to indicate the starting frame and use -n option to specify the number of frames to collect from the start frame.
Feel free to use any of the previous options as well. And that's our tip for today. Be sure to explore these features and give us your feedback in the comments. Tune in next time when Pamela will showcase how to use the logging layer for debugging. Thanks for watching the Intel® GPA Framework Quick Tip series. Remember to like this video and subscribe to the Intel® Software YouTube* channel, and to learn more about this topic, follow the links in the description.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.