Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for element-wise round-to-nearest-even: .
Piecewise-constant; derivative is zero almost everywhere and undefined
at half-integer boundaries. kHasGradient = false causes
UnaryKernel::forward to skip autograd wiring entirely.
Math
Ties round to even ("banker's rounding"), matching IEEE-754.
See Also
FloorBackward, CeilBackward.
Attributes
kSavesInputboolfalse — no tensor needs to be saved across the backward pass.kHasGradientboolfalse — predicate-style op; the backward node is never invoked in practice.schema_v1OpSchemaOp name
"round" with AmpPolicy::KeepInput (integer inputs pass through unchanged).Notes
CPU dispatch routes through backend::IBackend::round; GPU uses
MLX's round primitive. Integer dtypes are a no-op.