Created
December 20, 2024 12:52
-
-
Save rsyuzyov/917df4920579c248ed7960ba7f63978e to your computer and use it in GitHub Desktop.
proxmox cpu support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| flags=$(cat /proc/cpuinfo | grep flags | head -n 1 | cut -d: -f2) | |
| supports_v2='awk "/cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/ {found=1} END {exit !found}"' | |
| supports_v3='awk "/avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/ {found=1} END {exit !found}"' | |
| supports_v4='awk "/avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/ {found=1} END {exit !found}"' | |
| echo "$flags" | eval $supports_v2 || exit 2 && echo "CPU supports x86-64-v2" | |
| echo "$flags" | eval $supports_v3 || exit 3 && echo "CPU supports x86-64-v3" | |
| echo "$flags" | eval $supports_v4 || exit 4 && echo "CPU supports x86-64-v4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment