Skip to content

Adding --iree-vulkan-experimental-indirect-bindings=true flag. - #14977

Merged
benvanik merged 1 commit into
mainfrom
benvanik-indirect-flags
Sep 20, 2023
Merged

benvanik merged 1 commit into
mainfrom
benvanik-indirect-flags

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

This makes all descriptor set layouts have the new Indirect bit set and plumbs it all the way through to the runtime
IREE_HAL_DESCRIPTOR_SET_LAYOUT_FLAG_INDIRECT bit. SPIR-V codegen can inspect the pipeline layout attr of exports to discover which descriptor sets are indirect and lower via VK_KHR_buffer_device_address and for the runtime to specially handle the indirect descriptor sets by producing device address buffers. The flag is currently experimental as interop with non-indirect dispatches (custom/produced by other higher layers like IREE input dialects/plugins) and multi-versioning (producing both direct and indirect) are TBD. It should be sufficient for users targeting specific Vulkan devices where they know the support is present, though.

Note that while this is just the plumbing for the flag and the IR/runtime bits nothing is either lowering differently or setting up the appropriate runtime structures but it should allow codegen to start experimenting with alternative lowerings.

Progress on #13945.

@benvanik
benvanik force-pushed the benvanik-indirect-flags branch from fc17010 to 38bd689 Compare September 19, 2023 22:51
@benvanik
benvanik requested a review from kuhar September 19, 2023 22:51
This makes all descriptor set layouts have the new Indirect bit set
and plumbs it all the way through to the runtime
`IREE_HAL_DESCRIPTOR_SET_LAYOUT_FLAG_INDIRECT` bit. SPIR-V codegen can
then inspect the pipeline layout attr of exports to discover which
bindings are indirect and lower differently and for the runtime to
specially handle the indirect descriptor sets by producing device
address buffers.

Progress on #13945.
@benvanik
benvanik force-pushed the benvanik-indirect-flags branch from 38bd689 to 2d538fa Compare September 19, 2023 23:25
@benvanik
benvanik merged commit fb9e1b6 into main Sep 20, 2023

@kuhar kuhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@benvanik
benvanik deleted the benvanik-indirect-flags branch September 20, 2023 00:57
kuhar added a commit to kuhar/iree that referenced this pull request Jan 31, 2024
This is so that we can check decide if the
`PhysicalStorageBufferAddresses` is available.

Issue: iree-org#14977
kuhar added a commit that referenced this pull request Feb 1, 2024
This is so that we can check
`VkPhysicalDeviceBufferDeviceAddressFeatures` and decide if the
`PhysicalStorageBufferAddresses` SPIR-V capability is available.

Issue: #14977
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.

2 participants