-
Notifications
You must be signed in to change notification settings - Fork 473
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
VITIS-8730: documentation of write device memory directly #7615
Conversation
Build Passed! |
IV. Data trasfer from/to device only buffer using read/write API's | ||
****************************************************************** | ||
|
||
To avoid of host memcpy with the usage of ``xrt::bo::sync()``, Vitis AI runtime (VART) currently leverages ``xclUnmgdPwrite()`` and ``xclUnmgdPread()`` to perform PCIe DMA data transfer between host and device so as to achieve better performance. |
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.
We dont need to mention about xclUnmgtPread and xclUnmgdPwrite in our documentation.
Remove the above sentence completely.
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.
We dont need to mention about VART also.
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.
After looking at overall documentation. I feel, it is better to add this info in Section "I. Data transfer between host and device by Buffer read/write API" at the end.
Signed-off-by: Saifuddin <[email protected]>
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.
Does this only work for device_only buffers? If yes, then please mention that explicitly with a one line of code that showing the buffer creation with the appropriate flag.
closing this pull request as latest commits are not coming to this PR. Seems some issue with the PR. |
Problem solved by the commit
Added documentation of read/write device memory directly
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
https://jira.xilinx.com/browse/VITIS-8730
How problem was solved, alternative solutions (if any) and why they were rejected
To avoid of host memcpy with the usage of xrt::bo::sync(), Vitis AI runtime (VART) currently leverages xclUnmgdPwrite() and xclUnmgdPread() to perform PCIe DMA data transfer between host and device so as to achieve better performance.
Here is how xrt::bo::read and xrt::bo::write API’s to read/write directly from/to device buffer if buffer object has not host backing storage.
xrt::bo::write(const void* src, size_t size, size_t seek): Copies data from src to device buffer directly.
xrt::bo::read(void* dst, size_t size, size_t skip): Copies data from device buffer to dst.
Risks (if any) associated the changes in the commit
low
What has been tested and how, request additional testing if necessary
n/a
Documentation impact (if any)
yes