simdinfo

command
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Command simdinfo reports which instruction-set tier the simd package selected on this machine, and which ones it could have used.

$ simdinfo
amd64 tier=avx512 available=[scalar sse2 avx2 avx512]

$ GOSIMD=sse2 simdinfo
amd64 tier=sse2 available=[scalar sse2 avx2 avx512] forced

$ SIMD_DISABLE=avx512 simdinfo
amd64 tier=avx2 available=[scalar sse2 avx2] disabled=[avx512]

It is the first thing to run when a benchmark or a numerical result looks wrong, and `simdinfo -tiers` drives the per-tier test matrix in the Makefile.

`simdinfo -require-accelerated` exits non-zero if the portable path was selected, which is what every emulated CI lane asserts before running the suite. That check exists because its absence cost two backends: the riscv64 and loong64 lanes were green for months while executing nothing at all, because the emulator in the image predated the vector extension and reported a CPU that had none. A suite that skips every accelerated tier passes, and looks exactly like one that tested them.

`simdinfo -argv0-probe` exits 7 and prints nothing. It exists because the paragraph above turned out to describe -require-accelerated itself: the qemu-user binaries this repo uses follow the binfmt_misc "preserve argv[0]" calling convention, `qemu <path> <argv0> <args...>`, so they consume the first argument as argv[0] and every flag after it shifts one place left. Under that convention `qemu simdinfo -require-accelerated` passes the guest an empty argument list, the assertion is never evaluated, and the lane exits 0 whatever the tier. A flag that must change the exit code is the only way to notice, since dropped flags are otherwise indistinguishable from flags that had nothing to say.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL