Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

Detecting AVX

smidla
Beginner
6,659 Views
Hi!

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!
0 Kudos
5 Replies
Brijender_B_Intel
6,659 Views
I beleive this is a generation before Sandy Bridge. It does not support AVX. Processor with AVX support are mainly launched in 2011.
http://ark.intel.com/products/family/59143
0 Kudos
smidla
Beginner
6,659 Views
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?
0 Kudos
Brijender_B_Intel
6,659 Views
Thats true. But you should have Win7 SP1 also. Win7 does not support AVX.
0 Kudos
levicki
Valued Contributor I
6,659 Views
That CPU does not support AVX, just AES.
http://ark.intel.com/products/43560
0 Kudos
Pourya_Shirazian
Beginner
6,659 Views
You can use this C code to detect AVX and other features on the processor:
[cpp]
#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;
}
[/cpp]

0 Kudos
Reply