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

CPUID and NFD support: AVX_VNNI #106

Closed
ionutnechita opened this issue Jul 8, 2022 · 9 comments
Closed

CPUID and NFD support: AVX_VNNI #106

ionutnechita opened this issue Jul 8, 2022 · 9 comments

Comments

@ionutnechita
Copy link

ionutnechita commented Jul 8, 2022

Hi NFD Team,

I have ADL CPU, but i not have AVX_VNNI in label list.
I have v0.11.0 image and this issue is observed.

This ticket is imported from NFD project.
kubernetes-sigs/node-feature-discovery#844

{
"beta.kubernetes.io/arch": "amd64",
"beta.kubernetes.io/os": "linux",
"feature.node.kubernetes.io/cpu-cpuid.ADX": "true",
"feature.node.kubernetes.io/cpu-cpuid.AESNI": "true",
"feature.node.kubernetes.io/cpu-cpuid.AVX": "true",
"feature.node.kubernetes.io/cpu-cpuid.AVX2": "true",
"feature.node.kubernetes.io/cpu-cpuid.CETIBT": "true",
"feature.node.kubernetes.io/cpu-cpuid.CETSS": "true",
"feature.node.kubernetes.io/cpu-cpuid.CMPXCHG8": "true",
"feature.node.kubernetes.io/cpu-cpuid.FMA3": "true",
"feature.node.kubernetes.io/cpu-cpuid.FXSR": "true",
"feature.node.kubernetes.io/cpu-cpuid.FXSROPT": "true",
"feature.node.kubernetes.io/cpu-cpuid.IBPB": "true",
"feature.node.kubernetes.io/cpu-cpuid.LAHF": "true",
"feature.node.kubernetes.io/cpu-cpuid.MOVBE": "true",
"feature.node.kubernetes.io/cpu-cpuid.MOVDIR64B": "true",
"feature.node.kubernetes.io/cpu-cpuid.MOVDIRI": "true",
"feature.node.kubernetes.io/cpu-cpuid.OSXSAVE": "true",
"feature.node.kubernetes.io/cpu-cpuid.SCE": "true",
"feature.node.kubernetes.io/cpu-cpuid.SERIALIZE": "true",
"feature.node.kubernetes.io/cpu-cpuid.SHA": "true",
"feature.node.kubernetes.io/cpu-cpuid.STIBP": "true",
"feature.node.kubernetes.io/cpu-cpuid.VMX": "true",
"feature.node.kubernetes.io/cpu-cpuid.WAITPKG": "true",
"feature.node.kubernetes.io/cpu-cpuid.X87": "true",
"feature.node.kubernetes.io/cpu-cpuid.XSAVE": "true",
"feature.node.kubernetes.io/cpu-hardware_multithreading": "true",
"feature.node.kubernetes.io/cpu-model.family": "6",
"feature.node.kubernetes.io/cpu-model.id": "154",
"feature.node.kubernetes.io/cpu-model.vendor_id": "Intel",
"feature.node.kubernetes.io/cpu-pstate.scaling_governor": "powersave",
"feature.node.kubernetes.io/cpu-pstate.status": "active",
"feature.node.kubernetes.io/cpu-pstate.turbo": "true",
"feature.node.kubernetes.io/cpu-rdt.RDTL2CA": "true",
"feature.node.kubernetes.io/kernel-config.NO_HZ": "true",
"feature.node.kubernetes.io/kernel-config.NO_HZ_IDLE": "true",
"feature.node.kubernetes.io/kernel-version.full": "5.15.0-40-generic",
"feature.node.kubernetes.io/kernel-version.major": "5",
"feature.node.kubernetes.io/kernel-version.minor": "15",
"feature.node.kubernetes.io/kernel-version.revision": "0",
"feature.node.kubernetes.io/pci-0300_8086.present": "true",
"feature.node.kubernetes.io/pci-0300_8086.sriov.capable": "true",
"feature.node.kubernetes.io/storage-nonrotationaldisk": "true",
"feature.node.kubernetes.io/system-os_release.ID": "ubuntu",
"feature.node.kubernetes.io/system-os_release.VERSION_ID": "22.04",
"feature.node.kubernetes.io/system-os_release.VERSION_ID.major": "22",
"feature.node.kubernetes.io/system-os_release.VERSION_ID.minor": "04",
"gpu.intel.com/cards": "card0",
"kubernetes.io/arch": "amd64",
"kubernetes.io/hostname": "10.10.10.10",
"kubernetes.io/os": "linux",
"node-role.kubernetes.io/worker": "true"
}

