Skip to content

Missing AVX512_FP16 detection #278

Closed

Description

@damageboy

Unless I'm throughly wrong here, cpu_features seems to be missing detection of AVX512_FP16?

For example, the intel docs for AVX512_FP16 state that:

image

From: https://www.sandpile.org/x86/ref_docs.htm

Yes, the current code-base does not look for CPUID.(7.0).EDX[23] at all:

if (os_preserves->avx512_registers) {
features->avx512f = IsBitSet(leaf_7.ebx, 16);
features->avx512cd = IsBitSet(leaf_7.ebx, 28);
features->avx512er = IsBitSet(leaf_7.ebx, 27);
features->avx512pf = IsBitSet(leaf_7.ebx, 26);
features->avx512bw = IsBitSet(leaf_7.ebx, 30);
features->avx512dq = IsBitSet(leaf_7.ebx, 17);
features->avx512vl = IsBitSet(leaf_7.ebx, 31);
features->avx512ifma = IsBitSet(leaf_7.ebx, 21);
features->avx512vbmi = IsBitSet(leaf_7.ecx, 1);
features->avx512vbmi2 = IsBitSet(leaf_7.ecx, 6);
features->avx512vnni = IsBitSet(leaf_7.ecx, 11);
features->avx512bitalg = IsBitSet(leaf_7.ecx, 12);
features->avx512vpopcntdq = IsBitSet(leaf_7.ecx, 14);
features->avx512_4vnniw = IsBitSet(leaf_7.edx, 2);
features->avx512_4vbmi2 = IsBitSet(leaf_7.edx, 3);
features->avx512_second_fma = HasSecondFMA(info);
features->avx512_4fmaps = IsBitSet(leaf_7.edx, 3);
features->avx512_bf16 = IsBitSet(leaf_7_1.eax, 5);
features->avx512_vp2intersect = IsBitSet(leaf_7.edx, 8);
}

Is there any objection that I open a PR to add this for cpu_features?

Activity

  1. toor1245 commented on Oct 18, 2022

    @toor1245
    Contributor

    @damageboy, thank you for the issue! No objection

  2. damageboy commented on Oct 18, 2022

    @damageboy
    ContributorAuthor

    @toor1245 looks working on my end, PR includes listing for tiger-lake + alder-lake and show this working as expected.
    I will need some sort of maintainer approval to run the pipeline

  3. added
    enhancement
    on Apr 27, 2023
  4. added this to the v0.8.0 milestone on Apr 27, 2023
  5. added a commit that references this issue on Feb 18, 2024
    8ca7c65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions