Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Experimental support for configurable prefetching #16020
Experimental support for configurable prefetching #16020
Changes from 30 commits
6468f84
2e1bbda
a9ad0eb
c36ec6a
37ac3ac
7c86b4e
c1e7309
05ef7ec
104fdcf
55d5868
04eb898
21b4f08
df0f555
237990b
90aa4f7
6dc12e8
e59d8df
f59cd4e
9a4deb7
97b172e
070608b
17c76ef
33e8eb9
802d346
08450f4
362b965
dc5a807
cd050e4
9a54668
5efa7b8
a6787ab
a2956b7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I've made no attempt whatsoever to make this class thread-safe since the only immediate consumer is (not free-threaded) Python. If this config persists past an experimental stage we may need to revisit that.
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 could reuse rmm's prefetch function here and instead of the pointer-based prefetch above, but either way we need the noexcept version so there's not much to be gained.
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.
I’d favor reusing RMM’s logic for this.
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.
Since I made this comment, @davidwendt also pointed out that he found some cases where if he used unmanaged memory with prefetch, in addition to returning silently when encountering the resulting
cudaErrorInvalidValue
he also had to clear that error by callingcudaGetLastError
or the CUDA context would remain corrupted and break downstream usage. I've added that in this PR. IIRC in rmm we're testing the unmanaged case but my guess is that we're not launching any kernels afterwards so we don't see this issue. We'll need to fix that upstream, but I don't want to block this PR on that.