Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
/libcudacxxPublic archive

Documentation changes for wait_parity/try_wait_parity#190

Open
wmaxey wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromdocs/barrier-parity

Conversation

@wmaxey
Copy link
Member

No description provided.

@wmaxeywmaxey requested review fromgriwes andogirouxJuly 29, 2021 18:24
@wmaxeywmaxey mentioned this pull requestAug 4, 2021
__global__ void example_kernel(cuda::barrier<cuda::thread_scope_block>& bar) {
bar.wait_parity(false);
}
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be good to have an example that shows how to use these APIs to accomplish something minimally useful.

It might not be clear to the user what these APIs are for, what the parity of the barrier is initially, how to get the parity of a phase, etc.

__host__ __device__ bool cuda::std::barrier::try_wait_parity(bool phase);
```

`barrier::wait_parity` stalls execution while the barrier is not at the specified parity.
Copy link
Collaborator

@gonzalobggonzalobgMar 7, 2022
edited
Loading

Choose a reason for hiding this comment

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

atomic::wait(value) "waits until the value is no longervalue".

Here,wait_parity(value) "waits until the value becomesvalue" which is the opposite.

Is this intended? Seems subtly different.

@wmaxey ?@ogiroux ?

Copy link
Contributor

@davedsthdavedsthMar 7, 2022
edited
Loading

Choose a reason for hiding this comment

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

We should swap it to match atomic wait. Also make sense as we are waiting for phase to change

@jrhemstad
Copy link
Collaborator

@wmaxey is this still relevant? Are these APIs still around?

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@griwesgriwesAwaiting requested review from griwes

@ogirouxogirouxAwaiting requested review from ogiroux

2 more reviewers

@davedsthdavedsthdavedsth left review comments

@gonzalobggonzalobggonzalobg left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@wmaxey@jrhemstad@davedsth@gonzalobg

[8]ページ先頭

©2009-2025 Movatter.jp