Doublevector always uses SSE path instead of AVX
log in

Advanced search

Message boards : Development : Doublevector always uses SSE path instead of AVX

Author Message
Xavier Wallece
Send message
Joined: 25 May 20
Posts: 3
Credit: 6,865,109
RAC: 0
Message 2105 - Posted: 25 Nov 2020, 23:13:01 UTC

Good day Today,

After looking into https://bitbucket.org/francesco-asnicar/pc-boinc/src/master/ and compiling the code myself in ubuntu, I noticed that de DoubleVector always uses the SSE code and not the AVX code.


file: DoubleVector.hpp
staring at Line: 60
#ifdef __AVX__
#ifdef __FMA__
#ifdef __AVX2__
#pragma message "Using FMA+AVX2 instructions"
#else
#pragma message "Using FMA+AVX instructions"
#endif
#else
#pragma message "Using AVX instructions"
#endif

typedef AvxDoubleVector DoubleVectorLong;
typedef SseDoubleVector DoubleVector;
#elif defined (__SSE2__)

Changed line 72 to:
typedef AvxDoubleVector DoubleVector;



It seems that haswell in 2017 was not very performant with AVX at the time and therefor it was disabled.

Running the compiled verion as follows:
bin/pc input/tile2.txt output/output2.txt 0.05 1 100000 0

The avx realtime is 22 second, the SSE version realtime is 32 seconds under ubuntu in hyper-v.
This only helps if the 5th parameter (100000) is large enough. If it is small like the test_run.sh scripts it almost makes no difference.

Could someone verify that the compiled gene_pcim_v1.11_win64__avx.exe is running in SSE instead of AVX mode?

Profile valterc
Project administrator
Project tester
Send message
Joined: 30 Oct 13
Posts: 616
Credit: 34,514,943
RAC: 395
Italy
Message 2108 - Posted: 26 Nov 2020, 11:23:28 UTC - in response to Message 2105.
Last modified: 26 Nov 2020, 11:24:52 UTC

The Windows source code is exactly the same of the Linux one, it was compiled using gcc/MinGW so I guess the behavior is the same.

Also keep in mind that the second-last command line parameter of the application is the number of columns in the input dataset. Right now, with the current experiment (FANTOM, hgnc_data_mat.csv), this number is 1829 (and this is the largest dataset that we ever used).

I suggest, if you want to benchmark the application in a real case, to download the small validation suite I provided: https://gene.disi.unitn.it/test/files/gene_validation.zip

Xavier Wallece
Send message
Joined: 25 May 20
Posts: 3
Credit: 6,865,109
RAC: 0
Message 2115 - Posted: 27 Nov 2020, 7:34:18 UTC

I'm looking into it and see that it is running several sets. Each set runs for about 13 seconds. After that a new set begins.

I'm going to test the avx/SSE doublevector code in the pc algorithem part.
But it is allready heavely optimized.

I also understand why avx does not always help, the algoritem parts it needs to go though are small so it cannot strech it legs.


Post to thread

Message boards : Development : Doublevector always uses SSE path instead of AVX


Main page · Your account · Message boards


Copyright © 2024 CNR-TN & UniTN