Skip to content

Commit 47ccd93

Browse files
authored
[hip] Implement asynchronous file reads in hip. (#19545)
This moves the blocking reads off the main thread, and so long as your PCI bandwidth outpaces your file IO bandwith, reduces the amount of time required to read files dramatically. Signed-off-by: Andrew Woloszyn <[email protected]> --------- Signed-off-by: Andrew Woloszyn <[email protected]>
1 parent d917e7d commit 47ccd93

File tree

3 files changed

+767
-363
lines changed

3 files changed

+767
-363
lines changed

runtime/src/iree/hal/drivers/hip/api.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ typedef struct iree_hal_hip_device_params_t {
9191
// device. Defaults to true when the device supports it.
9292
bool async_allocations;
9393

94+
// The reserved buffer size for asynchronous file transfers.
95+
iree_device_size_t file_transfer_buffer_size;
96+
97+
// The maximum chunk size for any single asynchronous file transfer.
98+
// This should be smaller than the full buffer size to allow overlapping
99+
// cpu and gpu workloads.
100+
iree_device_size_t file_transfer_chunk_size;
101+
94102
// Parameters for each hipMemPool_t used for queue-ordered allocations.
95103
iree_hal_hip_memory_pooling_params_t memory_pools;
96104

0 commit comments

Comments
 (0)