Vertex
#include <poplar/Vertex.hpp>
Defines
-
WORKER_ALIGN
-
namespace poplar
Poplar classes and functions.
A VectorList is a list of vectors with a specific layout and with the usage semantics of a 2D vector.
A 1D vector must be laid out in a contiguous memory region. A 2D vector is a vector of 1D vectors. Each of these 1D vectors that make up a 2D vector is called a “sub-vector” for the remainder of this document. The elements of a 2D vector can be accessed by indexing the 2D vector along the
outer
andinner
dimensions asA[outer][inner]
.The following two categories of layouts are supported:
VectorListLayout::DELTANELEMENTS
is a memory efficient 2D vector layout. For legacy systemsVectorListLayout::DELTAN
served a similar purpose. Each sub-vector must be laid out as a contiguous memory region but the sub-vectors may may not be laid out contiguous with respect to each other in memory. Each sub-vector may have a different length.VectorListLayout::ONE_PTR
and otherVectorListLayout
layouts that are prefixed by SCALED_PTR are for Poplar runtime use only.
Typedefs
-
template<bool pred>
using SupervisorVertexIf = std::conditional_t<pred, SupervisorVertex, Vertex> Metafunction that returns a SupervisorVertex if
pred
is true otherwise a Vertex.
-
class ExternalExchangeVertex
- #include <Vertex.hpp>
ExternalExchangeVertex base class; Any sub-type of this class needs to define a compute() method returning a bool.
-
class MultiVertex
- #include <Vertex.hpp>
MultiVertex base class; Any sub-type of this class needs to define a compute() method taking a single unsigned value and returning a bool.
NOTE: To get deterministic results between replicas you must index the data by worker id because each worker has a different seed when applying stochastic rounding.
Public Static Functions
-
static inline constexpr unsigned numWorkers()
Get the total number of workers that will run this vertex.
-
static inline constexpr unsigned numWorkers()
-
class SupervisorVertex
- #include <Vertex.hpp>
SupervisorVertex base class; Any sub-type of this class needs to define a compute() method returning a bool.
NOTE: To get deterministic results between replicas you must index the data by worker id because each worker has a different seed when applying stochastic rounding.
-
class Vertex
- #include <Vertex.hpp>
Vertex base class.
Any sub-type of this class needs to define a compute() method returning a bool.
This vertex is guaranteed by Poplar to run on the same worker context on every replica when stochastic rounding is going to be applied to make sure that the results are bit accurate when replicated.