Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

vboggara-xilinx
Copy link
Contributor

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

@gbuildx
Copy link
Collaborator

gbuildx commented Jul 4, 2023

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.
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

@uday610 uday610 left a 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.

@vboggara-xilinx
Copy link
Contributor Author

closing this pull request as latest commits are not coming to this PR. Seems some issue with the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants