fo40225 / tensorflow-windows-wheel

Tensorflow prebuilt binary for Windows
3.66k stars 1.53k forks source link

What different between AVX2 and x86_64 SIMD? #7

Open Thaiph1308 opened 6 years ago

Thaiph1308 commented 6 years ago

Sorry for my bad English. I'm new to learn Python and Deep Learning field. Can you explain what different between SIMD AVX2 and x86_64 SIMD version?

I have a computer with core i7 8550u and MX150 GPU, which version should I choose? I used AVX2 (because I read the intel manual that says my CPU support AVX2, but when I install it and try with MNIST, I took around 7-8s per Epoch, it's just a little bit better than I run MNIST on CPU (8s) and I saw that GPU usage just around 15-20%) Is this normal? Thank you a lot.

ageorgiev97 commented 6 years ago

Currently I think there is no CUDA for MX150 so the option you have is to train on CPU. There are two versions avaible for cpu 1.7.0\py36\CPU\sse2 and 1.7.0\py36\CPU\avx2 as you found out. The AVX2 is supposed to be better because its specialized instruction set for vector operations and its newer. So I recomend you to use the 1.7.0\py36\CPU\avx2. It's normal that GPU usage is low when you're training on cpu.

fo40225 commented 6 years ago

If you are using a GPU version, choosing sse2 or avx2 does not significantly affect speed. This is because the calculations are on the GPU and not on the CPU.

MNIST is a simple task, so GPU usage is low, you can try to use more complex models like ResNet and more complex tasks like cifar-10, you can observe the difference between CPU and GPU.

fo40225 commented 6 years ago

@ageorgiev97

MX150 have CUDA capability, you have two options to install the CUDA runtime.

Thaiph1308 commented 6 years ago

@fo40225 @ageorgiev97 Thank you, I have some info for everyone who is using MX150 GPU. MX150 have CUDA (but I don't know why Nvidia document ignore it in CUDA support list) MX150 run well on CUDA 9.1, I tried CUDA 9.0 but it doesn't work (maybe I wrong in some step)