triton.language.fpsan.barrier

triton.language.fpsan.barrier(input, _semantic=None)

Mark an intermediate expression as significant to floating-point sanitization.

With FPSan enabled, apply a deterministic, non-homomorphic transformation to the input’s payload. For example, barrier(a * b) * c can differ from a * barrier(b * c), and barrier(a * b) + c can differ from fma(a, b, c). Without FPSan, return the input unchanged.

High payload bits are mixed into low bits, so moving an homomorphic_cast() across a barrier can change the signature.

This is not a synchronization or optimization barrier and does not enforce floating-point rounding or prevent FMA contraction in normal execution.

Parameters:

input – A floating-point scalar or tensor.

Returns:

A value with the same type, shape, and layout as input.