-
Notifications
You must be signed in to change notification settings - Fork 283
[DOC] Add temp_storage_bytes usage guide #6208
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
base: main
Are you sure you want to change the base?
Conversation
../api/device | ||
|
||
|
||
Determining Temporary Storage Requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to also mention the single-phase API
1dc3643
to
11abc08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single phase APIs open up a whole new space of explanation for the documentation - the two phase clarifications though are much needed. Thanks a lot for taking the time to provide docs for it.
|
||
Example pattern: | ||
|
||
.. code-block:: c++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we stopped using code-block
and rather use literalinclude
s now linked to standalone .cu source examples.
**Single-Phase API** (Environment-Based) | ||
|
||
Some algorithms provide environment-based overloads that eliminate the two-phase call pattern. | ||
These APIs accept an execution environment parameter. See the individual algorithm documentation for availability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some algorithms
: we are in the process of adding these APIs for all algorithms. Let's not make it sound like we selectively picked some algorithms to support this feature.
eliminate the two-phase call pattern
: they eliminate the explicit allocation requirements which relives us from a) two phase call b) the two legacy storage arguments in the beginning of the parameter list of every device premitive.
These APIs accept an execution environment parameter.
: I feel like there is much more to be said here. There is a blogpost coming out soon that can be used as inspo. Trying to sum it up briefly:
-
the execution environment arg is at the end and is defaulted which means users do not have to pass something explicitly to it.
-
the execution environment arg can be used to select on which memory pool the primitive will be executed:
i) there are existing memory resources provided by CCCL or
ii) the user can create their own custom memory resource
-
in some algorithms the argument can be used to specify the deterministic requirements (expand on det reqs) of the algorithm
-
the user can still pass the stream as before in the templated execution environment arg
-
all of the above can be passed simultaneously in a centralized control argument manner (show how).
There are more to be said but are not feature complete so we can avoid them for now.
Add documentation explaining temp_storage_bytes query pattern.
Fixes #847