NPU configuration need to make it work in a VM

Hi all
I’m experimenting to get my NPU working inside a VM (using incusos on framework Desktop).
My config is looking like:
- driver: ‘’
driver_version: ‘’
numa_node: 0
pci_address: 0000:c2:00.1
vendor: Advanced Micro Devices, Inc. [AMD]
vendor_id: ‘1022’
product: Strix/Krackan/Strix Halo Neural Processing Unit
product_id: 17f0
iommu_group: 22
vpd: {}

So the incusos host seems to be missing drivers. Is there a way to this working?

Are the drivers fully open source and redistributable? If so, maybe an application similar to gpu-support (npu-support?) could be a way to add the drivers to IncusOS.

That is a bit of an issue:

https://account.amd.com/en/forms/downloads/xef.html?filename=RAI_1.7.1_Linux_NPU_XRT.zip

requires a login at AMD due to export restrictions (U.S. Government Export Approval)

Unfortunately this means it likely won’t be possible for IncusOS to support your NPU. :slightly_frowning_face: The immutable nature of IncusOS prevents you from copying the drivers to the host system manually, and we handle GPU drivers via a special “application”, but all the drivers it includes are freely redistributable.

Depending on the IOMMU layout, you may be able to pass the NPU to a VM though given it’s likely a part of the CPU/SoC, I’d be kinda surprised if it was nicely isolated in its own IOMMU group…

Anyway, worth checking what else you have in group 22 if it’s the only device, then passing it to a VM which then loads the AMD driver should be fine.

res.txt (77.5 KB)
Looks like it is isolated in group 22

Okay, so on a VM you could try incus config device add MY-VM npu pci address=0000:c2:00.1 and see if that lets you pass it to the VM.

Looks promising. I do need more time to check (which I do not have on the short term :frowning: )