Perpendis
Live demo Sign in

Two arrays that should match, and don't. Find where.

Load two .npy dumps — rollout logprobs from two engines, hidden states from two GPUs, a kernel output and its reference. You get the first differing index, both bit patterns, and the ulp distance. The comparison runs in this tab: nothing is uploaded, and no account is needed.

Paste straight from a REPL — brackets, commas and a tensor(…) wrapper are all fine. Or load two .npy files. Either way the comparison runs in this tab and nothing is uploaded.

Waiting for two arrays

A .npy file declares its own dtype, so that is what gets used. A headerless buffer has no dtype to read, so you declare it above — this tool never guesses one from the bytes. float32 and float64 only.

What this can and cannot tell you

Two output arrays do not say what produced them. Without the operation there is nothing to recompute, so this tool will not tell you which side is correct, or whether the gap is a legal floating-point reordering rather than a bug — those need information you have not given it, and guessing would be worse than useless. What it does tell you is exact: where the arrays first differ, by how many representable values, and in what way.

Equality here is bit equality, not ==. So +0 and −0 are reported as differing, two NaNs with the same bits are not, and an infinity against a finite value is never reported as a distance.

Guides

Plain-English walkthroughs of comparing floating-point outputs: ONNX vs PyTorch output mismatches, comparing two NumPy arrays, diffing two .npy files, and choosing an allclose tolerance. All guides →