Avoid Grid dim zero
MODIFY
thrust/system/hip/detail/sort.h
thrust/system/hip/detail/sort.h
@@ -118,6 +118,9 @@ namespace __merge_sort
const size_type count = static_cast<size_type>(thrust::distance(keys_first, keys_last));
+ if(count == 0)
+ return;
+
size_t storage_size = 0;
hipStream_t stream = hip_rocprim::stream(policy);
bool debug_sync = THRUST_HIP_DEBUG_SYNC_FLAG;
@@ -281,6 +284,9 @@ namespace __radix_sort
const size_type count = static_cast<size_type>(thrust::distance(keys_first, keys_last));
+ if(count == 0)
+ return;
+
size_t storage_size = 0;
hipStream_t stream = hip_rocprim::stream(policy);
bool debug_sync = THRUST_HIP_DEBUG_SYNC_FLAG;

Avoid Grid dim zero