Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detection of Intel x86 AVX-VNNI instructions. #196

Merged
merged 1 commit into from
Nov 4, 2023

Commits on Nov 1, 2023

  1. Add detection of Intel x86 AVX-VNNI instructions.

    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
    ```
    qukhan committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    6671b72 View commit details
    Browse the repository at this point in the history