{"id":4577,"date":"2019-07-11T09:18:08","date_gmt":"2019-07-11T16:18:08","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/pix\/?p=4577"},"modified":"2019-07-11T09:18:08","modified_gmt":"2019-07-11T16:18:08","slug":"gpu-timing-data-in-new-timing-captures","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/pix\/gpu-timing-data-in-new-timing-captures\/","title":{"rendered":"GPU timing data in New Timing Captures"},"content":{"rendered":"<p>GPU timing data was added to the New Timing Captures preview feature in the <a href=\"http:\/\/devblogs.microsoft.com\/pix\/download\/\">PIX 1906.14<\/a> release.\u00a0 This allows developers to view GPU work submission and execution, including async compute.<\/p>\n<h3>Getting Started<\/h3>\n<p>The application should be launched with the following GPU timings checkbox checked in the options to enable timing data collection.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4579 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/EnableGpuTimingsUI.png\" alt=\"\" width=\"311\" height=\"196\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/EnableGpuTimingsUI.png 311w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/EnableGpuTimingsUI-300x189.png 300w\" sizes=\"(max-width: 311px) 100vw, 311px\" \/><\/p>\n<h3>Command Queues<\/h3>\n<p>D3D12 command queues created by the application are represented as separate lanes containing colored bars that indicate GPU work.\u00a0 The name of the lane is a combination of D3D12 command queue name, if named by the title and the D3D12 command queue type (ex: DIRECT, COMPUTE, COPY, etc.)<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4583 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/MultipleCommandQueues.png\" alt=\"\" width=\"1199\" height=\"535\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/MultipleCommandQueues.png 1199w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/MultipleCommandQueues-300x134.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/MultipleCommandQueues-768x343.png 768w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/MultipleCommandQueues-1024x457.png 1024w\" sizes=\"(max-width: 1199px) 100vw, 1199px\" \/><\/p>\n<h3>API Markers<\/h3>\n<p>API markers indicate on the CPU timeline for a particular thread where a specific operation was added to a command list.\u00a0 Each black tick mark shown below is a single API Marker.\u00a0 API markers are created when an application builds up a command list for execution.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4601 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ApiMarkers.png\" alt=\"\" width=\"1619\" height=\"224\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ApiMarkers.png 1619w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ApiMarkers-300x42.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ApiMarkers-768x106.png 768w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ApiMarkers-1024x142.png 1024w\" sizes=\"(max-width: 1619px) 100vw, 1619px\" \/><\/p>\n<h3>GPU work<\/h3>\n<p>GPU work is drawn on the timeline as a flattened pink bar by default representing EOP (End Of Pipe) to EOP timestamps to make the lane more compact allowing PIX to fit more lanes on the timeline.\u00a0 The flattened lane visualization is a quick way to see that work is being executed on the command queue.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4580 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/FlattenedGpuWork.png\" alt=\"\" width=\"1392\" height=\"125\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/FlattenedGpuWork.png 1392w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/FlattenedGpuWork-300x27.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/FlattenedGpuWork-768x69.png 768w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/FlattenedGpuWork-1024x92.png 1024w\" sizes=\"(max-width: 1392px) 100vw, 1392px\" \/><\/p>\n<h3>Viewing overlapped GPU work<\/h3>\n<p>The flattened view is not ideal for analysis as it hides overlapped GPU operations.\u00a0 Overlapping operations can be viewed by clicking the small arrow next to the command queue name and unchecking the &#8216;Flatten GPU Work&#8217; checkbox setting.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4582 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/LaneSettingsDropdown.png\" alt=\"\" width=\"859\" height=\"203\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/LaneSettingsDropdown.png 859w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/LaneSettingsDropdown-300x71.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/LaneSettingsDropdown-768x181.png 768w\" sizes=\"(max-width: 859px) 100vw, 859px\" \/><\/p>\n<p>The following shows what overlapping gpu work looks like on a command queue.\u00a0 Overlapping operations are represented as TOP (Top Of Pipe) to EOP (End Of Pipe) timestamps.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4586 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ShowingOverlappedWork.png\" alt=\"\" width=\"1393\" height=\"348\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ShowingOverlappedWork.png 1393w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ShowingOverlappedWork-300x75.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ShowingOverlappedWork-768x192.png 768w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ShowingOverlappedWork-1024x256.png 1024w\" sizes=\"(max-width: 1393px) 100vw, 1393px\" \/><\/p>\n<h3>Viewing Parallel GPU work executing on multiple Command Queues<\/h3>\n<p>PIX will also show work that is executing in parallel on the GPU from different command queues.\u00a0 This is useful if you are debugging Async Compute workloads.\u00a0 The following is an example of a DIRECT command queue and a COMPUTE command queue doing work at the same time!<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4584 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ParallelWorkAcrossTwoQueues.png\" alt=\"\" width=\"1442\" height=\"208\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ParallelWorkAcrossTwoQueues.png 1442w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ParallelWorkAcrossTwoQueues-300x43.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ParallelWorkAcrossTwoQueues-768x111.png 768w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ParallelWorkAcrossTwoQueues-1024x148.png 1024w\" sizes=\"(max-width: 1442px) 100vw, 1442px\" \/><\/p>\n<h3>Viewing Timing data<\/h3>\n<p>Mousing over individual gpu operations will show a tool tip that contains duration information.\u00a0 A table representation of a set of events can be configured to be shown in the Range Details view by dragging and selecting a range on the timeline.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4578 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/DragSelect.png\" alt=\"\" width=\"703\" height=\"225\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/DragSelect.png 703w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/DragSelect-300x96.png 300w\" sizes=\"(max-width: 703px) 100vw, 703px\" \/><\/p>\n<p>In addition to the selection you may also have to change the &#8216;Items to Show&#8217; combo box to &#8216;GPU Work&#8217;.\u00a0 The default is &#8216;PIX Events (CPU)&#8217; so there will most likely not be anything shown after making your initial selection.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4581 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ItemsToShowGpuWork.png\" alt=\"\" width=\"1520\" height=\"363\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ItemsToShowGpuWork.png 1520w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ItemsToShowGpuWork-300x72.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ItemsToShowGpuWork-768x183.png 768w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/ItemsToShowGpuWork-1024x245.png 1024w\" sizes=\"(max-width: 1520px) 100vw, 1520px\" \/><\/p>\n<p>The Range Details table shows Start Time, End Time and Duration information.\u00a0 Notice that the selection range is across all visible lanes on the timeline.\u00a0 This means that if you have a COMPUTE queue and a DIRECT queue on your timeline you might see timing information for both in the same table.<\/p>\n<p>Old Style timing captures used different terminology for timing information.\u00a0 Start Time is equal to SOP (Start of Pipe) and End Time is equal to (End of Pipe).<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4585 size-full\" src=\"http:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/RangeDetails.png\" alt=\"\" width=\"1271\" height=\"276\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/RangeDetails.png 1271w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/RangeDetails-300x65.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/RangeDetails-768x167.png 768w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2019\/07\/RangeDetails-1024x222.png 1024w\" sizes=\"(max-width: 1271px) 100vw, 1271px\" \/><\/p>\n<h3>What&#8217;s Next<\/h3>\n<p>In the future, we plan to add more features currently found in existing Timing Captures, including:<\/p>\n<ul>\n<li>VSyncs and Presents<\/li>\n<li>Visualizations that show correlations between GPU and CPU PIX events<\/li>\n<li>Fence Signals and Waits<\/li>\n<li>GPU memory Usage<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GPU timing data was added to the New Timing Captures preview feature in the PIX 1906.14 release.\u00a0 This allows developers to view GPU work submission and execution, including async compute. Getting Started The application should be launched with the following GPU timings checkbox checked in the options to enable timing data collection. Command Queues D3D12 [&hellip;]<\/p>\n","protected":false},"author":1902,"featured_media":4769,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4577","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pix"],"acf":[],"blog_post_summary":"<p>GPU timing data was added to the New Timing Captures preview feature in the PIX 1906.14 release.\u00a0 This allows developers to view GPU work submission and execution, including async compute. Getting Started The application should be launched with the following GPU timings checkbox checked in the options to enable timing data collection. Command Queues D3D12 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/4577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/users\/1902"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/comments?post=4577"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/4577\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media\/4769"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media?parent=4577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/categories?post=4577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/tags?post=4577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}