Lorenz Bucher
|
Re: Intel Advanced Vector Extensions Support (AVX)
|
Lorenz Bucher
04/26/2011 10:32 AM
post85235
|
Re: Intel Advanced Vector Extensions Support (AVX)
Hmmm... thanks for your input.
I tried running my program at highest priority, but I don't think that's the issue, since the program already crashes
when trying to execute the first AVX intrinsic...
My complete test program:
#include <iostream>
#include <immintrin.h> // AVX instrinsics
int main( int argc, char** argv )
{
__m256 var;
__m256 var2;
__m256 result;
var = _mm256_set1_ps(1.f);
var2 = _mm256_set1_ps(3.f);
result = _mm256_add_ps(var,var2);
return 0;
}
Doesn't get any simpler than that...
|
|
|
Armin Steinhoff
|
Re: Intel Advanced Vector Extensions Support (AVX)
|
Armin Steinhoff
04/26/2011 11:02 AM
post85238
|
Re: Intel Advanced Vector Extensions Support (AVX)
Mario Charest wrote:
>> Hi
>>
>> I have an Intel Sandy Bridge-based system up-and-running...
>> (cf. topic: http://community.qnx.com/sf/discussion/do/listPosts/projects.bsp/
>> discussion.bsp.topc20053)
>>
>> I decided to try out some AVX instructions and wrote a small program that uses
>> AVX intrinsics... but my program keeps crashing in Momentics (SIGILL "illegal
>> instruction").
>> I figure this is due to the OS not supporting the AVX instruction set yet.
>>
>> Wikipedia says on its AVX page: "AVX adds new register-state through the 256-
>> bit wide YMM register-file, so explicit operating system support is required
>> to properly save& restore AVX's new registers between context switches."
>>
>> Now my question (for the kernel team?): (When) will Neutrino support this
>> instruction set? Is there a roadmap for this?
> Just an educated guess. If this is like floating point instruction, OS support is only needed if you have more then
one thread using this. You may be running into other issue like alignment (xmm stuff is picky). To test this theory,
have your program disable all interupt, run a highest priority and not make any kernel calls during the calculations and
see if the crash still occurs. If it does then it most likely NOT an OS issue.
The AVX extension must be enabled by the kernel or driver ... also the
libc must support the AVX extension (dynamic linker ..)
You need also the version 4.4.2 of gcc ...
--Armin
|
|
|