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

Moving PS Kernel's pscontext to public XRT include area and under XRT namespace #7629

Closed
wants to merge 2 commits into from

Conversation

jeffli-xilinx
Copy link
Collaborator

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)


#include "xrt/detail/config.h"
#include "xrt/detail/pimpl.h"
#include "xclhal2.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "xclhal2.h"

class pscontext_impl;
class pscontext : public detail::pimpl<pscontext_impl> {
public:
pscontext() = default;
Copy link
Collaborator

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

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

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")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* , kernel(dhdl,xclbin_uuid,"kernel name")
* , kernel(dhdl, xclbin_uuid, "kernel name")

@gbuildx
Copy link
Collaborator

gbuildx commented Jul 17, 2023

Build Passed!

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.

3 participants