-
Notifications
You must be signed in to change notification settings - Fork 15
Use CUDA events instead of CUDA device/stream synchronization #225
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
Changes from 40 commits
2c0dac4
1202c50
bc40a83
6954a34
c3b04e3
ecb9e2d
fa236cb
e393aa0
c23e13f
33015af
2699326
23673ab
1180b8e
aa2ade6
7714a6f
eded688
8887137
0bac2a6
5f04b7a
01b2717
95cb163
42d2b9f
f019d8d
0226f52
a56070c
aaad38c
02b6c01
1f41e92
4ae9a4e
63f819e
71a8786
3055053
725c3aa
21f04a1
11bac26
dfd6e70
6795eff
dc1d898
b448c7e
007a536
8f6ecaf
10fc871
e2d8c9c
27f856c
640c2bf
40ebb2a
3f65ea3
17c01e2
8627cfc
afd84a1
cb0b159
1f2f966
de3db36
294d5b9
6a1ae03
16c8b17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -426,6 +426,11 @@ class Communicator { | |
* @param rank The destination rank. | ||
* @param tag Message tag for identification. | ||
* @return A unique pointer to a `Future` representing the asynchronous operation. | ||
* | ||
* @warning The caller is responsible to ensure the underlying `Buffer` allocation | ||
* and data are already valid before calling, for example, when a CUDA allocation | ||
* and/or copy are done asynchronously. Specifically, the caller should ensure | ||
* `Buffer::is_ready()` returns true before calling this function. | ||
*/ | ||
[[nodiscard]] virtual std::unique_ptr<Future> send( | ||
std::unique_ptr<Buffer> msg, Rank rank, Tag tag | ||
|
@@ -438,6 +443,11 @@ class Communicator { | |
* @param tag Message tag for identification. | ||
* @param recv_buffer The receive buffer. | ||
* @return A unique pointer to a `Future` representing the asynchronous operation. | ||
* | ||
* @warning The caller is responsible to ensure the underlying `Buffer` allocation | ||
* is already valid before calling, for example, when a CUDA allocation | ||
* and/or copy are done asynchronously. Specifically, the caller should ensure | ||
* `Buffer::is_ready()` returns true before calling this function. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's throw an exception if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, unfortunately that doesn't work, as @nirandaperera has noted previously in #225 (comment) . Doing that means we lose the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still, I think we should check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about a warning instead? Note that the exception will be raised in the shuffler's progress thread, so we'll probably need to handle it in some way. I know a warning is not a solution for the potential of a segfault but I think that will more clearly inform the user about what happened, rather than an exception which may not be handled correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about https://en.cppreference.com/w/cpp/error/terminate ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That works too, I would suggest that we do this now and add a new There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
*/ | ||
[[nodiscard]] virtual std::unique_ptr<Future> recv( | ||
Rank rank, Tag tag, std::unique_ptr<Buffer> recv_buffer | ||
|
Uh oh!
There was an error while loading. Please reload this page.