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

[spirv][vulkan] Enable device query generation and execution #15977

Merged
merged 5 commits into from
Jan 8, 2024

Conversation

antiagainst
Copy link
Contributor

@antiagainst antiagainst commented Dec 19, 2023

This commit adds a pass to materialize executable required SPIR-V
capabilities into proper device queries inside the associated
hal.executable.condition ops. Linking is updated accordingly to
unique and preseve the feature checks. The Vulkan HAL driver
is updated accordingly to probe the implementation and match
against the device queries.

Fixes #15786

@antiagainst antiagainst added hal/vulkan Runtime Vulkan GPU HAL backend codegen/spirv SPIR-V code generation compiler backend labels Dec 19, 2023
@antiagainst
Copy link
Contributor Author

antiagainst commented Dec 19, 2023

Depends on #15935.

This commit adds a pass to materialize executable required SPIR-V
capabilities into proper device queries inside the associated
hal.executable.condition ops. Linking is updated accordingly to
unique and preseve the feature checks. The Vulkan HAL driver
is updated accordingly to probe the implementation and match
against the device queries.
@antiagainst antiagainst marked this pull request as ready for review December 21, 2023 00:14
@antiagainst antiagainst merged commit 852684a into iree-org:main Jan 8, 2024
@antiagainst antiagainst deleted the spirv-check-features branch January 8, 2024 22:58
@antiagainst
Copy link
Contributor Author

Ah, there is a failure on moto edge x30 with adreno GPUs.. https://github.com/openxla/iree/actions/runs/7454190089/job/20281841995#step:6:1517 Annoyingly that Adreno GPUs only support 16bit storage for storage buffer but not uniform buffer.. Though this verifies the whole device feature probing and checks work. :)

@antiagainst
Copy link
Contributor Author

Trying #16075 to see if it makes the bots happy.

hanhanW added a commit to hanhanW/iree that referenced this pull request Jan 9, 2024
hanhanW added a commit that referenced this pull request Jan 9, 2024
antiagainst added a commit that referenced this pull request Jan 9, 2024
…#16075)

This commit relands #15977
with the following changes:

* Disable the test requiring 16bit uniform buffer access on Adreno.
  Moto Edge X30 supports VK_KHR_16bit_storage for only storage
  buffers, but not uniform buffers, see
  https://vulkan.gpuinfo.org/displayreport.php?id=14481#features_extensions
  We request both bits.
* Avoid requesting dot product to be accelerated. As long as the
  `shaderIntegerDotProduct` bit is true, we can use all the integer
  dot product instructions in SPIR-V. Whether it's accelerated or not
  does not matter for the purpose of deciding whether the SPIR-V blob
  is runnable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen/spirv SPIR-V code generation compiler backend hal/vulkan Runtime Vulkan GPU HAL backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update executable linking utilities/passes to support hal.executable.condition.
2 participants