NVIDIA / NVIDIA/cccl

Document why combining pipeline<thread_scope_thread>/barrier<thread_scope_thread> with memcpy_async is legal

Open
#972 3 comments 0 reactions 1 assignee Claimed by @griwes View on GitHub
libcu++
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

According to the thread scope documentation:

> A thread scope specifies the kind of threads that can synchronize with each other using a primitive such as an atomic or a barrier.
>
> Each thread (CPU or GPU) is related to itself by the thread thread scope, specified with thread_scope_thread.

[This example](https://nvidia.github.io/libcudacxx/extended_api/synchronization_primitives/pipeline_consumer_wait_prior.html#example), however, suggests that multiple threads of execution - the current thread and the threads performing the `memcpy_async` - can be synchronized using the synchronization primitives with `thread_scope_thread`.

A fix could be to change the documentation to:

> The thread thread scope relates each thread (CPU or GPU) and its `???` threads to itself.

where `???` would be a name for the set of threads that includes the ones used by the `memcpy_async`s.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.