[EPIC]: CUB large input support
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
As a lower-level interface, CUB should optimize for flexibility and performance. As a result, CUB will not guarantee a large input will work by default. However, it should enable users to specify their desired offset type.
This means CUB should not perform any dynamic dispatch based on the input size. Instead, users should have a way to statically specify the offset type. In [previous discussion](https://github.com/NVIDIA/cub/issues/212#issuecomment-929547156) we favored making the type of `num_items` a template and infer the offset type from the type of `num_items`.
### Design-related research
- [x] https://github.com/NVIDIA/cccl/issues/1408
- [x] https://github.com/NVIDIA/cccl/issues/1454
### Testing large number of items
- [x] https://github.com/NVIDIA/cccl/issues/2139
- [x] https://github.com/NVIDIA/cccl/issues/2140
- [x] Add tests for large number of items in `DeviceScan::*ByKey`
### Enable large `num_items` in CUB algorithms that are sensitive to the choice of `offset_t`
- [x] https://github.com/NVIDIA/cccl/issues/2062
- [x] https://github.com/NVIDIA/cccl/issues/2458
- [x] https://github.com/NVIDIA/cccl/issues/1422
- [x] https://github.com/NVIDIA/cccl/issues/1437
- [x] https://github.com/NVIDIA/cccl/issues/2442
- [x] https://github.com/NVIDIA/cccl/issues/2515
- [x] https://github.com/NVIDIA/cccl/issues/2714
- [x] #3132
- [x] #3134
- [x] #3133
- [ ] https://github.com/NVIDIA/cccl/issues/2522
- [x] #3242
- [x] https://github.com/NVIDIA/cccl/issues/2521
- [x] https://github.com/NVIDIA/cccl/issues/2520
- [x] #3622
- [ ] ~~Add support for large `num_items` to `device_spmv.cuh`~~
### Limit the number of kernel template instantiations by reducing the set of offset types
- [x] #3312
### Clean up interim testing infrastructure
- [x] Switch tests for large number of items to use `Device*` interface in `DeviceSelect`
- [x] Switch tests for large number of items to use `Device*` interface in `DeviceScan`
### Documentation
- [x] We want to be explicit about supported and tested offset types in the `Dispatch` interface (see https://github.com/NVIDIA/cccl/pull/1817#discussion_r1670650317)
Contributor guide
Assessment
This issue has not been assessed yet.