Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell if a Linux machine supports AVX/AVX2 instructions?

I'm on SUSE Linux Enterprise 10/11 machines. I launch my regressions to a farm of machines running Intel processors. Some of my tests fail because my tools are built using a library which requires AVX/AVX2 instruction support. I get an Illegal exception error.

In Linux, is there any commands I can use to determine what is the CPU code/family name?

I believe AVX and AVX2 are available onward from Intel SandyBridge and Haswell family, respectively.

like image 384
user4979733 Avatar asked May 27 '16 09:05

user4979733


People also ask

How do I know if my computer supports AVX2?

To know if your CPU supports AVX, hit the Windows key, search for windows system information and look for your CPU model from this pop-up window. Then, go to the manufacturer's website, and with the help of the model number, find out whether your CPU model supports AVX or not.

Does my CPU support AVX instructions?

CPUs with AVX Generally, CPUs with the commercial denomination Core i3/i5/i7/i9 support them, whereas Pentium and Celeron CPUs before Tiger Lake do not.

Does AVX2 support AVX?

A processor that supports AVX2 is backward compatible with AVX, and a processor with AVX-512 is also backward compatible with AVX2 and AVX. Refer to Intel® Instruction Set Extensions Technology for more information.

How do I enable AVX support?

To make sure that AVX is enabled, do the following: Open your Windows Power Shell in Admin mode. In the command line type: bcdedit /set xsavedisable 0 (do NOT set this value to a number other than zero!). You should get feedback that the operation was successfully completed.


1 Answers

Run this command:

grep avx /proc/cpuinfo 

Or

grep avx2 /proc/cpuinfo 

This will give you:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx avx2 hypervisor lahf_lm arat tsc_adjust xsaveopt

like image 162
khrm Avatar answered Sep 20 '22 09:09

khrm