x/sys/cpu: add detection of AVX-VNNI, AVX-VNNI-INT8, AVX-IFMA #71142
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
LibraryProposal
Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Proposal Details
Motivation
These are features in modern x86 CPUs that enable speedups in computations related to tensors, and, more specifically, accelerate neural network / AI workloads.
While they are not used in Go directly, certain projects written in Go make use of the
x/sys/cpu
package to change their behavior based on the CPU features (for example, Ollama selects the model runner that best matches the CPU).Adding the ability to detect these features will allow such projects to make use of these CPU features (e.g. ollama will be able to select a runner built with VNNI support, something that it can't do now without resorting to parsing
/proc/cpuinfo
or similar ugly solutions)Proposal
Add the following members to the
cpu.X86
struct incpu.go
:With the following way to fill them in
cpu_x86.go
:Please note that I used Wikipedia for reference here, so the CPUID bits might be off.
The text was updated successfully, but these errors were encountered: