This class wraps a vector of per-device IDs and CUDA streams and holds inter-device connectivity information and NCCL comms.
More...
|
| | DeviceMesh () |
| | Constructs a device mesh for all devices on the host and initializes a CUDA stream (and NCCL communicator) for each device.
|
| | ~DeviceMesh () |
| | Destroys the per-device CUDA stream and finalizes and destroys the per-device NCCL communicators.
|
| | DeviceMesh (const DeviceMesh &)=delete |
| | Disallow copy-construction.
|
| | DeviceMesh (DeviceMesh &&) noexcept |
| | Move constructor. Underlying CUDA streams and NCCL communicators are not reinitialized.
|
| DeviceMesh & | operator= (const DeviceMesh &)=delete |
| | Disallow copy-assignment.
|
| DeviceMesh & | operator= (DeviceMesh &&) noexcept |
| | Move assignment. Underlying CUDA streams and NCCL communicators are not reinitialized.
|
| size_type | deviceCount () const |
| | Returns the number of devices.
|
| const DeviceNode & | operator[] (int deviceId) const |
| | Returns a const reference to the DeviceNode for a particular device.
|
| const_iterator | begin () const |
| | Returns an iterator to the first device node.
|
| const_iterator | end () const |
| | Returns an iterator past the last device node.
|
| bool | canAccessPeer (int deviceId, int peerId) const |
| | Returns whether or not peer to peer access is supported between two devices.
|
This class wraps a vector of per-device IDs and CUDA streams and holds inter-device connectivity information and NCCL comms.