Detecting AVX

Detecting AVX


I have a processor with the next brand string: "Intel Core i7 CPU M 620 @ 2.67GHz"

I have read that i7 CPU-s supports AVX technology. I wrote a program that detects cpu features by cpuid instructon. The program says that this processor DOESN'T supports AVX. When I check the result of cat /proc/cpuinfo in linux, avx is missing from the flags. What is the problem?

Thank You for Your help!

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I beleive this is a generation before Sandy Bridge. It does not support AVX. Processor with AVX support are mainly launched in 2011.

I see. I browsed the list of "2nd Generation Core i7 Processors", but i didn't find processors with avx. Or in 2nd generation the avx is a default feature?

Thats true. But you should have Win7 SP1 also. Win7 does not support AVX.

That CPU does not support AVX, just AES.

You can use this C code to detect AVX and other features on the processor:

#define OSXSAVEFlag (1UL<<27)
#define AVXFlag     ((1UL<<28)|OSXSAVEFlag)
#define FMAFlag     ((1UL<<12)|AVXFlag|OSXSAVEFlag)
#define CLMULFlag   ((1UL<< 1)|AVXFlag|OSXSAVEFlag)
#define VAESFlag    ((1UL<<25)|AVXFlag|OSXSAVEFlag)

inline bool SimdDetectFeature(U32 idFeature)
	int EAX, EBX, ECX, EDX;
	cpuid(0, EAX, EBX, ECX, EDX);
	if((ECX & idFeature) != idFeature)
		return false;
	return true;

Leave a Comment

Please sign in to add a comment. Not a member? Join today