Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avx perfomance degradation compared to SSE #49

Closed
teor292 opened this issue Mar 19, 2018 · 7 comments
Closed

Avx perfomance degradation compared to SSE #49

teor292 opened this issue Mar 19, 2018 · 7 comments

Comments

@teor292
Copy link
Contributor

teor292 commented Mar 19, 2018

Hi. I test some neural network with AVX2, AVX and SSE instructions and found that AVX is less perfomance than even SSE. I think this is a problem or maybe AVX is meaningless for neural network (or my type of neural network).

@ermig1979
Copy link
Owner

Hi. Could you to let know your info about your CPU ?

@teor292
Copy link
Contributor Author

teor292 commented Mar 19, 2018

I test it on two cpu: Intel Core I5-2500k and Intel Xeon CPU E3-1225 V3

@ermig1979
Copy link
Owner

ermig1979 commented Mar 19, 2018

Is the performance decreasing strong?
If it is about 98-102% - then it is a measure error. Some of neural functions are limited by bandwidth of memory. So performance boosting is achieved when you use small image size which can be placed in CPU cache. In test framework try to use parameters -w=640 -h =480 instead of default values -w=1920 -h=1080.

@teor292
Copy link
Contributor Author

teor292 commented Mar 19, 2018

It is not strong, but AVX has 256 bit and SSE 128 bit, so I think it must be faster, not slower in any case. I test it not on test framework, but with my test program. For first image SSE give me 0.45 ms time and AVX 0.55 ms (on I5), for the second image (neural was the same, but with different input size of image) AVX 1.43 ms and SSE 1.38 ms (on Xeon). Of cource I can disable AVX, but I think that such results are strange.

@ermig1979
Copy link
Owner

What is the function?

@teor292
Copy link
Contributor Author

teor292 commented Mar 19, 2018

NeuralSimple.txt
Here is simplify test function and neural architecture. It get 0.278 ms for AVX and 0.266 for SSE (and AVX2 get the same result as SSE).

@ermig1979
Copy link
Owner

Neural is depricated now. Use Synet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants