Tensorflow library compiled to use AVX Instructions

Installing and setting up FaceSwap


Forum rules

Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.

Post Reply
User avatar
Wilking
Posts: 2
Joined: Tue Apr 16, 2024 1:39 pm

Tensorflow library compiled to use AVX Instructions

Post 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!

User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Tensorflow library compiled to use AVX Instructions

Post 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!

My word is final

User avatar
Wilking
Posts: 2
Joined: Tue Apr 16, 2024 1:39 pm

Re: Tensorflow library compiled to use AVX Instructions

Post by Wilking »

Ah well. Thanks for the reply.

User avatar
stopparde01
Posts: 4
Joined: Sun Oct 10, 2021 4:04 pm
Been thanked: 1 time

Re: Tensorflow library compiled to use AVX Instructions

Post 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

User avatar
stopparde01
Posts: 4
Joined: Sun Oct 10, 2021 4:04 pm
Been thanked: 1 time

Re: Tensorflow library compiled to use AVX Instructions

Post 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

User avatar
jargoman
Posts: 1
Joined: Thu May 02, 2024 4:58 am

Re: Tensorflow library compiled to use AVX Instructions

Post 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

Post Reply