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

Unsupported Hardware on VM with compatible CPU #207

Open
RomainCendre opened this issue Apr 7, 2022 · 3 comments
Open

Unsupported Hardware on VM with compatible CPU #207

RomainCendre opened this issue Apr 7, 2022 · 3 comments

Comments

@RomainCendre
Copy link

Hi everyone,
I'm having some issues with NNPack, but I didn't know where to start.
I'm getting the famous message Could not initialize NNPACK! Reason: Unsupported hardware that seems related to CPU that doesn't have AVX2 and 3-level cache. I also forgot to say that this error start since we were switching a virtual machine from CentOS to Ubuntu.
I start looking at CPU info inside the Ubuntu VM and it seems that AVX2 and cache are rightly detected.

So I'm wondering, can a library or something that can be missing that makes my CPU to be incorrectly driven?
Best regards

@RomainCendre
Copy link
Author

RomainCendre commented Apr 20, 2022

Also, the same code run perfectly on the host machine on Ubuntu 21 with NNPack... =/

@RomainCendre
Copy link
Author

So basically, the problem seems to be from VvirtualBox (something with AVX through virtualbox).
I didn't find the way to make it work from a Ubuntu host, but using VMWare player did the job instead.
Have a nice day

@spikeburton
Copy link

spikeburton commented Dec 23, 2022

I ran into a similar issue, and it was related to the L3 cache.

I am running an Ubuntu 22.04 VM using KVM/QEMU/libvirt, with an AMD Ryzen CPU. After adjusting the CPU settings for the VM, the cache size shown with lscpu looked correct and I no longer hit this issue:

<cpu mode='host-passthrough'>
    <topology sockets='1' dies='1' cores='4' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
</cpu>

In particular it is the topoext feature that was required with QEMU for the VM to be correctly aware of the CPU topology. As far as I am aware this is only relevant for AMD CPUs. Sharing in case this may help you or someone else.

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