-
Notifications
You must be signed in to change notification settings - Fork 472
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
Moving PS Kernel's pscontext to public XRT include area and under XRT namespace #7629
Conversation
…tory Signed-off-by: Jeff Lin <[email protected]>
Signed-off-by: Jeff Lin <[email protected]>
|
||
#include "xrt/detail/config.h" | ||
#include "xrt/detail/pimpl.h" | ||
#include "xclhal2.h" |
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.
#include "xclhal2.h" |
class pscontext_impl; | ||
class pscontext : public detail::pimpl<pscontext_impl> { | ||
public: | ||
pscontext() = default; |
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 does not look right. Where is the pscontext_impl
constructed?
#include <memory> | ||
|
||
/* | ||
* PS Context Data Structure to be derived from for user's xrtHandle class |
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 comment doesn't reflect usage. The comment is for xrt::pscontext presumably, but that class is not derived from user's xrt_handle class. Next line of comment is correct though.
Also can we use xrt_handle rather than camelCase. There is no camelCase in xrt exposed APIs.
* public: | ||
* xrt::device dhdl; | ||
* xrt::kernel kernel; | ||
* xrtHandles(xclDeviceHandle dhdl_in, const xuid_t xclbin_uuid) |
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.
Do not use xclDeviceHandle
use xrt::device
.
And use xrt::uuid instead of plain uuid_t (aka xuid_t).
* xrt::kernel kernel; | ||
* xrtHandles(xclDeviceHandle dhdl_in, const xuid_t xclbin_uuid) | ||
* : dhdl(dhdl_in) | ||
* , kernel(dhdl,xclbin_uuid,"kernel name") |
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.
* , kernel(dhdl,xclbin_uuid,"kernel name") | |
* , kernel(dhdl, xclbin_uuid, "kernel name") |
Build Passed! |
Problem solved by the commit
Moved pscontext class used in PS kernels to XRT's public include areas and under XRT namespace.
Header is now called xrt_pscontext.h, and sk_types.h should no longer be used.
Also updated all the current PS kernels under XRT repo to use this new header file.
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
How problem was solved, alternative solutions (if any) and why they were rejected
Risks (if any) associated the changes in the commit
All the existing PS kernel need to be updated to use the new pscontext class under XRT namespace
What has been tested and how, request additional testing if necessary
Tested on v70
Documentation impact (if any)