Skip to content

Adding flag placeholders to semaphores/events. - #18122

Merged
benvanik merged 1 commit into
mainfrom
users/benvanik/event-sema-flags
Aug 6, 2024
Merged

benvanik merged 1 commit into
mainfrom
users/benvanik/event-sema-flags

Conversation

@benvanik

@benvanik benvanik commented Aug 6, 2024

Copy link
Copy Markdown
Collaborator

Events also gain a queue affinity that can be used to indicate which queues a particular event may be set/waited on. The flags are currently unused but will allow us to specify behavior modes in the future (such as making exportable semaphores opt-in).

Since semaphores and events aren't yet exposed in the compiler there were no changes needed there. The compiler will not (in common usage) ever return new semaphores so will not need exportable flags and other things we'll potentially add - applications will be setting those via the C API.

Progress on #18121 (event queue affinity needed for VK_KHR_device_group).

Events also gain a queue affinity that can be used to indicate which
queues a particular event may be set/waited on. The flags are currently
unused but will allow us to specify behavior modes in the future (such
as making exportable semaphores opt-in).

Since semaphores and events aren't yet exposed in the compiler there were
no changes needed there. The compiler will not (in common usage) ever
return new semaphores so will not need exportable flags and other things
we'll potentially add - applications will be setting those via the C API.
@benvanik benvanik added the hal/api IREE's public C hardware abstraction layer API label Aug 6, 2024
@benvanik
benvanik requested a review from ScottTodd August 6, 2024 17:50
@benvanik
benvanik marked this pull request as ready for review August 6, 2024 18:04
@benvanik
benvanik enabled auto-merge (squash) August 6, 2024 18:04
Comment on lines -161 to +162
iree_status_t status = iree_hal_semaphore_create(device, 0ull, &semaphore);
iree_status_t status = iree_hal_semaphore_create(
device, 0ull, IREE_HAL_SEMAPHORE_FLAG_NONE, &semaphore);

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.

We may want to start calling out API changes like this in release notes / relnotes somehow.

  • iree_hal_semaphore_create gained a iree_hal_semaphore_flags_t bitfield parameter. Existing call sites should be updated from iree_hal_semaphore_create(device, initial_value, &out_semaphore) to iree_hal_semaphore_create(device, initial_value, IREE_HAL_SEMAPHORE_FLAG_NONE, &out_semaphore). Future changes will add flags for X, Y, and Z.

@benvanik
benvanik merged commit a28f76f into main Aug 6, 2024
@benvanik
benvanik deleted the users/benvanik/event-sema-flags branch August 6, 2024 22:04
yzhang93 added a commit to nod-ai/iree-amd-aie that referenced this pull request Aug 9, 2024
Following runtime changes in IREE
- Attaching pipeline layout to hal.interface.binding.subspan.
iree-org/iree#18098
- Adding flag placeholders to semaphores/events.
iree-org/iree#18122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hal/api IREE's public C hardware abstraction layer API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants