cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Namespaces | Macros | Functions | Variables
peer_to_peer.hpp File Reference

Settings and actions related to the interaction of multiple devices (adding on those already in device.hpp) More...

#include "current_context.hpp"
Include dependency graph for peer_to_peer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 cuda
 All definitions and functionality wrapping the CUDA Runtime API.
 
 cuda::device
 Definitions and functionality related to CUDA devices (not including the device wrapper type device_t itself)
 

Functions

void cuda::context::current::peer_to_peer::enable_access_to (const context_t &context, const context_t &peer_context)
 
void cuda::context::current::peer_to_peer::disable_access_to (const context_t &context, const context_t &peer_context)
 
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.
 
bool cuda::device::peer_to_peer::can_access (const device_t &accessor, const device_t &peer)
 Determine whether one CUDA device can access the global memory of another CUDA device. More...
 
void cuda::device::peer_to_peer::enable_access (const device_t &accessor, const device_t &peer)
 Enable access by one CUDA device to the global memory of another. More...
 
void cuda::device::peer_to_peer::disable_access (const device_t &accessor, const device_t &peer)
 Disable access by one CUDA device to the global memory of another. More...
 
bool cuda::device::peer_to_peer::can_access_each_other (const device_t &first, const device_t &second)
 Determine whether two CUDA devices can currently access each other.
 
void cuda::device::peer_to_peer::enable_bidirectional_access (const device_t &first, const device_t &second)
 Enable access both by the first to the second device and the other way around.
 
void cuda::device::peer_to_peer::disable_bidirectional_access (const device_t &first, const device_t &second)
 Disable access both by the first to the second device and the other way around.
 
attribute_value_t cuda::device::peer_to_peer::get_attribute (attribute_t attribute, const device_t &first, const device_t &second)
 Get one of the numeric attributes for a(n ordered) pair of devices, relating to their interaction. More...
 

Variables

constexpr const attribute_t cuda::device::peer_to_peer::link_performance_rank = CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK
 
constexpr const attribute_t cuda::device::peer_to_peer::access_support = CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED
 A relative value indicating the performance of the link between two devices.
 
constexpr const attribute_t cuda::device::peer_to_peer::native_atomics_support = CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED
 1 if access is supported, 0 otherwise
 

Detailed Description

Settings and actions related to the interaction of multiple devices (adding on those already in device.hpp)

Function Documentation

◆ can_access()

bool cuda::device::peer_to_peer::can_access ( const device_t &  accessor,
const device_t &  peer 
)
inline

Determine whether one CUDA device can access the global memory of another CUDA device.

Parameters
accessordevice interested in making a remote access
peerdevice to be accessed
Returns
true iff acess is possible

◆ disable_access() [1/2]

void cuda::device::peer_to_peer::disable_access ( const device_t &  accessor,
const device_t &  peer 
)
inline

Disable access by one CUDA device to the global memory of another.

Parameters
accessordevice interested in making a remote access
peerdevice to be accessed
Todo:
Consider disabling this, given that access is context-specific

◆ disable_access() [2/2]

void cuda::context::peer_to_peer::disable_access ( context_t  accessor,
context_t  peer 
)
inline

Disable access by one CUDA device to the global memory of another.

Parameters
accessordevice interested in making a remote access
peerdevice to be accessed

◆ enable_access() [1/2]

void cuda::device::peer_to_peer::enable_access ( const device_t &  accessor,
const device_t &  peer 
)
inline

Enable access by one CUDA device to the global memory of another.

Parameters
accessordevice interested in making a remote access
peerdevice to be accessed
Todo:
Consider disabling this, given that access is context-specific

◆ enable_access() [2/2]

void cuda::context::peer_to_peer::enable_access ( context_t  accessor,
context_t  peer 
)
inline

Enable access by one CUDA device to the global memory of another.

Parameters
accessordevice interested in making a remote access
peerdevice to be accessed

◆ get_attribute()

attribute_value_t cuda::device::peer_to_peer::get_attribute ( attribute_t  attribute,
const device_t &  first,
const device_t &  second 
)
inline

Get one of the numeric attributes for a(n ordered) pair of devices, relating to their interaction.

Note
This is the device-pair equivalent of device_t::get_attribute()
Parameters
attributeidentifier of the attribute of interest
firstthe device accessing an att
seconddestination device
Returns
the numeric attribute value