Conversation
|
I'm going to add a Discussion from internal developer day pointed out that you can get a good benefit from hiding the latency of the load and/or control the polling backoff yourself. It's already in here, might as well make it usable. |
|
@ogiroux Does this require any additional tests you would like to see? I was going to permute a few things, but this would be a good opportunity for any edge cases you can think of. |
|
Latest clean virtual: https://builds4u.nvidia.com/dvs/#/change/3023208755719989.5?eventType=Virtual |
griwes
left a comment
There was a problem hiding this comment.
LGTM except for the phrasing in the documentation.
| | [`cuda::device::barrier_native_handle`] | Get the native handle to a `cuda::barrier`. `(function template)` | | ||
| | [`cuda::barrier::init`] | Initialize a `cuda::barrier`. `(friend function)` | | ||
| | [`cuda::device::barrier_native_handle`] | Get the native handle to a `cuda::barrier`. `(function template)` | | ||
| | [`cuda::barrier::wait_parity/try_wait_parity`] | Wait on a `specific` phase of the barrier | |
There was a problem hiding this comment.
I don't like this phrasing. @ogiroux how would you feel about "Wait on a phase whose parity matches the argument." or some such?
| `barrier::wait_parity` stalls execution while the barrier is not at the specified phase. | ||
| `barrier::try_wait_parity` queries the the state of the barrier against the specified phase. |
There was a problem hiding this comment.
See the previous comment. It's really weird that the description here doesn't mention parity at all.
|
In the interest of time, I'm going to split the documentation changes into another PR and merge the changes. |
…r for some reason
Overview
Add APIs to
cuda::barrierthat allow for waiting on the parity of the barrier. This is an extension tostd::barrierthat relies on the internal binary phase of the barrier.Motivation
Requirements
barrier::try_wait_paritybarrier::wait_paritybarrier::wait_parityDesign
wait_parityAPIs similarly towaitandtry_wait.wait_parityis implemented by pollingtry_wait_paritywith back-off.try_wait_parityqueries the parity of the barrier with a parity provided by the user.Test Plan
wait_paritywhich also provides coverage fortry_wait_parity.Performance Tests
Documentation
Complex Internal Systems
std::barrieris able to queried to obtain the parity of the barrier.Stakeholders