Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add detection of Intel x86 AVX-VNNI instructions. (#196)
Tested using Intel SDE: ``` bash scripts/local-build.sh OPTIONS=() PLATFORMS=() OPTIONS+=(-quark); PLATFORMS+=("Quark") OPTIONS+=(-p4); PLATFORMS+=("Pentium4") OPTIONS+=(-p4p); PLATFORMS+=("Pentium4 Prescott") OPTIONS+=(-mrm); PLATFORMS+=("Merom") OPTIONS+=(-pnr); PLATFORMS+=("Penryn") OPTIONS+=(-nhm); PLATFORMS+=("Nehalem") OPTIONS+=(-wsm); PLATFORMS+=("Westmere") OPTIONS+=(-snb); PLATFORMS+=("Sandy Bridge") OPTIONS+=(-ivb); PLATFORMS+=("Ivy Bridge") OPTIONS+=(-hsw); PLATFORMS+=("Haswell") OPTIONS+=(-bdw); PLATFORMS+=("Broadwell") OPTIONS+=(-slt); PLATFORMS+=("Saltwell") OPTIONS+=(-slm); PLATFORMS+=("Silvermont") OPTIONS+=(-glm); PLATFORMS+=("Goldmont") OPTIONS+=(-glp); PLATFORMS+=("Goldmont Plus") OPTIONS+=(-tnt); PLATFORMS+=("Tremont") OPTIONS+=(-snr); PLATFORMS+=("Snow Ridge") OPTIONS+=(-skl); PLATFORMS+=("Skylake") OPTIONS+=(-cnl); PLATFORMS+=("Cannon Lake") OPTIONS+=(-icl); PLATFORMS+=("Ice Lake") OPTIONS+=(-skx); PLATFORMS+=("Skylake server") OPTIONS+=(-clx); PLATFORMS+=("Cascade Lake") OPTIONS+=(-cpx); PLATFORMS+=("Cooper Lake") OPTIONS+=(-icx); PLATFORMS+=("Ice Lake server") OPTIONS+=(-knl); PLATFORMS+=("Knights landing") OPTIONS+=(-knm); PLATFORMS+=("Knights mill") OPTIONS+=(-tgl); PLATFORMS+=("Tiger Lake") OPTIONS+=(-adl); PLATFORMS+=("Alder Lake") OPTIONS+=(-mtl); PLATFORMS+=("Meteor Lake") OPTIONS+=(-rpl); PLATFORMS+=("Raptor Lake") OPTIONS+=(-spr); PLATFORMS+=("Sapphire Rapids") OPTIONS+=(-gnr); PLATFORMS+=("Granite Rapids") OPTIONS+=(-srf); PLATFORMS+=("Sierra Forest") OPTIONS+=(-grr); PLATFORMS+=("Grand Ridge") OPTIONS+=(-future); PLATFORMS+=("Future chip") SDE_BIN="path/to/sde" for I in "${!PLATFORMS[@]}"; do echo "${PLATFORMS["${I}"]}" "${SDE_BIN}" "${OPTIONS[$I]}" -- ./build/local/isa-info | grep "AVXVNNI" done ``` Result: ``` Quark [error] Merom [error] Penryn [error] Nehalem [error] Westmere AVXVNNI: no Sandy Bridge AVXVNNI: no Ivy Bridge AVXVNNI: no Haswell AVXVNNI: no Broadwell AVXVNNI: no Saltwell [error] Silvermont AVXVNNI: no Goldmont AVXVNNI: no Goldmont Plus AVXVNNI: no Tremont AVXVNNI: no Snow Ridge AVXVNNI: no Skylake AVXVNNI: no Cannon Lake AVXVNNI: no Ice Lake AVXVNNI: no Skylake server AVXVNNI: no Cascade Lake AVXVNNI: no Cooper Lake AVXVNNI: no Ice Lake server AVXVNNI: no Knights landing AVXVNNI: no Knights mill AVXVNNI: no Tiger Lake AVXVNNI: no Alder Lake AVXVNNI: yes Meteor Lake AVXVNNI: yes Raptor Lake AVXVNNI: yes Sapphire Rapids AVXVNNI: yes Granite Rapids AVXVNNI: yes Sierra Forest AVXVNNI: yes Grand Ridge AVXVNNI: yes Future chip AVXVNNI: yes ```
- Loading branch information