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

Non-static bounce buffer option #454

Merged

Conversation

madsbk
Copy link
Member

@madsbk madsbk commented Sep 2, 2024

closes #451
closes #452

Also some refactor/clean up

@madsbk madsbk added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Sep 2, 2024
@madsbk madsbk marked this pull request as ready for review September 2, 2024 10:34
@madsbk madsbk requested review from a team as code owners September 2, 2024 10:34
cpp/doxygen/main_page.md Outdated Show resolved Hide resolved
cpp/doxygen/main_page.md Outdated Show resolved Hide resolved
cpp/include/kvikio/bounce_buffer.hpp Outdated Show resolved Hide resolved
cpp/include/kvikio/bounce_buffer.hpp Outdated Show resolved Hide resolved
python/kvikio/kvikio/buffer.py Outdated Show resolved Hide resolved
python/kvikio/kvikio/buffer.py Outdated Show resolved Hide resolved
python/kvikio/kvikio/buffer.py Outdated Show resolved Hide resolved
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
Copy link
Contributor

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).

Copy link
Member Author

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.

python/kvikio/tests/test_basic_io.py Outdated Show resolved Hide resolved
@wence-
Copy link
Contributor

wence- commented Sep 2, 2024

Does this also close #452?

madsbk and others added 2 commits September 2, 2024 15:19
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Mads

@madsbk
Copy link
Member Author

madsbk commented Sep 2, 2024

Thanks for the review @wence-

@madsbk
Copy link
Member Author

madsbk commented Sep 2, 2024

/merge

@rapids-bot rapids-bot bot merged commit 8676e8d into rapidsai:branch-24.10 Sep 2, 2024
48 checks passed
@madsbk madsbk deleted the non_static_bounce_buffer_option branch September 4, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify behavior of KVIKIO_BOUNCE_BUFFER_SIZE Allow task tuning within the same process
2 participants