Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for elementwise maximum with NumPy broadcasting.
Saves both inputs a and b (kSavesInputs = true inherited from
BinaryKernel) so the backward pass can reconstruct the indicator
masks for the comparison. Gradient flows only through whichever operand
"won" the elementwise comparison; ties are broken in favour of a
(gradient assigned entirely to a when ), making the two
masks complementary and the gradient partition exact.
Math
Shape
Inputs a, b follow NumPy broadcasting rules; the output takes the
broadcast shape. Both gradient branches are sum-reduced back to their
original input shapes by sum_to_shape in the apply trampoline.
See Also
MinimumBackward : Elementwise minimum (mirror operation).
Attributes
schema_v1OpSchema"maximum", version 1, AmpPolicy::Promote, deterministic.Notes
The two masks and partition
the index set, so their sum is exactly at every position — no
double-counting at ties. Compare with MinimumBackward, which uses
the mirror-image masks (b >= a) / (b < a).