Interface autoconnections request for intel-npu-driver

Hello, I’m an engineer on Canonical’s Partner Engineering Intel squad. I just uploaded a new snap called intel-npu-driver under my personal account (wfrench) which is pending manual review. We eventually hope to publish this under Canonical (I will make a separate request for this).

You can find more details about the snap (including the snapcraft.yaml) in this repo: GitHub - canonical/intel-npu-driver-snap: Snap recipe for the Intel® NPU Driver (https://github.com/intel/linux-npu-driver/)

I would like to request autoconnections for these three plugs:

plugs:
  intel-npu-plug: 
    interface: custom-device
    custom-device: intel-npu-device
  intel-npu-kmod:
    interface: kernel-module-control
  intel-npu-fw:
    interface: kernel-firmware-control

Details for each:

  • intel-npu-plug: required by an app (used for validation) in the snap to access the NPU device char node in /dev/accel/. This is for convenience and seems low risk as access is limited within the custom-device slot definition.
  • intel-npu-kmod: the snap builds and ships firmware that must match the user mode driver version. In order to load the new firmware the intel_vpu kernel module most be reloaded. There is a daemon packaged in the snap that handles this. An autoconnection would be convenient and also help ensure that the snap is being deployed and used properly (e.g. without an autoconnection a user may accidentally forget to connect the interface and therefore not load the correct firmware for the NPU device).
  • intel-npu-fw: this interface allows the NPU firmware to be loaded from a custom path on the host. An autoconnection is requested for the same reasons as intel-npu-kmod: convenience and ensuring tight coupling of the firmware with the rest of the NPU stack.

Thank you!

Hey @wfrench

The requested interfaces looks reasonable for the snap functionality and they should be expected considering the snap name. Thus +1 from me for granting intel-npu-driver the requested auto-connections

Thanks

1 Like

Hey @wfrench

Revisiting this request, I wonder if there is a reason why kernel-module-load is not enough and kernel-module-control needs to be used intead

Revisiting this request, I wonder if there is a reason why kernel-module-load is not enough and kernel-module-control needs to be used intead

Hello @jslarraz

My impression from the docs on kernel-module-load is that it provides permissions only for loading a module but not for removing a module. Is that not the case? In our case the snap needs permissions to do:

rmmod intel_vpu
modprobe intel_vpu

I think you are right. Thanks for the info @wfrench :slight_smile:

1 Like

+1 from me as well for auto-connecting the custom-device, kernel-module-control and kernel-firmware-control interfaces for the intel-npu-driver snap given the purpose and functionality of the snap.

+2 votes for, 0 votes against, granting auto-connect of the custom-device, kernel-module-control and kernel-firmware-control interfaces. I have vetted the publisher. This is now live.

Let me know if there are any issues. Thanks!