Usage
  • 27 views
  • 38 downloads

Applications and Limitations of Vulkan-Layer-based Instrumentation

  • Author / Creator
    Cheung, Deric A
  • The field of computer graphics is constantly evolving to meet the demands of modern applications.
    One such evolution is the introduction of low-level Application Programming Interfaces (APIs) such as Vulkan to give applications a greater amount of control over the hardware to facilitate efficient CPU-GPU interoperability and fine-grained scheduling and synchronization of work for the GPU.
    Despite the low-level nature of Vulkan, there is still a great deal of execution behaviors that are not well understood or are difficult to observe due to black-box hardware and driver implementations.
    To better understand these behaviors, the Vulkan layer system has been leveraged to profile and debug Vulkan applications by intercepting and modifying the behavior of Vulkan API function calls.
    The Vulkan layer system has been used to develop frameworks like Vulkan Vision, which employs shader instrumentation to capture shader execution traces and analyzes them to reveal shader execution behaviors such as control-flow divergence, Independent Thread Scheduling on NVIDIA GPUs, and execution hotspots.
    This thesis further explores the applications and limitations of the Vulkan layer system for analyzing execution behaviors of Vulkan applications to better understand and optimize their performance.

    One of the contributions of this thesis is ReRay — an extensible toolchain and workflow for capturing, parsing, analyzing, and manipulating ray-tracing pipeline execution traces to better understand ray-tracing pipeline execution behaviors down to the hardware and driver level.
    Building on top of prior work with Vulkan Vision, ReRay provides insights into how ray-tracing pipelines interact with the hardware and driver to facilitate the development of more efficient ray-tracing algorithms and applications.
    Black-box hardware and driver execution behaviors impacting ray-tracing performance such as warp execution order, shader execution divergence, and unnecessary intersection tests are revealed with the use of ReRay.

    This thesis also explores the use of Vulkan layers to examine the management and usage of shader resources.
    Utilizing Vulkan's resource binding model efficiently can be challenging due to the complexity of managing many pipeline variants expecting varying types and numbers of resources for use by its shaders.
    A Vulkan layer is proposed to observe and evaluate the usage of resources in Vulkan applications, with an additional focus on uniform data — data that remains constant for all shader invocations of an executing pipeline.
    Uniform data is used for a variety of purposes, such as passing transformation matrices, lighting parameters, and material properties to shaders.
    Depending on the size, update frequency, and usage of uniform data, Vulkan features such as push constants, inline uniform blocks, and specialization constants can be used to optimize the management of uniform data to reduce the memory access and GPU state-change overheads associated with managing and using uniform data.

    In spite of the power granted to Vulkan layers, the Vulkan API and the Vulkan Vision framework have limitations that prevent Vulkan layers from being used to examine cutting-edge hardware features such as Shader Execution Reordering on Ada Lovelace NVIDIA GPUs.
    Inefficiencies also arise when constructing a Vulkan layer to examine shader resource contents without application-specific context or knowledge.
    Further limitations in the Vulkan API prevent practical automatic optimization of shader-resource usage on behalf of an application by a application-agnostic Vulkan layer.
    A discussion of advancements in the Vulkan API, hardware features, and the design of graphics renderers in game engines also highlights the changing landscape of shader resource management in Vulkan applications.
    These changes make some aspects of shader resource management and uniform data optimizations less relevant to modern Vulkan applications.

  • Subjects / Keywords
  • Graduation date
    Fall 2024
  • Type of Item
    Thesis
  • Degree
    Master of Science
  • DOI
    https://doi.org/10.7939/r3-2ejm-ez33
  • License
    This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law.