-
Notifications
You must be signed in to change notification settings - Fork 58
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
Non-static bounce buffer option #454
Non-static bounce buffer option #454
Conversation
python/kvikio/tests/test_basic_io.py
Outdated
with kvikio.defaults.set_bounce_buffer_size(2048): | ||
with kvikio.CuFile(filename, "w") as f: | ||
f.write(cupy.arange(10)) # populate the bounce buffer | ||
assert kvikio.buffer.bounce_buffer_clear() == 2048 |
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.
question: Is this indentation right? I thought that the context manager on line 288 would reset the bounce buffer size to the default (16MiB) size, and so this clear would return 0
(because when we exited the block we had to clear the bounce buffers).
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.
The bounce buffer isn't cleared on context exit, added the following comment:
# Notice, since the bounce buffer size is only checked when the buffer
# is used, we populate the bounce buffer in between we clear it.
Does this also close #452? |
Co-authored-by: Lawrence Mitchell <[email protected]>
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.
Thanks Mads
Thanks for the review @wence- |
/merge |
closes #451
closes #452
Also some refactor/clean up