NVIDIA / NVIDIA/cccl

[EPIC] Improve separation and elminate redundancy between Thrust and CUB

Open
#24 0 comments 1 reaction 1 assignee Claimed by @elstehle View on GitHub
cub thrust
Dominant language
C++
Stars
2.5k
Forks
487
Avg merge
2d 7h
Merged PRs (30d)
296

Description

The CUDA backend of Thrust's algorithms are currently implemented with a mix of CUB algorithms and custom kernels. Some of Thrust's custom kernels are redundant with CUB, while others do not exist in CUB.

The fact that the core algorithm implementations are scattered (and redundant) between Thrust and CUB makes it difficult to maintain and provide a consistent user experience.

We would like to have a cleaner separation of responsibilities between Thrust and CUB such that CUB provides all of the CUDA algorithm implementations and Thrust is simply a higher-level dispatch layer.

To this end, there are two main tasks:
1. Move all unique Thrust kernels to CUB (e.g., `for_each`)
2. Refactor Thrust algorithms to use new (or existing) CUB algorithms (e.g., `thrust::copy_if` and `cub::DeviceSelect::If`

- [x] https://github.com/NVIDIA/cccl/issues/1189
- [ ] https://github.com/NVIDIA/cccl/issues/26

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.