Implementations requiring the definitions of multiple CUDA entity proxy classes, and which regard contexts.
More...
Go to the source code of this file.
|
| cuda |
| Definitions and functionality wrapping CUDA APIs.
|
|
| cuda::context::peer_to_peer |
| API functions and definitions relating to communications among "peer" contexts on the same system, which may possibly regard different CUDA devices.
|
|
|
bool | cuda::context::is_primary (const context_t &context) |
|
void | cuda::context::synchronize (const context_t &context) |
|
bool | cuda::context::current::is_primary () |
|
context_t | cuda::context::create_and_push (const device_t &device, host_thread_sync_scheduling_policy_t sync_scheduling_policy=heuristic, bool keep_larger_local_mem_after_resize=false) |
| Creates a new CUDA context on a given device, as would create() - and pushes it onto the top of the context stack. More...
|
|
context_t | cuda::context::create (const device_t &device, host_thread_sync_scheduling_policy_t sync_scheduling_policy=heuristic, bool keep_larger_local_mem_after_resize=false) |
| creates a new context on a given device More...
|
|
bool | cuda::context::peer_to_peer::can_access (context_t accessor, context_t peer) |
| Check if a CUDA context can access the global memory of another CUDA context.
|
|
void | cuda::context::peer_to_peer::enable_access (context_t accessor, context_t peer) |
| Enable access by one CUDA device to the global memory of another. More...
|
|
void | cuda::context::peer_to_peer::disable_access (context_t accessor, context_t peer) |
| Disable access by one CUDA device to the global memory of another. More...
|
|
void | cuda::context::peer_to_peer::enable_bidirectional_access (context_t first, context_t second) |
| Enable access both by the first to the second context and the other way around.
|
|
void | cuda::context::peer_to_peer::disable_bidirectional_access (context_t first, context_t second) |
| Disable access both by the first to the second context and the other way around.
|
|
void | cuda::context::current::peer_to_peer::enable_access_to (const context_t &peer_context) |
| Allows subsequently-executed memory operations and kernels to access the memory associated with the specified peer context - if peer-to-peer access is supported between the two devices.
|
|
void | cuda::context::current::peer_to_peer::disable_access_to (const context_t &peer_context) |
| Prevents subsequently-executed memory operations and kernels from accessing the memory associated with the specified peer context - if peer-to-peer access is supported between the two devices.
|
|
Implementations requiring the definitions of multiple CUDA entity proxy classes, and which regard contexts.
Specifically:
- Functions in the cuda::context namespace.
- Methods of cuda::context_t and possibly some relates classes.
◆ create()
creates a new context on a given device
- Parameters
-
device | The device which the new context will regard |
sync_scheduling_policy | Choice of how host threads are to perform synchronization with pending actions in streams within this context. See host_thread_sync_scheduling_policy_t for a description of these choices. |
keep_larger_local_mem_after_resize | If true, larger allocations of global device memory, used by kernels requiring a larger amount of local memory, will be kept (so that future kernels with such requirements will not trigger a re-allocation). |
- Note
- Until CUDA 11, there used to also be a flag for enabling/disabling the ability of mapping pinned host memory to device addresses. However, it was being ignored since CUDA 3.2 already, with the minimum CUDA version supported by these wrappers being later than that, so - no sense in keeping it.
◆ create_and_push()
Creates a new CUDA context on a given device, as would create() - and pushes it onto the top of the context stack.
- Note
- The effect of this function could, of course, be achieved by creating a context without a push, then pushing it onto the top of the stack - both functions offered in this same namespace. However, the CUDA Driver API actually offers this functionality directly, i.e. just creating a context means creating-and-pushing, then popping, which is a waste.
◆ is_primary()
bool cuda::context::is_primary |
( |
const context_t & |
context | ) |
|
|
inline |
- Returns
- true if the context is the primary context of its device