Skip to content

Commit

Permalink
[hip] Implement asynchronous file reads in hip. (iree-org#19545)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
AWoloszyn authored Dec 20, 2024
1 parent d917e7d commit 47ccd93
Show file tree
Hide file tree
Showing 3 changed files with 767 additions and 363 deletions.
8 changes: 8 additions & 0 deletions runtime/src/iree/hal/drivers/hip/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ typedef struct iree_hal_hip_device_params_t {
// device. Defaults to true when the device supports it.
bool async_allocations;

// The reserved buffer size for asynchronous file transfers.
iree_device_size_t file_transfer_buffer_size;

// The maximum chunk size for any single asynchronous file transfer.
// This should be smaller than the full buffer size to allow overlapping
// cpu and gpu workloads.
iree_device_size_t file_transfer_chunk_size;

// Parameters for each hipMemPool_t used for queue-ordered allocations.
iree_hal_hip_memory_pooling_params_t memory_pools;

Expand Down
Loading

0 comments on commit 47ccd93

Please sign in to comment.