Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC]: Split CUB primitives pages into Reference and Explanation pages [diataxis] #2892

Open
1 of 4 tasks
gonidelis opened this issue Nov 20, 2024 · 0 comments
Open
1 of 4 tasks
Assignees
Labels
2.8.0 target for 2.8.0 release doc Documentation-related items.

Comments

@gonidelis
Copy link
Member

gonidelis commented Nov 20, 2024

Is this a duplicate?

Is this for new documentation, or an update to existing docs?

New

Describe the incorrect/future/missing documentation

The pages for CUB primitives (Warp, Block, Device) are cluttered:

  • All the APIs for a single Primitive are under a single page (this doesn't align with our Thrust APIs). We should follow either or. IMO we should conform to Thrust given that some APIs provide bulk information that might be lost if not in a distinct page. This also helps in the remark below.
  • We provide a generic "A Simple Example" at the top of the primitive which uses just one of the algorithms provided by the primitive. Then under the API reference for each algorithm we attach along a "Snippet" which showcases its usage.
    1. The latter we should keep as the generic/minimal code example along with each API reference.
    2. The former ("Simple Example") along with "Supported Types", "Performance Considerations", "Reusing dynamically allocating shared memory" etc. should be abstracted away to a top (or parallel) Explanation page.

Here's a schematic. Each endpoint is a distinct HTML page.

CUB Docs

Device Wide primitives

cub::DeviceReduce

  • Usage and Performance
  • API
    • Reduce
    • Sum
    • Min
    • ArgMin
    • Max
    • ArgMax

cub::DeviceFor

  • Usage and Performance
  • API
    • Bulk
    • ForEachN
    • ForEach

Block Wide primitives

cub::BlockReduce

  • Usage and Performance (if bulky then split again)
  • API
    • template T Reduce(T input, ReductionOp reduction_op)
    • template<int ITEMS_PER_THREAD, typename T> T Reduce(T (&inputs)[ITEMS_PER_THREAD], ReductionOp reduction_op)
    • template T Reduce(T input, ReductionOp reduction_op, int num_valid)

How to express and distinct algorithms with the same name and different signature in the drop down tree is a problem that will be discusses in a different issue.


Each of the following tasks/issues is split into each own sub-tasks.

@gonidelis gonidelis added 2.8.0 target for 2.8.0 release doc Documentation-related items. labels Nov 20, 2024
@gonidelis gonidelis self-assigned this Nov 20, 2024
@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8.0 target for 2.8.0 release doc Documentation-related items.
Projects
Status: Todo
Development

No branches or pull requests

1 participant