AMD GPU Performance Revealed Radeon™ GPU Profiler Microsoft® PIX for Windows Radeon™ GPU Analyzer
Total Page:16
File Type:pdf, Size:1020Kb
AMD GPU Performance Revealed Radeon™ GPU Profiler Microsoft® PIX for Windows Radeon™ GPU Analyzer Rodrigo Urra, Amit Ben-Moshe Advanced Micro Devices, Inc. 1 GDC 2019 Introduction AGENDA Radeon™ GPU Profiler Tour of last year Rodrigo Urra What’s new and coming 2 GDC 2019 What is Radeon GPU Profiler? GPU performance analysis tool ‒ Shows low level profiling data ‒ Visualizes GPU workloads ‒ Designed to identify performance bottlenecks ‒ Helps bridge the gap between explicit APIs and GCN Designed to support ‒ Linux® and Windows® ‒ Vulkan® and DirectX® 12 3 GDC 2019 GDC 2018 - RGP 1.2 Overview Events RenderDoc interop ‒ Frame summary ‒ Wavefront occupancy ‒ Most expensive events ‒ Event timing ‒ Barriers ‒ Pipeline state ‒ Context rolls 4 GDC 2019 RGP 1.2 - Frame summary Visualize command buffer submission, Queue parallelism, and synchronization 5 GDC 2019 RGP 1.2 - Frame summary Visualize command buffer submission, Queue parallelism, and synchronization 6 GDC 2019 RGP 1.2 - Frame summary Visualize command buffer submission, Queue parallelism, and synchronization 7 GDC 2019 RGP 1.2 - Frame summary Visualize command buffer submission, Queue parallelism, and synchronization 8 GDC 2019 RGP 1.2 - Most expensive events Pinpoint optimization candidates 9 GDC 2019 RGP 1.2 - Barriers Spot potential pipeline bubbles 10 GDC 2019 RGP 1.2 - Context rolls Find redundant state changes 11 GDC 2019 RGP 1.2 - Wavefront occupancy See how busy the GPU is 12 GDC 2019 RGP 1.2 - Wavefront occupancy See how busy the GPU is 13 GDC 2019 RGP 1.2 - Wavefront occupancy See how busy the GPU is 14 GDC 2019 RGP 1.2 - Wavefront occupancy See how busy the GPU is 15 GDC 2019 RGP 1.2 - Wavefront occupancy See how busy the GPU is 16 GDC 2019 RGP 1.2 - Event timing Understand the cost of GPU work in your frame 17 GDC 2019 RGP 1.2 - Pipeline state Expose pipeline state and GPR consumption 18 GDC 2019 RGP 1.2 - RenderDoc ßà RGP interop Understand correlation between rendered scene ßà GPU work 19 GDC 2019 Cool, but I want more! What about ‒ Wavefront shader execution? ‒ How do my shaders translate to GCN ISA? ‒ Can you give me information about my render targets? ‒ Enhanced user marker visualization? ‒ What if I’m a compute-only developer? ? 20 GDC 2019 So what’s new? GDC 2018 GDC 2019 RGP 1.2 RGP 1.3 RGP 1.4 RGP 1.5 RenderDoc interop Color & depth targets OpenCL™ support • Instruction trace • Shader ISA • User marker display 21 GDC 2019 So what’s new? GDC 2018 GDC 2019 RGP 1.2 RGP 1.3 RGP 1.4 RGP 1.5 RenderDoc interop Render & depth targets OpenCL™ support • Instruction trace • Shader ISA • User marker display 22 GDC 2019 So what’s new? GDC 2018 GDC 2019 RGP 1.2 RGP 1.3 RGP 1.4 RGP 1.5 RenderDoc interop Render & depth targets OpenCL™ support • Instruction trace • Shader ISA • User marker display 23 GDC 2019 So what’s new? GDC 2018 GDC 2019 RGP 1.2 RGP 1.3 RGP 1.4 RGP 1.5.x RenderDoc interop Render & depth targets OpenCL™ support Instruction timing Shader ISA User marker display 24 GDC 2019 RGP 1.3 - Render & depth targets Understand all your render targets 25 GDC 2019 RGP 1.3 - Render & depth targets Interactive timeline ‒ Three sections - color, depth, other ‒ Displays when gfx/compute passes begin/end ‒ Hooked up to other RGP panes via context menu 26 GDC 2019 RGP 1.3 - Render & depth targets Interactive timeline ‒ Three sections - color, depth, other ‒ Displays when gfx/compute passes begin/end ‒ Hooked up to other RGP panes via context menu 27 GDC 2019 RGP 1.3 - Render & depth targets Interactive timeline ‒ Three sections - color, depth, other ‒ Displays when gfx/compute passes begin/end ‒ Hooked up to other RGP panes via context menu 28 GDC 2019 RGP 1.3 - Render & depth targets Interactive timeline ‒ Three sections - color, depth, other ‒ Displays when gfx/compute passes begin/end ‒ Hooked up to other RGP panes via context menu 29 GDC 2019 RGP 1.3 - Render & depth targets Properties table ‒ Dimensions and format ‒ Draw and sample counts ‒ Duration ‒ Optimizations 30 GDC 2019 RGP 1.4 - OpenCL™ support What is it? How do I use it? ‒ RGP minus the graphics-only stuff ‒ Developer panel now detects OpenCL™ applications ‒ Set number of kernels, and capture! 31 GDC 2019 Planned for RGP 1.5.x Instruction timing Shader ISA User marker display 32 GDC 2019 Planned for RGP 1.5.x - Instruction timing ‒ Top-down program execution ‒ See instruction durations ‒ Find which part of your program is hot ‒ Functional unit utilization (VALU, SALU, LDS) ‒ Available for all shader stages ‒ Does not require shader modification 33 GDC 2019 Planned for RGP 1.5.x - Instruction timing ‒ Top-down program execution ‒ See instruction durations ‒ Find which part of your program is hot ‒ Functional unit utilization (VALU, SALU, LDS) ‒ Available for all shader stages ‒ Does not require shader modification 34 GDC 2019 Planned for RGP 1.5.x - Instruction timing ‒ Top-down program execution ‒ See instruction durations ‒ Find which part of your program is hot ‒ Functional unit utilization (VALU, SALU, LDS) ‒ Available for all shader stages ‒ Does not require shader modification 35 GDC 2019 Planned for RGP 1.5.x - Instruction timing ‒ Top-down program execution ‒ See instruction durations ‒ Find which part of your program is hot ‒ Functional unit utilization (VALU, SALU, LDS) ‒ Available for all shader stages ‒ Does not require shader modification 36 GDC 2019 Planned for RGP 1.5.x - Shader ISA See shader code in pipeline state 37 GDC 2019 Planned for RGP 1.5.x - User marker display Know what the GPU is working on 38 GDC 2019 Planned for RGP 1.5.x - User marker display Know what the GPU is working on 39 GDC 2019 AGENDA Introduction Microsoft® PIX for Windows AMD-specific GPU data Rodrigo Urra 40 GDC 2019 What is Microsoft® PIX for Windows? Graphics debugging and perf tuning tool ‒ DirectX® 12 on Windows 10 41 GDC 2019 What is Microsoft® PIX for Windows? Graphics debugging and perf tuning tool ‒ DirectX® 12 on Windows 10 42 GDC 2019 What is Microsoft® PIX for Windows? Graphics debugging and perf tuning tool ‒ DirectX® 12 on Windows 10 43 GDC 2019 Microsoft® PIX for Windows – AMD support Graphics debugging and perf tuning tool ‒ DirectX® 12 on Windows 10 AMD-specific GPU data ‒ Event list counters 44 GDC 2019 Event list counters: Command-specific counters 45 GDC 2019 Microsoft® PIX for Windows – AMD support Graphics debugging and perf tuning tool ‒ DirectX® 12 on Windows 10 AMD-specific GPU data ‒ Event list counters ‒ Wavefront occupancy (SQTT) 46 GDC 2019 Wavefront occupancy - Execution stage utilization 47 GDC 2019 Microsoft® PIX for Windows – AMD support Graphics debugging and perf tuning tool ‒ DirectX® 12 on Windows 10 AMD-specific GPU data ‒ Event list counters ‒ Wavefront occupancy (SQTT) ‒ High frequency counters (SPM) 48 GDC 2019 High frequency counters (HFC): ns execution sampling 49 GDC 2019 Microsoft® PIX for Windows – AMD support Graphics debugging and perf tuning tool ‒ DirectX® 12 on Windows 10 AMD-specific GPU data ‒ Event list counters ‒ Wavefront occupancy (SQTT) ‒ High frequency counters (SPM) Displayed data ‒ Includes driver + GPU work Supported GPUs Radeon™ VII, Radeon™ Vega, Radeon™ RX400 and RX500, and Intel Core i7 Radeon™ RX Vega M 50 GDC 2019 Introduction AGENDA Radeon™ GPU Analyzer RGA for Vulkan™ Amit Ben-Moshe A look at the UI The RGA layer 51 GDC 2019 What is Radeon GPU Analyzer Compiler and code analysis tool y Generate GCN ISA and IL disassembly y Retrieve shader HW resource usage y Static analysis y Independent of the installed HW y Designed to support both Linux® and Windows® y Designed to support multiple APIs: Vulkan™, DirectX®11, OpenGL™, OpenCL™ 52 GDC 2019 Integration with other tools Integrated into tools you love y RenderDoc, Shader Playground, CodeXL, Pyramid 53 GDC 2019 RGA 2.1 for Vulkan™ New approach for shader optimization y Uses the live AMD driver compiler rather than offline compiler: § What you see is what you get § Compiler updates as you update the driver y Vulkan™ app creates and compiles Vulkan™ pipelines Shaders + State SPIR-V ( glslang ) 54 GDC 2019 GLSL RGA for Vulkan™ Pipeline state y JSON representation § VkGraphicsPipelineCreateInfo for graphics (.gpso) § VkComputePipelineCreateInfo for compute (.cpso) y Edit/Compose Vulkan™ state in UI 55 GDC 2019 The new RGA UI Startup window y Select your API of choice 56 GDC 2019 Create new graphics/compute pipeline Home page y Start by creating a graphics or compute pipeline 57 GDC 2019 Add shaders Two choices § Create template GLSL shader using RGA § Load or drag & drop existing shader file (GLSL / SPIR-V) 58 GDC 2019 Edit GLSL / SPIR-V code y Syntax highlighting y Find text y Jump to line y Open header files (GLSL) 59 GDC 2019 SPIR-V binary editing Drop SPIR-V binary in RGA y Binary disassembled y Syntax highlighted y Edit and reassemble y Revert to original 60 GDC 2019 Configure the pipeline state y Graphical representation of the Vulkan™ pipeline state as a tree y Easy search and navigation y Filter the state y Edit the state 61 GDC 2019 Configure the build settings Type product name to filter Browse for folder Change include order 62 GDC 2019 Build the pipeline 63 GDC 2019 Examine the disassembly and resource usage y Disassembly and resource usage in the same view y Breaks down each instruction into its components y Color coding by instruction class y Resource usage hazards highlighted as warnings 64 GDC 2019 How can I get my app’s shaders into RGA? Use the RGA layer – beta feature y Implicit Vulkan™ layer y Serializes state and shaders for all pipelines y Can intercept specific pipelines if