TensorCloneMethod

#include <poplar/TensorCloneMethod.hpp>
namespace poplar

Poplar classes and functions.

Enums

enum class TensorCloneMethod

Define behaviour when a Tensor is cloned.

See also

Graph::clone

Values:

enumerator PRESERVE_ORDER_AND_ALIASES

Preserve the ordering and aliasing within the original tensor reference.

enumerator CREATE_NEW_ORDER

Create a new tensor with natural ordering based on the dimensions of the cloned tensor (in the same way as poplar::Graph::addVariable()).

enumerator PRESERVE_ORDER_UNLESS_ALIASES

Preserve the ordering of the original tensor unless it contains aliases.

In the case of aliases, create a new tensor ordering and duplicate the aliased elements.

enumerator GATHER_AND_PRESERVE_TILE_ORDER_AND_ALIASES

Gather elements of the underlying variables that are mapped to the same tile so they form one contiguous region on the tile in the cloned tensor.

Contiguous regions on the tile and the aliasing of elements are preserved.

enum class TensorCloneDuplicationMethod

Define behaviour when a Tensor is cloned and duplicated using Graph::cloneN.

Throws an error if DUPLICATE_BY_TILE_CONTIGUOUS_REGION and a new order needs to be created (either via TensorCloneMethod::CREATE_NEW_ORDER or TensorCloneMethod::PRESERVE_ORDER_UNLESS_ALIASES)

See also

Graph::cloneN

Values:

enumerator DUPLICATE_BY_OUTER_DIMENSION
enumerator DUPLICATE_BY_TILE_CONTIGUOUS_REGION

< The multiple clones are concatenated in their outermost dimension.

This means that the result is the same as concat(clone1, clone2, ..., cloneN). There is no guarantee of any ordering constraints in memory between the clones.

Functions

std::string toString(const TensorCloneMethod &method)
std::string toString(const TensorCloneDuplicationMethod &method)