-
Notifications
You must be signed in to change notification settings - Fork 0
[FPGA] Update zero_copy_kernel sample to support IP-Authoring #11
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: development
Are you sure you want to change the base?
Conversation
Type* in_zero_copy = malloc_host<Type>(size, q.get_context()); | ||
Type* out_zero_copy = malloc_host<Type>(size, q.get_context()); | ||
#else |
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.
Add a comment here similar to the one in this commit: https://github.com/oneapi-src/oneAPI-samples/pull/1890/files#diff-5bf4c46164e0fe924b5cd1ed04885a6c86ebe3710e8f3a89bead31e3e9cf3c78 that motivates why buffer location must be specified for IPA flow.
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.
And add the same to buffer_kernel.hpp in the !IS_BSP clause.
// The USM pointers passed into the kernel must match with the buffer location | ||
// of each kernel argument, i.e. the allocated host memory should be in | ||
// the location "0", as requested in ZeroCopyKernel |
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.
// The USM pointers passed into the kernel must match with the buffer location | |
// of each kernel argument, i.e. the allocated host memory should be in | |
// the location "0", as requested in ZeroCopyKernel | |
// The USM pointers passed into the kernel must be allocated with the same | |
// buffer_location as the one specified on the kernel argument with the | |
// annotated_arg class. |
Description
This change updates
zero_copy_kernel
sample on how the buffer locations are being selected in the sample to match the new 2024.0 IPA interfaces definitions.In
zero_copy_kernel
both accessor (requiring device allcoated memory) and USM host pointer are used. In full-system flow, the board spec has defined a device global memory and a host/shared global memory. While in IP-Authoring flow,buffer_location
should be specified onaccessor
andannotated_arg
so the compiler can infer global memory interfaces and generate board spec.Type of change
Please delete options that are not relevant. Add a 'X' to the one that is applicable.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration