Skip to content

Print warning when kernel argument has multiple buffer_location attributes #109

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

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Changes from all commits
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
14 changes: 8 additions & 6 deletions src/acl_auto_configure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ bool acl_load_device_def_from_str(const std::string &config_str,
auto addr_space_type = 0U;
auto category = 0U;
auto size = 0U;
auto num_buffer_locations = 0U;
int total_fields_arguments = 0;
if (result) {
result =
Expand All @@ -706,16 +705,19 @@ bool acl_load_device_def_from_str(const std::string &config_str,

std::string buffer_location = "";
if (result) {
unsigned int num_buffer_locations = 0;
result = result && read_uint_counters(config_str, curr_pos,
num_buffer_locations, counters);
for (auto k = 0U; result && (k < num_buffer_locations); k++) {
if (j > 0) {
buffer_location = buffer_location + " ";
}

for (unsigned int k = 0; result && (k < num_buffer_locations); k++) {
result = result && read_string_counters(config_str, curr_pos,
buffer_location, counters);
}
if (result && num_buffer_locations > 1) {
std::cerr
<< "WARNING: kernel argument has multiple buffer_location "
"attributes which is not supported.\nSelecting "
<< buffer_location << " as buffer location.\n";
}
}

// Only local mem contains the following params
Expand Down