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] Pool Memory resource #805

Closed
tfeher opened this issue Jun 14, 2021 · 0 comments · Fixed by #807
Closed

[DOC] Pool Memory resource #805

tfeher opened this issue Jun 14, 2021 · 0 comments · Fixed by #807
Labels
? - Needs Triage Need team to review and classify doc Documentation

Comments

@tfeher
Copy link

tfeher commented Jun 14, 2021

Report incorrect documentation

Location of incorrect documentation
Incorrect code examples for PoolMemoryResource at:

Incorrect code:

import rmm
pool = rmm.mr.PoolMemoryResource(
    upstream=rmm.mr.CudaMemoryResource(),
    initial_pool_size=2**30,
    maximum_pool_size=2**32)
rmm.mr.set_current_device_resource(pool)

Describe the problems or issues found in the documentation

The code example gives the following error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-7cd0585a0d02> in <module>
      1 import rmm
----> 2 pool = rmm.mr.PoolMemoryResource(
      3     upstream=rmm.mr.CudaMemoryResource(),
      4     initial_pool_size=2**30,
      5     maximum_pool_size=2**32)

rmm/_lib/memory_resource.pyx in rmm._lib.memory_resource.UpstreamResourceAdaptor.__cinit__()

TypeError: __cinit__() takes at least 1 positional argument (0 given)

Steps taken to verify documentation is incorrect
Run the code example above.

Suggested fix for documentation
Remove the upstream keyword.

import rmm
pool = rmm.mr.PoolMemoryResource(
    rmm.mr.CudaMemoryResource(),
    initial_pool_size=2**30,
    maximum_pool_size=2**32)
rmm.mr.set_current_device_resource(pool)
@tfeher tfeher added ? - Needs Triage Need team to review and classify doc Documentation labels Jun 14, 2021
@rapids-bot rapids-bot bot closed this as completed in #807 Jun 16, 2021
rapids-bot bot pushed a commit that referenced this issue Jun 16, 2021
Fixes #805. Removes `upstream=` because the API requires at least one positional parameter.

Authors:
  - Mark Harris (https://github.com/harrism)

Approvers:
  - Ashwin Srinath (https://github.com/shwina)

URL: #807
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify doc Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant