Skip to content

Deprecate messages added for kernel, IP and buffer constructors#9744

Merged
chvamshi-xilinx merged 1 commit intoXilinx:masterfrom
karthdmg-xilinx:master
Apr 17, 2026
Merged

Deprecate messages added for kernel, IP and buffer constructors#9744
chvamshi-xilinx merged 1 commit intoXilinx:masterfrom
karthdmg-xilinx:master

Conversation

@karthdmg-xilinx
Copy link
Copy Markdown
Collaborator

Problem solved by the commit

Mark legacy XRT entry points as deprecated in favor of hw_context-based APIs where a replacement exists (xrt::kernel, xrt::ip, xrt::aie::buffer, xrt::aie::profiling,
and the xclDeviceHandle kernel overload).

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

old APIs are not getting depricate warnings.

How problem was solved, alternative solutions (if any) and why they were rejected

Mark legacy XRT entry points as deprecated in favor of hw_context-based APIs where a replacement exists (xrt::kernel, xrt::ip, xrt::aie::buffer, xrt::aie::profiling,
and the xclDeviceHandle kernel overload).

Risks (if any) associated the changes in the commit

None

What has been tested and how, request additional testing if necessary

build a sample application that uses these ctors and verify the warning is logged

Documentation impact (if any)

None

Signed-off-by: karthik dmg <karthdmg@xcokarthdmg50x.amd.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Comment on lines -810 to +812
/// Deprecated construtor for exclusive access
kernel(const xrt::device& device, const xrt::uuid& xclbin_id, const std::string& name, bool ex)
: kernel(device, xclbin_id, name, ex ? cu_access_mode::exclusive : cu_access_mode::shared)
{}
/// Deprecated constructor for exclusive access
kernel(const xrt::device& device, const xrt::uuid& xclbin_id, const std::string& name, bool ex);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Any reason for this change, Shouldn't this ctor be deprecated as well, e.g. calling the already deprecated ctor?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added deprication warning for this. replaced an inline function with declaration. moved the implementation to cpp file. we are adding messages for declarations only to skip xrt build failures due to g++ build catching the exception.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see, so if this ctor was left as it was, then compilation including xrt_kernel.h would always issue warning regardless of whether the ctor was used or not. I can see that, it makes sense. Thanks!

@stsoe stsoe changed the title depricate messages added for kernel, IP and buffer constructors Deprecate messages added for kernel, IP and buffer constructors Apr 17, 2026
@chvamshi-xilinx chvamshi-xilinx merged commit 3100735 into Xilinx:master Apr 17, 2026
36 of 37 checks passed
@stsoe
Copy link
Copy Markdown
Collaborator

stsoe commented Apr 28, 2026

@karthdmg-xilinx @chvamshi-xilinx
This PR breaks pyxrt compilation. See AIESW-31422.

@chvamshi-xilinx
Copy link
Copy Markdown
Collaborator

@karthdmg-xilinx @chvamshi-xilinx This PR breaks pyxrt compilation. See AIESW-31422.

@stsoe , Assigned it to @svup-xilinx . He will fix it.

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