Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions projects/rocprim/common/utils_device_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ class device_ptr
= common::hipMallocHelper(&device_temp_ptr, new_number_of_ele * value_size);
if(err == hipErrorOutOfMemory)
{
(void) hipGetLastError(); // reset internally recorded HIP error
return false;
}
HIP_CHECK(err);
Expand Down
1 change: 1 addition & 0 deletions projects/rocprim/test/common_test_header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
hipError_t error = condition; \
if(error == hipErrorOutOfMemory) \
{ \
(void) hipGetLastError(); \
std::cout << "Out of memory. Skipping size = " << size << std::endl; \
break; \
} \
Expand Down
2 changes: 2 additions & 0 deletions projects/rocprim/test/rocprim/test_device_merge_sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ void testLargeIndices()
hipError_t malloc_status = common::hipMallocHelper(&d_output, size * sizeof(*d_output));
if(malloc_status == hipErrorOutOfMemory)
{
(void) hipGetLastError(); // reset internally recorded HIP error
std::cout << "Out of memory. Skipping size = " << size << std::endl;
break;
}
Expand Down Expand Up @@ -418,6 +419,7 @@ void testLargeIndices()
malloc_status = common::hipMallocHelper(&d_temp_storage, temp_storage_size_bytes);
if(malloc_status == hipErrorOutOfMemory)
{
(void) hipGetLastError(); // reset internally recorded HIP error
std::cout << "Out of memory. Skipping size = " << size << std::endl;
HIP_CHECK(hipFree(d_output));
break;
Expand Down
Loading