Skip to content

Create cub::DeviceTransform #2091

Closed

Description

@bernhardmgruber

See #1947 for motivation, concerns and overall goals. We need a new CUB algorithm for transforming a set of input streams to an output stream and rebase thrust::transform on top of this. This ensures we stay close to the SOL of recent and upcoming GPU architectures. Several new transformation algorithms have been developed by @ahendriksen which will be upstreamed into CCCL this way.

As a first milestone, a working cub::DeviceTransform should be built, tuned, reviewed and merged. To validate the design thrust::transform should also be ported. As a benchmark, BabelStream will be used.

### Tasks until first stable version
- [x] Build a prototype (offline) validating this approach
- [x] Ensure we have enough benchmarks for `thrust::transform`, including BabelStream
- [x] Add `cub::DeviceTransform` supporting N input streams and 1 output stream
- [x] Support non-contiguous iterators
- [x] Support non-trivially-copyable types
- [x] Add tuning benchmarks for cub::DeviceTransform
- [x] Add the current thrust implementation as a fallback algorithm to `cub::DeviceTransform`s, so tuning can include it
- [x] Tune `cub::DeviceTransform` to surpass the current `cub::DeviceFor`-based implementation on relevant GPUs
- [x] Make the prefetch kernel support non-contiguous iterators and drop falling back to cub::DeviceFor
- [x] Minimize the amount of kernels compiled
- [x] API usage examples in documentation
- [x] Avoid any out-of-bounds buffer accesses of the initial kernels
- [x] Ensure performance surpasses the current `thrust::transform` implementation (`cub::DeviceFor`)

Activity

  1. added
    cub
    thrust
    on Jul 26, 2024
  2. linked a pull request that will close this issueAdd `cub::DeviceTransform` #2086on Jul 26, 2024
  3. moved this from Todo to In Progress in CCCLon Jul 26, 2024
  4. moved this from In Progress to In Review in CCCLon Aug 2, 2024
  5. changed the title [-]Create cub::DeviceTransform and replace `thrust::transform`[/-] [+]Create `cub::DeviceTransform`[/+] on Aug 21, 2024
  6. moved this from In Review to In Progress in CCCLon Aug 28, 2024
  7. moved this from In Progress to In Review in CCCLon Sep 4, 2024
  8. moved this from In Review to Done in CCCLon Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cubthrust

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions