{"id":25106,"date":"2021-06-06T14:32:46","date_gmt":"2021-06-06T11:32:46","guid":{"rendered":"https:\/\/hgpu.org\/?p=25106"},"modified":"2021-06-06T14:32:46","modified_gmt":"2021-06-06T11:32:46","slug":"data-driven-analysis-and-design-of-vulkan-ray-tracing-applications-using-automatic-instrumentation","status":"publish","type":"post","link":"https:\/\/hgpu.org\/?p=25106","title":{"rendered":"Data-Driven Analysis and Design of Vulkan Ray-Tracing Applications using Automatic Instrumentation"},"content":{"rendered":"<p>Modern graphics Application Programming Interfaces (APIs) provide first-class support for ray tracing. Hardware vendors implement drivers for the graphics API including a black-box compiler. The black-box compiler creates architecture-specific binaries that leverage ray-tracing hardware acceleration. Ray-tracing support in modern APIs allows all geometry and shaders to be specified for a single execution. Thus, ray tracing is more complex and difficult to reason about than rasterization, a traditional rendering method. Ray-tracing developers must contend with the unknowns of an inscrutable GPU binary and a monolithic execution model. The increase in complexity from rasterization to ray tracing has not been accompanied by commensurate tooling. This thesis first presents Vulkan Vision (V-Vision). V-Vision is a framework for developing instrumentation passes for shaders in the Vulkan graphics API. V-Vision handles the commonalities of generating, analyzing, and presenting instrumentation data. Specifically, V-Vision provides instrumentation primitives to capture a complete inter-shader and intra-shader ray-tracing execution trace. Instrumentation utilities implemented using V-Vision are operating-system, vendor, and architecture agnostic. V-Vision does not require source-code modification or recompilation. V-Vision\u2019s out-of-the-box instrumentation utilities demonstrate the ability to gather fine-grained execution data. Moreover, VVision\u2019s utilities are capable of measuring microarchitectural effects, such as independent thread scheduling. The execution data enables limit studies at hardware, compiler, and application levels. V-Vision\u2019s annotated shader and heatmap representations enable productive debugging and profiling. V-Vision has been accepted into the MindInsight tool family. Next, this thesis presents RayScope. RayScope automatically captures application-agnostic ray-tracing execution data and geometry data from Vulkan applications. RayScope provides an interactive visualizer, populated using the ray tracing and geometry data. Therefore, RayScope can be understood as a set of tools that enables understanding, debugging, profiling, and designing through visualization of application execution data. RayScope implements an instrumentation pass and analysis using V-Vision but also implements Vulkan-API call instrumentation. RayScope\u2019s outputs are human-readable to encourage integration with other visualization and debugging tools. RayScope assisted in identifying longstanding bugs in Vulkan ray-tracing applications. RayScope further assisted in uncovering poorly defined minimum collision distances causing wasted computations in multiple ray-tracing applications. RayScope also helped identify geometry construction problems causing visual artifacts and wasteful computation in the well-known model Sponza. Finally, RayScope automatically identified a misconfiguration of Vulkan geometry flags and recommended a solution for one ray-tracing application. Applying the recommendation results in a reduction of 96.8% of any-hit shader executions. The level of information provided to the developer has a large impact on the quality of the application that they develop. Changes motivated by the information provided by V-Vision and RayScope are often minimal but have tangible implications for performance and correctness. The effectiveness of V-Vision and RayScope indicates that tooling, and the knowledge it provides, was lacking for real-time hardware-accelerated ray tracing in Vulkan. The work presented in this thesis improves the tooling landscape by releasing V-Vision and RayScope as open-source projects, and improves the body of knowledge by sharing common pitfalls in real-time hardware-acceleration ray tracing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Modern graphics Application Programming Interfaces (APIs) provide first-class support for ray tracing. Hardware vendors implement drivers for the graphics API including a black-box compiler. The black-box compiler creates architecture-specific binaries that leverage ray-tracing hardware acceleration. Ray-tracing support in modern APIs allows all geometry and shaders to be specified for a single execution. Thus, ray tracing [&hellip;]<\/p>\n","protected":false},"author":351,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[11,3],"tags":[1782,20,2073,2081,490,181,144,390,134,1847],"class_list":["post-25106","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-paper","tag-computer-science","tag-nvidia","tag-nvidia-geforce-gtx-1660-ti","tag-nvidia-geforce-rtx-3080","tag-rasterization","tag-raytracing","tag-rendering","tag-thesis","tag-visualization","tag-vulkan"],"views":2407,"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts\/25106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/users\/351"}],"replies":[{"embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25106"}],"version-history":[{"count":0,"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts\/25106\/revisions"}],"wp:attachment":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}