Skip to content

Commit 3100735

Browse files
karthdmg-xilinxkarthik dmg
andauthored
depricate kernel, IP and buffer constructors (Xilinx#9744)
Signed-off-by: karthik dmg <karthdmg@xcokarthdmg50x.amd.com> Co-authored-by: karthik dmg <karthdmg@xcokarthdmg50x.amd.com>
1 parent 15e1f07 commit 3100735

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/runtime_src/core/common/api/xrt_kernel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4416,6 +4416,12 @@ kernel(const xrt::device& xdev, const xrt::uuid& xclbin_id, const std::string& n
44164416
alloc_kernel, get_device(xdev), xclbin_id, name, mode))
44174417
{}
44184418

4419+
kernel::
4420+
kernel(const xrt::device& xdev, const xrt::uuid& xclbin_id, const std::string& name, bool ex)
4421+
: handle(xdp::native::profiling_wrapper("xrt::kernel::kernel",
4422+
alloc_kernel, get_device(xdev), xclbin_id, name, ex ? cu_access_mode::exclusive : cu_access_mode::shared))
4423+
{}
4424+
44194425
kernel::
44204426
kernel(xclDeviceHandle dhdl, const xrt::uuid& xclbin_id, const std::string& name, cu_access_mode mode)
44214427
: handle(xdp::native::profiling_wrapper("xrt::kernel::kernel",

src/runtime_src/core/include/xrt/experimental/xrt_ip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ class ip : public detail::pimpl<ip_impl>
138138
*
139139
* Constructor throws on error.
140140
*/
141+
[[deprecated("deprecated, please use ip(hw_context, name) instead")]]
141142
XCL_DRIVER_DLLESPEC
142143
ip(const xrt::device& device, const xrt::uuid& xclbin_id, const std::string& name);
143144

src/runtime_src/core/include/xrt/xrt_aie.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ class profiling : public detail::pimpl<profiling_impl>
385385
* The device on which the profiling should start
386386
*
387387
*/
388+
[[deprecated("deprecated, please use profiling(hw_context) instead")]]
388389
explicit
389390
profiling(const xrt::device& device);
390391

src/runtime_src/core/include/xrt/xrt_kernel.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ class kernel
795795
* other kernels and other process will have shared access to same
796796
* compute units.
797797
*/
798+
[[deprecated("deprecated, please use kernel(hw_context, name) instead")]]
798799
XRT_API_EXPORT
799800
kernel(const xrt::device& device, const xrt::uuid& xclbin_id, const std::string& name,
800801
cu_access_mode mode = cu_access_mode::shared);
@@ -807,14 +808,13 @@ class kernel
807808
/// @endcond
808809

809810
/// @cond
810-
/// Deprecated construtor for exclusive access
811-
kernel(const xrt::device& device, const xrt::uuid& xclbin_id, const std::string& name, bool ex)
812-
: kernel(device, xclbin_id, name, ex ? cu_access_mode::exclusive : cu_access_mode::shared)
813-
{}
811+
/// Deprecated constructor for exclusive access
812+
kernel(const xrt::device& device, const xrt::uuid& xclbin_id, const std::string& name, bool ex);
814813

815814
/**
816815
* Obsoleted construction from xclDeviceHandle
817816
*/
817+
[[deprecated("deprecated, please use kernel(hw_context, name) instead")]]
818818
XRT_API_EXPORT
819819
kernel(xclDeviceHandle dhdl, const xrt::uuid& xclbin_id, const std::string& name,
820820
cu_access_mode mode = cu_access_mode::shared);

0 commit comments

Comments
 (0)