Skip to content

[SYCL][COMPAT] Fix the memory leak issue in e2e test syclcompat/group_utils~exchange.cpp #17731

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 5 commits into from
Apr 8, 2025
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: 12 additions & 2 deletions sycl/test-e2e/syclcompat/group_utils/exchange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ bool test_striped_to_blocked() {
std::ostream_iterator<int> Iter(std::cout, ", ");
std::copy(d_data, d_data + 512, Iter);
std::cout << std::endl;
sycl::free(d_data, q_ct1);
return false;
}
}

sycl::free(d_data, q_ct1);
std::cout << "test_striped_to_blocked pass\n";
return true;
}
Expand Down Expand Up @@ -181,9 +182,11 @@ bool test_blocked_to_striped() {
std::ostream_iterator<int> Iter(std::cout, ", ");
std::copy(d_data, d_data + 512, Iter);
std::cout << std::endl;
sycl::free(d_data, q_ct1);
return false;
}
}
sycl::free(d_data, q_ct1);
std::cout << "test_blocked_to_striped pass\n";
return true;
}
Expand Down Expand Up @@ -226,10 +229,13 @@ bool test_scatter_to_blocked() {
std::ostream_iterator<int> Iter(std::cout, ", ");
std::copy(d_data, d_data + 512, Iter);
std::cout << std::endl;
sycl::free(d_data, q_ct1);
sycl::free(d_rank, q_ct1);
return false;
}
}

sycl::free(d_data, q_ct1);
sycl::free(d_rank, q_ct1);
std::cout << "test_scatter_to_blocked pass\n";
return true;
}
Expand Down Expand Up @@ -282,9 +288,13 @@ bool test_scatter_to_striped() {
std::ostream_iterator<int> Iter(std::cout, ", ");
std::copy(d_data, d_data + 512, Iter);
std::cout << std::endl;
sycl::free(d_data, q_ct1);
sycl::free(d_rank, q_ct1);
return false;
}
}
sycl::free(d_data, q_ct1);
sycl::free(d_rank, q_ct1);
std::cout << "test_blocked_to_striped pass\n";
return true;
}
Expand Down