cpuid -1 | grep AVX-VNNI
AVX-VNNI: AVX VNNI neural network instrs = true
This CPU feature is not implemented in NFD?

BR,
Ionut Nechita
ionutnechita

@klauspost
Copy link
Owner

AVX512VNNI is detected. However, your CPU does not appear to enable this, or it isn't picked up.

Could you post the output from running the latest release binary?

@klauspost
Copy link
Owner

I do not believe a non-avx512 version of this exists.

@ionutnechita
Copy link
Author

ionutnechita commented Jul 11, 2022

I need to reopen this ticket.

For ADL using cpuid-Linux_x86_64_2.0.14.tar.gz:

./cpuid
Name: 12th Gen Intel(R) Core(TM) i7-12800HE
Vendor String: GenuineIntel
Vendor ID: Intel
PhysicalCores: 20
Threads Per Core: 1
Logical Cores: 20
CPU Family 6 Model: 154
Features: ADX,AESNI,AVX,AVX2,BMI1,BMI2,CETIBT,CETSS,CLMUL,CMOV,CMPXCHG8,CX16,ERMS,F16C,FMA3,FXSR,FXSROPT,IBPB,LAHF,LZCNT,MMX,MMXEXT,MOVBE,MOVDIR64B,MOVDIRI,NX,OSXSAVE,PCONFIG,POPCNT,RDRAND,RDSEED,RDTSCP,SCE,SERIALIZE,SHA,SSE,SSE2,SSE3,SSE4,SSE42,SSSE3,STIBP,TME,VMX,WAITPKG,X87,XGETBV1,XSAVE,XSAVEC,XSAVEOPT,XSAVES
Microarchitecture level: 3
Cacheline bytes: 64
L1 Instruction Cache: 65536 bytes
L1 Data Cache: 32768 bytes
L2 Cache: 2097152 bytes
L3 Cache: 25165824 bytes
Frequency: 2600000000 Hz
Boost Frequency: 3500000000 Hz

CPUID LINUX: cpuid-linux-binary.txt

AVX-VNNI: AVX VNNI neural network instrs = true

AVX512 is not supported on this CPU. But AVX-VNNI is supported.

@klauspost
Copy link
Owner

@ionutnechita Why? Your CPU or OS does not support AVX512, so VNNI cannot be used. there is only avx512 vnni.

@ionutnechita
Copy link
Author

And with this referrence: https://en.wikipedia.org/wiki/Alder_Lake

AVX-VNNI, a VEX-coded variant of AVX512-VNNI for 256-bit vectors

@ionutnechita
Copy link
Author

I think is necessary to reopen this ticket and review my file: cpuid-linux-binary.txt.

A good day.

@klauspost
Copy link
Owner

Added in #110

@ionutnechita
Copy link
Author

It's fine now:

Name: 12th Gen Intel(R) Core(TM) i9-12900E
Vendor String: GenuineIntel
Vendor ID: Intel
PhysicalCores: 12
Threads Per Core: 2
Logical Cores: 24
CPU Family 6 Model: 151
Features: ADX,AESNI,AVX,AVX2,AVXVNNI,BMI1,BMI2,CETIBT,CETSS,CLMUL,CMOV,CMPXCHG8,CX16,ERMS,F16C,FMA3,FXSR,FXSROPT,GFNI,HRESET,HTT,IBPB,LAHF,LZCNT,MMX,MMXEXT,MOVBE,MOVDIR64B,MOVDIRI,NX,OSXSAVE,PCONFIG,POPCNT,RDRAND,RDSEED,RDTSCP,SCE,SERIALIZE,SHA,SSE,SSE2,SSE3,SSE4,SSE42,SSSE3,STIBP,STOSB_SHORT,TME,VAES,VMX,VPCLMULQDQ,WAITPKG,X87,XGETBV1,XSAVE,XSAVEC,XSAVEOPT,XSAVES
Microarchitecture level: 3
Cacheline bytes: 64
L1 Instruction Cache: 32768 bytes
L1 Data Cache: 49152 bytes
L2 Cache: 1310720 bytes
L3 Cache: 31457280 bytes
Frequency: 2300000000 Hz
Boost Frequency: 5000000000 Hz

@ionutnechita
Copy link
Author

Thank you for this fix.

A good day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants