-
Notifications
You must be signed in to change notification settings - Fork 6
Add a Doxygen note about max IO size to API calls #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -532,6 +532,8 @@ hipFileError_t hipFileBufDeregister(const void *buffer_base); | |||||||||
| * hipFileRead() will transfer at most 0x7ffff000 (2,147,479,552) bytes, | ||||||||||
| * returning the number of bytes actually transferred. | ||||||||||
|
Comment on lines
532
to
533
|
||||||||||
| * hipFileRead() will transfer at most 0x7ffff000 (2,147,479,552) bytes, | |
| * returning the number of bytes actually transferred. | |
| * hipFileRead() will transfer at most the maximum I/O size described in | |
| * \max_io_size_note, returning the number of bytes actually transferred. |
Copilot
AI
Mar 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as hipFileRead(): the comment includes a fixed max (0x7ffff000) and also \max_io_size_note (“2^31 - PAGE_SIZE”). To avoid potentially conflicting documentation, prefer one source of truth (either use the alias in place of the hard-coded value, or make the alias explicitly reflect the constant hipFile enforces).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This alias claims the max IO size is “determined by the Linux kernel” and “currently 2^31 - PAGE_SIZE”, but hipFile appears to hard-code MAX_RW_COUNT to 0x7ffff000 (see src/amd_detail/backend.h). On systems with non-4K PAGE_SIZE, the kernel’s MAX_RW_COUNT differs, so this note could be misleading. Suggest rewording to match what hipFile actually enforces (e.g., explicitly say hipFile caps requests to 0x7ffff000 / Linux MAX_RW_COUNT on supported platforms), or update the implementation to derive the limit from PAGE_SIZE if that’s the intended behavior.