Skip to content

Implementing AMDGPU logical/physical devices and skeleton queues. - #21251

Merged
benvanik merged 1 commit into
mainfrom
users/benvanik/amdgpu-device
Jul 16, 2025
Merged

benvanik merged 1 commit into
mainfrom
users/benvanik/amdgpu-device

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

A single logical device in the HAL may have multiple virtual queues backed by multiple physical devices. Queues may either be host-side (CPU issues all queue operations from a worker thread) or device-side (GPU issues all queue operations from scheduler dispatches). Logical and physical device setup, device library loading, pool management, and routing from the top-level HAL API are the same regardless of queue implementation and it's even possible to support multiple queue types per logical device (if ganging an APU and a dGPU, for example). To start the host-side queue will be implemented in future changes and the device-side queue is present only as a placeholder for later implementation.

There are some things I'm not too pleased with (like all the block pools floating around) but I'll be cleaning things up as I implement the queues and try to reduce how much state is shared between the physical device and its queue implementations.

@benvanik
benvanik requested review from AWoloszyn and ScottTodd June 30, 2025 23:54
@benvanik benvanik added the hal/amdgpu Runtime AMDGPU HAL backend label Jun 30, 2025
@benvanik
benvanik force-pushed the users/benvanik/amdgpu-device branch 2 times, most recently from c48fba7 to 24798ee Compare July 1, 2025 17:48
@benvanik
benvanik marked this pull request as ready for review July 1, 2025 17:54
Comment thread runtime/src/iree/base/internal/flags.h Resolved
A single logical device in the HAL may have multiple queues backed by
multiple physical devices. Queues may either be host-side (CPU issues
all queue operations from a worker thread) or device-side (GPU issues
all queue operations from scheduler dispatches). Logical and physical
device setup, device library loading, pool management, and routing
from the top-level HAL API are the same regardless of queue
implementation and it's even possible to support multiple queue types
per logical device (if ganging an APU and a dGPU, for example). To
start the host-side queue will be implemented in future changes and
the device-side queue is present only as a placeholder for later
implementation.
@benvanik
benvanik force-pushed the users/benvanik/amdgpu-device branch from bf79ec4 to 2ccf1bc Compare July 16, 2025 16:34
@benvanik
benvanik enabled auto-merge (squash) July 16, 2025 16:34
@benvanik
benvanik merged commit 319cbdc into main Jul 16, 2025
@benvanik
benvanik deleted the users/benvanik/amdgpu-device branch July 16, 2025 16:57
IanWood1 pushed a commit to IanWood1/iree that referenced this pull request Jul 18, 2025
…ee-org#21251)

A single logical device in the HAL may have multiple virtual queues
backed by multiple physical devices. Queues may either be host-side (CPU
issues all queue operations from a worker thread) or device-side (GPU
issues all queue operations from scheduler dispatches). Logical and
physical device setup, device library loading, pool management, and
routing from the top-level HAL API are the same regardless of queue
implementation and it's even possible to support multiple queue types
per logical device (if ganging an APU and a dGPU, for example). To start
the host-side queue will be implemented in future changes and the
device-side queue is present only as a placeholder for later
implementation.

There are some things I'm not too pleased with (like all the block pools
floating around) but I'll be cleaning things up as I implement the
queues and try to reduce how much state is shared between the physical
device and its queue implementations.
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
…1251)

A single logical device in the HAL may have multiple virtual queues
backed by multiple physical devices. Queues may either be host-side (CPU
issues all queue operations from a worker thread) or device-side (GPU
issues all queue operations from scheduler dispatches). Logical and
physical device setup, device library loading, pool management, and
routing from the top-level HAL API are the same regardless of queue
implementation and it's even possible to support multiple queue types
per logical device (if ganging an APU and a dGPU, for example). To start
the host-side queue will be implemented in future changes and the
device-side queue is present only as a placeholder for later
implementation.

There are some things I'm not too pleased with (like all the block pools
floating around) but I'll be cleaning things up as I implement the
queues and try to reduce how much state is shared between the physical
device and its queue implementations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hal/amdgpu Runtime AMDGPU HAL backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants