Guide#

How ExactRef works and how to use it, one topic per page. If you are new, start with Get started. For a specific task, see Solutions; for every function and argument, the Reference.

Tolerances:

  • How tolerance works: what a tolerance means: one rounding, the order of additions, the compute format, and the three verdicts.

  • Reading complicated tolerances: whole tensors, overflow, infinities and NaN, several outputs, complex outputs, kernels that round more than the operation requires, exact enclosures, flushing subnormals, and the matrix exponential.

Working with ExactRef:

  • Results: everything a result holds and the options of its methods.

  • Data in and out: importing from Python, NumPy, and PyTorch; converting between formats; reading exact values; and building arrays.

  • Backward: gradients, and checking them against PyTorch's autograd.

  • Chains and any_of: computations with several steps, and implementations that may compute one of several expressions.

  • Algorithms: specific accumulation orders, fused attention kernels, tensor-core kernels, and the plans of FFT libraries.

Each operation's own rules (shapes, promotion, special values, and which roundings its tolerance allows for) are on its reference page, for example add, subtract, and multiply, sum, and gemm. PyTorch equivalents maps PyTorch's calls onto them.

What is promised: