Page 1 of 1

Tensorflow library compiled to use AVX Instructions

Posted: Tue Apr 16, 2024 3:12 pm
by Wilking

Hi there.

I have installed faceswap on my machine using the faceswap_setup_x64.sh but when I try to open it I get the following error message:

"The Tensorflow library was compiled to use AVX instructions, but these aren't available on your machine."

I am using Linux Mint 21.3 Virginia. I have an Intel Celeron CPU. I specified CPU when I installed the program.

Any help gratefully received!


Re: Tensorflow library compiled to use AVX Instructions

Posted: Tue Apr 16, 2024 5:45 pm
by torzdf

Unfortunately Tensorflow requires AVX support from your CPU to be able to be used. Your CPU does not appear to have this.

The only way around this is to compile Tensorflow 2.10 yourself without AVX support (or look for a custom Tensorflow 2.10 wheel that has been compiled without AVX support).

I would not recommend trying to compile Tensorflow unless you absolutely have to. It is not fun!


Re: Tensorflow library compiled to use AVX Instructions

Posted: Tue Apr 16, 2024 6:13 pm
by Wilking

Ah well. Thanks for the reply.


Re: Tensorflow library compiled to use AVX Instructions

Posted: Fri Apr 26, 2024 1:36 am
by stopparde01

I have the same problem.
I'm using a linux mint proxmox VM. I'm using an AMD 5700G and nvidia 3060.
If I do not use proxmox and directly install a linux distro (tried ubuntu and Zorin OS) on the same system everything works.
Is there any particular VM setting that needs to be used ?
Thx
--stoppa


Re: Tensorflow library compiled to use AVX Instructions

Posted: Fri Apr 26, 2024 1:54 am
by stopparde01

Ok, I found out the issue.
Just in case for people using proxmox (sorry if this is something basic/already known): When setting up your new or existing VM CPU, specify "host" instead of the default "x86-64-v2-AES ".
You may need to scroll down to the very end to see the "host" option. This will essentially use the cpu in your machine instead of emulating a cpu architecture.
Manual says it has some drawbacks, and of course it depends on your use case/HW configs.

--stoppa


Re: Tensorflow library compiled to use AVX Instructions

Posted: Thu May 02, 2024 5:45 am
by jargoman
Wilking wrote: Tue Apr 16, 2024 3:12 pm

Hi there.

I have installed faceswap on my machine using the faceswap_setup_x64.sh but when I try to open it I get the following error message:

"The Tensorflow library was compiled to use AVX instructions, but these aren't available on your machine."

I am using Linux Mint 21.3 Virginia. I have an Intel Celeron CPU. I specified CPU when I installed the program.

Any help gratefully received!

You have to do the opposite of what this person did and emulate a processor with avx support. Unless your cpu does in fact support avx. You can check this with:

cat /proc/cpuinfo | grep avx
if the command returns nothing then you don't have it.
You can run:
cat /proc/cpuinfo
If you're curious about what your processor does support.

If you do emulate it then you may have to disable virtualization optimization to keep your cpu from processing the instructions directly. Which means you have to fully virtualize a cpu. Which would be slow.

Or as someone said compile tensor flow without avx optimizations.

Either way If you want to run a.i on that processor you need a gpu.

If you're into a.i you're going to become obsessed with ridiculously over powered systems lol.

The problem is with a.i you need everything to be beefed up. Each step puts a heavy load on a different component.

I wish tensor flow would allow a person to use their full resources. I.e use dedicated nvidia gpu, integrated non nvidia gpu AND all cores of the processor. I imagine it would be a mess of spaghetti code to get it to work, let alone manage the resources efficiently.

If you have a gpu the processor barely does any work. You may be able to get away with it. Otherwise celerons are not suited for a.i. Only recently has hardware caught up with very old a.i algorithms