Skip to content
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

Limit test_hipcub_device_radix_sort memory usage #454

Open
wants to merge 2 commits into
base: release-staging/rocm-rel-6.4
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Full documentation for hipCUB is available at [https://rocm.docs.amd.com/project
* The NVIDIA backend now requires CUB, Thrust and libcu++ 2.5.0. If it is not found it will be downloaded from the NVIDIA CCCL repository.
* Changed the C++ version from 14 to 17. C++14 will be deprecated in the next major release.

### Known issues
* When building on Windows using the HIP SDK release for ROCm 6.4, hipMalloc currently returns hipSuccess for some sizes that are larger than it can allocate. For this reason, we've limited the maximum test case sizes for some unit tests (eg. HipcubDeviceRadixSort's SortKeysLargeSizes test).
umfranzw marked this conversation as resolved.
Show resolved Hide resolved

## hipCUB 3.3.0 for ROCm 6.3.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion test/hipcub/test_hipcub_device_radix_sort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ inline void sort_keys_large_sizes()

hipStream_t stream = 0;

const std::vector<size_t> sizes = test_utils::get_large_sizes(seeds[0]);
const std::vector<size_t> sizes = test_utils::get_large_sizes<34>(seeds[0]);
for(const size_t size : sizes)
{
SCOPED_TRACE(testing::Message() << "with size = " << size);
Expand Down
5 changes: 3 additions & 2 deletions test/hipcub/test_utils_data_generation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,18 +473,19 @@ inline std::vector<T> get_random_data01(size_t size, float p, int seed_value)
return data;
}

template<unsigned int MaxPow2 = 35>
inline std::vector<size_t> get_large_sizes(int seed_value)
{
// clang-format off
std::vector<size_t> sizes = {
(size_t{1} << 32) - 1, size_t{1} << 32,
(size_t{1} << 35) - 1, size_t{1} << 35
(size_t{1} << MaxPow2) - 1, size_t{1} << MaxPow2
};
// clang-format on
const std::vector<size_t> random_sizes
= test_utils::get_random_data<size_t>(2,
(size_t{1} << 30) + 1,
(size_t{1} << 35) - 2,
(size_t{1} << MaxPow2) - 2,
seed_value);
sizes.insert(sizes.end(), random_sizes.begin(), random_sizes.end());
std::sort(sizes.begin(), sizes.end());
Expand Down