Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/runtime_src/core/include/xrt/xrt_aie.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ class buffer : public detail::pimpl<buffer_impl>
*
* This constructor initializes a buffer object with the specified device, xclbin UUID, and string identifier. This throws an exception if no GMIO/External buffer exists with given name
*/
[[deprecated("deprecated, please use corresponding hw_context function instead")]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my experience, you need to provide the API to use and not leave the user guessing.

buffer(const xrt::device& device, const xrt::uuid& uuid, const std::string& name);

/**
Expand Down
3 changes: 3 additions & 0 deletions src/runtime_src/core/include/xrt/xrt_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ class device
* @return
* UUID of argument xclbin
*/
[[deprecated("deprecated, please use corresponding hw_context function instead")]]
XCL_DRIVER_DLLESPEC
uuid
load_xclbin(const axlf* xclbin);
Expand All @@ -358,6 +359,7 @@ class device
* the xclbin. Using this function allows one time
* allocation of data that needs to be kept in memory.
*/
[[deprecated("deprecated, please use corresponding hw_context function instead")]]
XCL_DRIVER_DLLESPEC
uuid
load_xclbin(const std::string& xclbin_fnm);
Expand All @@ -374,6 +376,7 @@ class device
* caller. The xrt::xclbin object must contain the complete axlf
* structure.
*/
[[deprecated("deprecated, please use corresponding hw_context function instead")]]
XCL_DRIVER_DLLESPEC
uuid
load_xclbin(const xrt::xclbin& xclbin);
Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/core/include/xrt/xrt_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class graph
* @param am
* Open the graph with specified access (default primary)
*/
[[deprecated("deprecated, please use corresponding hw_context function instead")]]
graph(const xrt::device& device, const xrt::uuid& xclbin_id, const std::string& name,
access_mode am = access_mode::primary);

Expand Down
9 changes: 9 additions & 0 deletions src/runtime_src/core/tools/common/tests/TestAiePl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ bool run_pl_controller_aie1(xrt::device device, xrt::uuid uuid, boost::property_

unsigned int mem_size_bytes = 0;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto sender_receiver_k1 =
xrt::kernel(device, uuid, "sender_receiver:{sender_receiver_1}");
auto controller_k1 =
xrt::kernel(device, uuid, "pl_controller_kernel:{controller_1}");
#pragma GCC diagnostic pop
Copy link
Collaborator

Choose a reason for hiding this comment

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

What deprecated functions does this hide? Is it not possible to fix test tests?


// output memory
mem_size_bytes = num_sample * num_iter * sizeof(uint32_t);
Expand Down Expand Up @@ -170,8 +173,11 @@ bool run_pl_controller_aie2(xrt::device device, xrt::uuid uuid, boost::property_
uint32_t mem_size_bytes = 0;

// XRT auto get group_id
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto sender_receiver_k1 = xrt::kernel(device, uuid, "sender_receiver:{sender_receiver_1}");
auto controller_k1 = xrt::kernel(device, uuid, "pl_controller_top:{controller_1}");
#pragma GCC diagnostic pop

// output memory
mem_size_bytes = num_sample * num_iter * sizeof(uint32_t);
Expand Down Expand Up @@ -251,7 +257,10 @@ TestAiePl::runTest(const std::shared_ptr<xrt_core::device>& dev, boost::property
}
ptree.put("xclbin_directory", std::filesystem::path(test_path));

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
const auto uuid = device.load_xclbin(binaryFile.string());
#pragma GCC diagnostic pop

boost::property_tree::ptree aie_meta;
auto metadata_pair = dev->get_axlf_section(AIE_METADATA);
Expand Down
6 changes: 6 additions & 0 deletions src/runtime_src/core/tools/common/tests/TestAiePs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ TestAiePs::runTest(const std::shared_ptr<xrt_core::device>& dev, boost::property
ptree.put("status", XBValidateUtils::test_token_skipped);
return;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
device.load_xclbin(path);
#pragma GCC diagnostic pop
}

const std::string b_file = XBValidateUtils::findXclbinPath(dev, ptree);
Expand All @@ -70,8 +73,11 @@ TestAiePs::runTest(const std::shared_ptr<xrt_core::device>& dev, boost::property
const int input_size_allocated = ((input_size_in_bytes / 4096) + ((input_size_in_bytes % 4096) > 0)) * 4096;
const int output_size_allocated = ((output_size_in_bytes / 4096) + ((output_size_in_bytes % 4096) > 0)) * 4096;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto uuid = device.load_xclbin(b_file);
auto aie_kernel = xrt::kernel(device,uuid, "aie_kernel");
#pragma GCC diagnostic pop
auto out_bo= xrt::bo(device, output_size_allocated, aie_kernel.group_id(2));
auto out_bomapped = out_bo.map<float*>();
memset(out_bomapped, 0, output_size_in_bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ create_kernel_objects(xrt::device device, xrt::uuid xclbin_uuid, int num_kernel)
// compute unit.
// For such case, this kernel object can only access the specific
// Compute unit
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
krnls[i] = xrt::kernel(device, xclbin_uuid, krnl_name_full.c_str());
#pragma GCC diagnostic pop
}
return krnls;
}
Expand Down Expand Up @@ -299,7 +302,10 @@ TestBandwidthKernel::runTest(const std::shared_ptr<xrt_core::device>& dev, boost
ptree.put("status", XBValidateUtils::test_token_skipped);
return;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto xclbin_uuid = device.load_xclbin(b_file);
#pragma GCC diagnostic pop

std::vector<xrt::kernel> krnls = create_kernel_objects(device, xclbin_uuid, num_kernel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,15 @@ TestHostMemBandwidthKernel::runTest(const std::shared_ptr<xrt_core::device>& dev

std::string krnl_name = "bandwidth";
xrt::uuid xclbin_uuid;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
if (retVal == EOPNOTSUPP) {
krnl_name = "slavebridge";
xclbin_uuid = device.load_xclbin(old_binary_file.string());
} else {
xclbin_uuid = device.load_xclbin(b_file);
}
#pragma GCC diagnostic pop
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this cannot be fixed, then the APIs cannot be deprecated.

std::vector<xrt::kernel> krnls(num_kernel);

for (int i = 0; i < num_kernel; i++) {
Expand All @@ -119,7 +122,10 @@ TestHostMemBandwidthKernel::runTest(const std::shared_ptr<xrt_core::device>& dev
// compute unit.
// For such case, this kernel object can only access the specific
// Compute unit
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
krnls[i] = xrt::kernel(device, xclbin_uuid, krnl_name_full.c_str());
#pragma GCC diagnostic pop
}

double max_throughput = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/runtime_src/core/tools/common/tests/TestPsIops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ TestPsIops::testMultiThreads(const std::string& dev, const std::string& xclbin_f
std::vector<arg_t> arg(threadNumber);

xrt::device device(dev);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto uuid = device.load_xclbin(xclbin_fn);
auto hello_world = xrt::kernel(device, uuid.get(), krnl.name);
#pragma GCC diagnostic pop

barrier.init(threadNumber + 1);

Expand Down
6 changes: 6 additions & 0 deletions src/runtime_src/core/tools/common/tests/TestPsPlVerify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ TestPsPlVerify::runTest(const std::shared_ptr<xrt_core::device>& dev, boost::pro
return;
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
device.load_xclbin(path);
#pragma GCC diagnostic pop
}

// Load ps kernel onto device
Expand All @@ -70,8 +73,11 @@ TestPsPlVerify::runTest(const std::shared_ptr<xrt_core::device>& dev, boost::pro
return;
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto uuid = device.load_xclbin(b_file);
auto bandwidth_kernel = xrt::kernel(device, uuid, "bandwidth_kernel");
#pragma GCC diagnostic pop

auto max_throughput_bo = xrt::bo(device, 4096, bandwidth_kernel.group_id(1));
auto max_throughput = max_throughput_bo.map<double*>();
Expand Down
6 changes: 6 additions & 0 deletions src/runtime_src/core/tools/common/tests/TestPsVerify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ TestPsVerify::runTest(const std::shared_ptr<xrt_core::device>& dev, boost::prope
ptree.put("status", XBValidateUtils::test_token_skipped);
return;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
device.load_xclbin(path);
#pragma GCC diagnostic pop
}

const std::string b_file = XBValidateUtils::findXclbinPath(dev, ptree);
Expand All @@ -55,8 +58,11 @@ TestPsVerify::runTest(const std::shared_ptr<xrt_core::device>& dev, boost::prope
return;
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto uuid = device.load_xclbin(b_file);
auto hello_world = xrt::kernel(device, uuid.get(), "hello_world");
#pragma GCC diagnostic pop
const size_t DATA_SIZE = COUNT * sizeof(int);
auto bo0 = xrt::bo(device, DATA_SIZE, hello_world.group_id(0));
auto bo1 = xrt::bo(device, DATA_SIZE, hello_world.group_id(1));
Expand Down
3 changes: 3 additions & 0 deletions src/runtime_src/core/tools/common/tests/TestVerify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ TestVerify::run(const std::shared_ptr<xrt_core::device>& dev)
ptree.put("status", XBValidateUtils::test_token_skipped);
return ptree;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto xclbin_uuid = device.load_xclbin(b_file);

xrt::kernel krnl;
Expand All @@ -60,6 +62,7 @@ TestVerify::run(const std::shared_ptr<xrt_core::device>& dev)
return ptree;
}
}
#pragma GCC diagnostic pop

// Allocate the output buffer to hold the kernel output
auto output_buffer = xrt::bo(device, sizeof(char) * buffer_size, krnl.group_id(0));
Expand Down
4 changes: 4 additions & 0 deletions src/runtime_src/xrt/device/hal2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
# pragma warning( disable : 4267 4996 4244 4245 )
#endif

#if defined(__GNUC__)
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

What APIs are used here that are deprecated. If the code cannot be fixed, then APIs cannot be deprecated.


namespace {

static bool
Expand Down
Loading