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

Missing AVX512_FP16 detection #278

Closed
damageboy opened this issue Oct 18, 2022 · 2 comments
Closed

Missing AVX512_FP16 detection #278

damageboy opened this issue Oct 18, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@damageboy
Copy link
Contributor

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?

@toor1245
Copy link
Contributor

@damageboy, thank you for the issue! No objection

@damageboy
Copy link
Contributor Author

@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

@gchatelet gchatelet added the enhancement New feature or request label Apr 27, 2023
@gchatelet gchatelet added this to the v0.8.0 milestone Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants