Skip to content

Commit

Permalink
[CUDA] fixing partition bug (dmlc#6001)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfbalin authored and DominikaJedynak committed Mar 12, 2024
1 parent 9a2baff commit c7f47d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/partition/cuda/partition_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ std::pair<IdArray, NDArray> GeneratePermutationFromRemainder(
CUDA_CALL(cub::DeviceHistogram::HistogramEven(
nullptr, hist_workspace_size, proc_id_out.get(),
reinterpret_cast<AtomicCount*>(out_counts), num_parts + 1,
static_cast<IdType>(0), static_cast<IdType>(num_parts + 1),
static_cast<IdType>(0), static_cast<IdType>(num_parts),
static_cast<int>(num_in), stream));

Workspace<void> hist_workspace(device, ctx, hist_workspace_size);
CUDA_CALL(cub::DeviceHistogram::HistogramEven(
hist_workspace.get(), hist_workspace_size, proc_id_out.get(),
reinterpret_cast<AtomicCount*>(out_counts), num_parts + 1,
static_cast<IdType>(0), static_cast<IdType>(num_parts + 1),
static_cast<IdType>(0), static_cast<IdType>(num_parts),
static_cast<int>(num_in), stream));
}

Expand Down Expand Up @@ -504,14 +504,14 @@ std::pair<IdArray, NDArray> GeneratePermutationFromRange(
CUDA_CALL(cub::DeviceHistogram::HistogramEven(
nullptr, hist_workspace_size, proc_id_out.get(),
reinterpret_cast<AtomicCount*>(out_counts), num_parts + 1,
static_cast<IdType>(0), static_cast<IdType>(num_parts + 1),
static_cast<IdType>(0), static_cast<IdType>(num_parts),
static_cast<int>(num_in), stream));

Workspace<void> hist_workspace(device, ctx, hist_workspace_size);
CUDA_CALL(cub::DeviceHistogram::HistogramEven(
hist_workspace.get(), hist_workspace_size, proc_id_out.get(),
reinterpret_cast<AtomicCount*>(out_counts), num_parts + 1,
static_cast<IdType>(0), static_cast<IdType>(num_parts + 1),
static_cast<IdType>(0), static_cast<IdType>(num_parts),
static_cast<int>(num_in), stream));
}

Expand Down

0 comments on commit c7f47d5

Please sign in to comment.