Python wrappers
Public Python APIs implemented by this engine symbol.Public entry point — element-wise addition with autograd support.
Math
See Also
sub_op, mul_op, div_op
Parameters
a, bconst TensorImplPtr&Operands of any rank. Shapes must be NumPy-broadcast-compatible.
Returns
TensorImplPtrOutput tensor of shape broadcast_shapes(a.shape, b.shape) and promoted dtype. Participates in autograd via AddBackward.
Raises
LucidErrorIf
a and b have incompatible shapes under NumPy broadcasting rules, or if their devices differ.Examples
>>> auto c = add_op(a, b); // c = a + b, same as a + b in Python