Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Questions on AVX backwards compatability (SSE)

TyMac
Beginner
619 Views

Will code that was formerly complied in a generic format for SSE run with out modification on AVX?

0 Kudos
12 Replies
Kittur_G_Intel
Employee
619 Views

Hi,

Yes and ensure that the target system you run that compiled application contains the SSE version you compiled the app with.

-Kittur

0 Kudos
TyMac
Beginner
619 Views

What if the linux verison does not have support for AVX in the kernel? Will the application still be able to see and use them?

0 Kudos
Kittur_G_Intel
Employee
619 Views

Hi,

SIMD extensions and SSE thereof require support from the operating system (kernel of course) so the registers are handled properly by the OS. That said, as long as the OS supports the SSE you've compiled the application for it should run fine even if that kernel has no support for AVX. If you compile the application for avx, then you'll need to have a minimum kernel version to support avx instructions for that matter.

You can run "%cat /proc/cpuinfo" on your system and check the flags settings in the output. If it says avx then that system supports avx and likewise you can check for sse versions too.

Does that answer your question?

_Kittur

0 Kudos
TyMac
Beginner
619 Views

Thanks :) Yes that make sense - I geuss too much sense :) Thanks for your time!

0 Kudos
Kittur_G_Intel
Employee
619 Views

Thanks :-)

0 Kudos
Bernard
Black Belt
619 Views

On Windows OS handling (saving ) SSE and AVX floating point context is done by the kernel.

0 Kudos
Kittur_G_Intel
Employee
619 Views

Good point Iliayapolak, yes whenever there's context switching from one process to another the simd registers will have to be saved while whatever was saved before for the new active process needs to be restored.....:-)

_Kittur

0 Kudos
TimP
Black Belt
619 Views
iliyapolak wrote:

On Windows OS handling (saving ) SSE and AVX floating point context is done by the kernel.

That's the point on which running AVX on an OS which doesn't support it (XP or Win7 without SP) could prove unreliable or insecure even if it appears to work.
0 Kudos
Kittur_G_Intel
Employee
619 Views

Tim, that's something a user using AVX or SSE should be aware of, thanks.

0 Kudos
TyMac
Beginner
619 Views

I think in older linux kernels the user to kernel context switch could not be handled by SSE. In other words the registers would loose / over write their data. I am not sure if this has been fixed.... I would be interested to know at what kernel revision it was.

0 Kudos
TimP
Black Belt
619 Views

You would go back more than 15 years to find a kernel without sse support.  Red hat and centos 5.x are still in use while lacking avx support.

0 Kudos
Bernard
Black Belt
619 Views

Tim Prince wrote:

Quote:

iliyapolak wrote:

On Windows OS handling (saving ) SSE and AVX floating point context is done by the kernel.

 


That's the point on which running AVX on an OS which doesn't support it (XP or Win7 without SP) could prove unreliable or insecure even if it appears to work.

Regarding Win 7 if I remember correctly KeSaveFloatingPointState() function was responsible for saving YMM register context,but I need to check it.

0 Kudos
Reply