ElementWise
#include <popops/ElementWise.hpp>
These functions perform the same operation on each element of one or more tensors.
Every function has an in-place overload that writes the result of the function to the first tensor argument of the function.
The functions that perform operations on two tensors also have overloads for one of the tensors being a constant scalar. These functions perform the same operation on each element in the remaining tensor using the scalar as the other side of the operation for all elements.
-
namespace poputil
General utility functions for building graphs.
Functions
-
template<>
poplar::ProfileValue toProfileValue(const popops::expr::UnaryOpType &op)
-
template<>
poplar::ProfileValue toProfileValue(const popops::expr::BinaryOpType &op)
-
template<>
poplar::ProfileValue toProfileValue(const popops::expr::TernaryOpType &op)
-
template<>
-
namespace popops
Common functions, such as elementwise and reductions.
Unnamed Group
-
poplar::Tensor varianceToInvStdDev(poplar::Graph &graph, const poplar::Tensor &src, const poplar::Tensor &epsilon, poplar::program::Sequence &prog, const poplar::Type dstType = poplar::HALF, const poplar::DebugContext &debugContext = {})
Convert variance to inverse standard deviation.
- Parameters
graph – The graph to update.
src – The source tensor.
epsilon – A tensor initialised with the epsilon parameter used in conversion. Must have a single element and have the same type as the input type. Alternatively a float value can be used and the appropriate tensor will be created.
prog – The sequence to extend with the execution of conversion.
dstType – The type of the tensor to be output. Must be
HALF
or equal to the input type.debugContext – Optional debug information
- Returns
A tensor where each element is the inverse of standard deviation. Each element is the result of
b = sqrt(1 / a)
, wherea
andb
are the corresponding elements ofsrc
and the result tensor respectively.
Unnamed Group
-
poplar::Tensor invStdDevToVariance(poplar::Graph &graph, const poplar::Tensor &src, const poplar::Tensor &epsilon, poplar::program::Sequence &prog, const poplar::Type dstType = poplar::FLOAT, const poplar::DebugContext &debugContext = {})
Convert inverse standard deviation to variance.
- Parameters
graph – The graph to update.
src – The source tensor.
epsilon – A tensor initialised with the epsilon parameter used in conversion. Must have a single element and have the same type as the input type. Alternatively, a float value can be used and the appropriate tensor will be created.
prog – The sequence to extend with the execution of conversion.
dstType – The type of the tensor to be output. Must be
FLOAT
or equal to the input type.debugContext – Optional debug information
- Returns
A tensor where each element is the variance. Each element is the result of
b = (1 / a) ^ 2
, wherea
andb
are the corresponding elements ofsrc
and the result tensor respectively.
Unnamed Group
-
poplar::Tensor map(poplar::Graph &graph, const expr::Expr &expr, const std::vector<poplar::Tensor> &ts, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Map an expression across tensors.
Element Wise Options
enableGenerateCodelet
(true, false) [=true]If true (and all of the inputs are the same size and do not alias), a codelet is generated to execute this map operation. A codelet will not be generated if there is only a single operation unless
forceGenerateCodelet
is true.
- Parameters
graph – The graph to update.
expr – The expression to map across the tensors. The placeholders in the expressions will be substituted with corresponding elements from the tensors in
ts
.ts – The list of tensors to map the expression across. If elements from these tensors are used in binary/ternary operations in the expression the numpy-style broadcast rules are used to match the shapes of the tensors (see poputil::broadcastToMatch()).
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – A list of flags to pass to the expression evaluator.
- Returns
A tensor containing the elements resulting from the application of the expression across the tensors.
-
inline poplar::Tensor map(poplar::Graph &graph, expr::UnaryOpType op, const poplar::Tensor &t, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Unnamed Group
-
void mapInPlace(poplar::Graph &graph, const expr::Expr &expr, const std::vector<poplar::Tensor> &ts, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensors with the result of map().
-
inline void mapInPlace(poplar::Graph &graph, expr::UnaryOpType op, const poplar::Tensor &t, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Unnamed Group
-
inline poplar::Tensor abs(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the absolute value of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::abs(a)
, wherea
is an element ofA
.
Unnamed Group
-
template<typename constType>
inline void checkTypes(poplar::Type elementType, constType constant) Check that the host compile-time type
constType
is compatible with the run-time IPU typeelementType
.- Parameters
elementType – The run-time IPU type.
constant – Unused.
- Template Parameters
constType – The host compile-time type.
- Throws
std::runtime_error – If the types are not compatible.
Unnamed Group
-
inline poplar::Tensor add(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Add each element in
A
to the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a + b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor atan2(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the two argument arctangent of each element in
A
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
atan2(a, b)
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor bitwiseAnd(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the bitwise AND of each element in
A
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a & b
, wherea
andbare
the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void bitwiseAndInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of bitwiseAnd().
Unnamed Group
-
inline poplar::Tensor bitwiseOr(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the bitwise OR of each element in
A
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a | b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void bitwiseOrInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of bitwiseOr().
Unnamed Group
-
inline poplar::Tensor bitwiseXor(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the bitwise XOR of each element in
A
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a ^ b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void bitwiseXorInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of bitwiseXor().
Unnamed Group
-
inline poplar::Tensor bitwiseXnor(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the bitwise XNOR of each element in
A
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
!(a ^ b)
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void bitwiseXnorInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of bitwiseXnor().
Unnamed Group
-
inline poplar::Tensor div(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Divide each element in
A
by the corresponding element inB
.- Parameters
graph – The graph to update.
A – The tensor of dividends.
B – The tensor of divisors.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a / b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor eq(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Check if each element in
A
is equal to the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a == b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor gteq(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Check if each element in
A
is greater than or equal to the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a >= b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor gt(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Check if each element in
A
is greater than the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a > b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor invStdDevToVariance(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Convert the inverse standard deviation to variance.
- Parameters
graph – The graph to update.
A – The source tensor.
B – The destination tensor.
prog – The sequence to extend with the execution of conversion.
debugContext – Optional debug information.
options – A list of flags to pass to the expression evaluator.
- Returns
A tensor where each element is the variance. Each element is the result of
b = (1 / a) ^ 2
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively, and whereA
represents the inverse standard deviation andB
the variance.
Unnamed Group
-
inline void invStdDevToVarianceInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of invStdDevToVariance().
Unnamed Group
-
inline poplar::Tensor lteq(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Check if each element in
A
is less than or equal to the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a <= b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor logicalAnd(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the logical AND (
&&
) of each element inA
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a && b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void logicalAndInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of logicalAnd().
Unnamed Group
-
inline poplar::Tensor logicalOr(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the logical OR (
||
) of each element inA
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a || b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void logicalOrInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of logicalOr().
Unnamed Group
-
inline poplar::Tensor lt(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Check if each element in
A
is less than the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a < b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor max(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the maximum of each element in
A
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
max(a, b)
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor min(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the minimum of each element in
A
with the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
min(a, b)
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor mul(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Multiply each element in
A
by the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a * b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor neq(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Check if each element in
A
is not equal to the corresponding element inB
.- Parameters
graph – The graph to update.
A – A tensor of elements.
B – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is the result of
a != b
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor pow(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute each element in
A
to the power of the corresponding element inB
.- Parameters
graph – The graph to update.
A – The tensor of bases.
B – The tensor of exponents.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is equal to
pow(a, b)
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor rem(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the remainder of each element in
A
divided by the corresponding element inB
.- Parameters
graph – The graph to update.
A – The tensor of dividends.
B – The tensor of divisors.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is equal to a % b, where
a
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor shiftLeft(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Shift the elements of
A
left by the corresponding elements ofB
.- Parameters
graph – The graph to update.
A – The tensor of elements which to left-shift.
B – The tensor of elements that describe the amount to left-shift
A
by.prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is equal to a << b, where
a
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void shiftLeftInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of shiftLeft().
Unnamed Group
-
inline poplar::Tensor shiftRight(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Shift the elements of
A
right by the corresponding elements ofB
.- Parameters
graph – The graph to update.
A – The tensor of elements which to right-shift.
B – The tensor of elements that describe the amount to right-shift by.
A
.prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is equal to a >> b (without sign extension), where
a
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void shiftRightInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of shiftRight().
Unnamed Group
-
inline poplar::Tensor shiftRightSignExtend(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Shift the elements of
A
right with sign extension by the corresponding elements ofB
.- Parameters
graph – The graph to update.
A – The tensor of elements which to right-shift.
B – The tensor of elements that describe the amount to right-shift
A
by.prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is equal to
a >> b
with sign extension, wherea
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
-
inline void shiftRightSignExtendInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of shiftRightSignExtend().
Unnamed Group
-
inline poplar::Tensor sub(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Subtract the elements of
B
fromA
and return the result in a new tensor.- Parameters
graph – The graph to update.
A – The tensor of elements which will be subtracted from.
B – The tensor of elements to subtract from
A
.prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor where each element is equal to a - b, where
a
andb
are the corresponding elements ofA
andB
tensors respectively.
Unnamed Group
Unnamed Group
-
inline poplar::Tensor varianceToInvStdDev(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Convert variance to inverse standard deviation.
- Parameters
graph – The graph to update.
A – The source tensor.
B – The destination tensor.
prog – The sequence to extend with the execution of conversion.
debugContext – Optional debug information.
- Returns
A tensor where each element is the inverse of standard deviation. Each element is the result of
b = sqrt(1 / a)
, wherea
andb
are the corresponding elements ofA
andB
tensors respectively, and whereA
represents the variance andB
the inverse standard deviation.
Unnamed Group
-
inline void varianceToInvStdDevInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of varianceToInvStdDev().
Functions
-
inline poplar::Tensor asin(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the arc-sine of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::asin(a)
, wherea
is an element ofA
.
-
inline void asinInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of asin().
-
inline poplar::Tensor bitwiseNot(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the bitwise NOT operation for each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
~a
, wherea
is an element ofA
.
-
inline void bitwiseNotInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of bitwiseNot().
-
inline poplar::Tensor cbrt(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the cube-root for each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::cbrt(a)
, wherea
is an element ofA
.
-
inline void cbrtInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of cbrt().
-
inline poplar::Tensor ceil(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the ceiling of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::ceil(a)
, wherea
is an element ofA
.
-
inline void ceilInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of ceil().
-
inline poplar::Tensor countLeadingZeros(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the number of binary leading zeros of each element in
A
.Note
If the element is zero then it is treated as 32 leading zeros.
- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
a ? __builtin_clz(a) : 32
, wherea
is an element ofA
.
-
inline void countLeadingZerosInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of countLeadingZeros().
-
inline poplar::Tensor cos(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the cosine of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::cos(a)
, wherea
is an element ofA
.
-
inline void cosInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of cos().
-
inline poplar::Tensor erf(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the error function of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::erf(a)
, wherea
is an element ofA
.
-
inline void erfInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of erf().
-
inline poplar::Tensor exp(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the exponential of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::exp(a)
, wherea
is an element ofA
.
-
inline void expInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of exp().
-
inline poplar::Tensor expm1(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the exponential of each element in
A
minus one.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::expm1(a)
, wherea
is an element ofA
.
-
inline void expm1InPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of expm1().
-
inline poplar::Tensor floor(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the floor of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::floor(a)
, wherea
is an element ofA
.
-
inline void floorInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of floor().
-
inline poplar::Tensor inv(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the inverse of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
1 / a
, wherea
is an element ofA
.
-
inline void invInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of inv().
-
inline poplar::Tensor log(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the log base-e of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::log(a)
, wherea
is an element ofA
.
-
inline void logInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of log().
-
inline poplar::Tensor log1p(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the log base-e of each element in
A
plus one.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::log1p(a)
, wherea
is an element ofA
.
-
inline void log1pInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of log1p().
-
inline poplar::Tensor logicalNot(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the logical NOT of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
!a
, wherea
is an element ofA
.
-
inline void logicalNotInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of logicalNot().
-
inline poplar::Tensor neg(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the negation of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
-1 * a
, wherea
is an element ofA
.
-
inline void negInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of neg().
-
inline poplar::Tensor popcount(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the number of 1 bits in each element of
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::popcount(a)
, wherea
is an element ofA
.
-
inline void popcountInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of popcount().
-
inline poplar::Tensor signum(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the signum of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is one of -1, 0 or +1 if the corresponding element in
A
was less than, equal to or greater than 0 respectively.
-
inline void signumInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of signum().
-
inline poplar::Tensor sin(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the sine of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::sin(a)
, wherea
is an element ofA
.
-
inline void sinInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of sin().
-
inline poplar::Tensor tan(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the tangent of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::tan(a)
, wherea
is an element ofA
.
-
inline void tanInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of tan().
-
inline poplar::Tensor tanh(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the hyperbolic tangent of each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::tanh(a)
, wherea
is an element ofA
.
-
inline void tanhInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of tanh().
-
inline poplar::Tensor round(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Round each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::round(a)
, wherea
is an element ofA
.
-
inline void roundInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of round().
-
inline poplar::Tensor sqrt(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the square-root for each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::sqrt(a)
, wherea
is an element ofA
.
-
inline void sqrtInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of sqrt().
-
inline poplar::Tensor square(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the square for each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
x * x
, wherea
is an element ofA
.
-
inline void squareInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of square().
-
inline poplar::Tensor sigmoid(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the sigmoid (logistic) function for each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
1 / (1 + exp(-x))
, wherea
is an element ofA
.
-
inline void sigmoidInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of sigmoid().
-
inline poplar::Tensor rsqrt(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Compute the reciprocal square root for each element in
A
.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
1 / sqrt(a)
, wherea
is an element ofA
.
-
inline void rsqrtInPlace(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of rsqrt().
-
inline poplar::Tensor isFinite(poplar::Graph &graph, const poplar::Tensor &A, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Check if each element in
A
is finite.- Parameters
graph – The graph to update.
A – A tensor of elements.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information
options – Element-wise options. See map().
- Returns
A tensor where each element is equivalent to the result of
std::isfinite(a)
, wherea
is an element ofA
.
-
inline poplar::Tensor select(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, const poplar::Tensor &C, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Populate the returned tensor with elements from
A
orB
depending on the corresponding element ofC
.That is, for each element in the output compute
c ? a : b
, wherea
,b
andc
are the corresponding elements in the tensorsA
,B
,C
respectively.- Parameters
graph – The graph to update.
A – One of the tensors containing the elements to select from.
B – One of the tensors containing the elements to select from.
C – The tensor containing the elements to use as predicates.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor containing the elements from
A
where the corresponding elements inC
were not equal to zero and containing the elements fromB
where the corresponding elements inC
were zero.
-
inline void selectInPlace(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, const poplar::Tensor &C, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Update the input tensor with the result of select().
-
inline poplar::Tensor clamp(poplar::Graph &graph, const poplar::Tensor &A, const poplar::Tensor &B, const poplar::Tensor &C, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {}, const poplar::OptionFlags &options = {})
Populate the returned tensor with elements from
A
but clamp them such that each element is greater than or equal to the corresponding element inB
and less than or equal to the corresponding element inC
.That is, for each element in the returned tensor compute:
min(max(a, b), c)
, wherea
,and
c
are the corresponding elements in the tensorsA
,B
andC
respectively.- Parameters
graph – The graph to update.
A – The tensor containing the elements to clamp.
B – The tensor containing the elements to use as minimums.
C – The tensor containing the elements to use as maximums.
prog – The sequence to extend with the execution of the expression evaluation.
debugContext – Optional debug information.
options – Element-wise options. See map().
- Returns
A tensor containing the elements resulting from the application of the expression across the tensors.
-
poplar::Tensor varianceToInvStdDev(poplar::Graph &graph, const poplar::Tensor &src, const poplar::Tensor &epsilon, poplar::program::Sequence &prog, const poplar::Type dstType = poplar::HALF, const poplar::DebugContext &debugContext = {})