Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Cleanup GPU-AV docs #8831

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spencer-lunarg
Copy link
Contributor

The current documentation is completely out-dated since the reworking we started last year.

Going through it, I removed a lot as it was to much detail in a doc file and easily was not getting updated

My goal for the future is

  1. This page is just the "tell me how to use it" type page
  2. We created a separate file in the docs folder for how each part of GPU-AV works and point to it from here

@spencer-lunarg spencer-lunarg requested a review from a team as a code owner November 8, 2024 18:33
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 298676.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17957 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17957 failed.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 299152.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17966 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17966 passed.

Therefore, the layer keeps a "counter" in per-device state that is incremented each time a shader is instrumented
to generate unique IDs.
This unique ID is given to the SPIR-V optimizer and is stored in the shader module state tracker after the shader module is created, which creates the necessary association between the ID and the shader module.
GPU-AV has many things it validates, all which have different implementation designs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GPU-AV has many things it validates, all which have different implementation designs.
GPU-AV has many things it validates, all of which have different implementation designs.

- A Descriptor Slot
- GPU-AV requires one descriptor set, which means if an application is using all sets in `VkPhysicalDeviceLimits::maxBoundDescriptorSets`, GPU-AV will not work.
- There is a `VK_LAYER_GPUAV_RESERVE_BINDING_SLOT` that will reduce `maxBoundDescriptorSets` by one if the app uses that value to determine its logic.
- `fragmentStoresAndAtomics` and `vertexPipelineStoresAndAtomics` so we can write out information into those stages.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `fragmentStoresAndAtomics` and `vertexPipelineStoresAndAtomics` so we can write out information into those stages.
- `fragmentStoresAndAtomics` and `vertexPipelineStoresAndAtomics` so we can write out information from those stages.

Copy link
Contributor

@arno-lunarg arno-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One rewrite suggestion

@@ -8,930 +8,59 @@

# GPU Assisted Validation

GPU Assisted Validation is implemented in the SPIR-V Tools optimizer and the `VK_LAYER_KHRONOS_validation` layer.
This document covers the design of the layer portion of the implementation.
GPU Assisted Validation (GPU-AV) is the part of the Validation Layers that uses the GPU and it's output to validate.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPU Assisted Validation

While most validation can be done on the CPU, some things like the content of a buffer or how a shader invocation accesses a descriptor array cannot be known until a command buffer is executed. The validation layers have a dedicated tool to perform validation in those cases: GPU Assisted Validation, or GPU-AV.

GPU-AV directly inspects GPU resources and instrument shaders to validate their run time invocations, and reports back any error. Due to dedicated state tracking, shader instrumentation, necessity to read back data from the GPU, etc... there is a performance overhead, so GPU-AV is off by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants