-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
intel-npu-driver: init at 1.13.0 #382756
base: master
Are you sure you want to change the base?
intel-npu-driver: init at 1.13.0 #382756
Conversation
I created a flake for it, and verified the firmware worked well. |
($device eq "0x7d1d" || $device eq "0xad1d" || | ||
$device eq "0x643e" || $device eq "0xb03e"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PCI ID are copied from the intel_vpu linux driver module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have trivial change requests, package seems sufficiently up to standard otherwise.
The NPU firmware is strictly connected with NPU compiler and driver. This is a problem, because whenever you want to use newer driver, ex. upcoming v1.14.0 release, then you should use the same firmware from the release as well. If the firmware is not matched with compiler, then we do not guarantee that all works correctly. Best would be to have a common package - firmware, driver and compiler. That is why the NPU firmware never reached the linux-firmware repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I question this entire module. It just does to little to be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just trying to get rid of the firmware loading error at the first place, while according to @jwludzik, other packages are also required to get NPU really work, I think it's good to keep the module to install all related packages together.
@@ -196,6 +196,11 @@ sub pciCheck { | |||
($device eq "0x4229" || $device eq "0x4230" || | |||
$device eq "0x4222" || $device eq "0x4227"); | |||
|
|||
push @attrs, "hardware.cpu.intel.enableNpuFirmware = true;" if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend
push @attrs, "hardware.cpu.intel.enableNpuFirmware = true;" if | |
push @attrs, "hardware.firmware = [ pkgs.intel-npu-firmware ];" if |
Thank you guys for reviewing this, I am changing this to WIP for packaging related driver and compiler as well. |
4d7bb9c
to
2d2b4c4
Compare
inherit (intel-npu-driver) version src; | ||
pname = "intel-npu-firmware"; | ||
|
||
installPhase = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to compile everything again? why not just copy it to a separate output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought inheriting version and src will not cause building intel-npu-driver
, let me re-organize this.
passthru = { | ||
inherit standalone; | ||
|
||
level-zero = stdenv.mkDerivation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the justification that we cannot use our system level-zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow missed it, will remove this whole part.
mkInstallPhase = lib.concatMapStringsSep "\n" ( | ||
component: "cmake --install . --component ${component} --prefix $out" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot use installTarget?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I failed to find the make targets to do identical stuffs than this, I guess we just use this --component
option here.
Only support the standalone build.
2d2b4c4
to
74fcd25
Compare
Packaging the Intel NPU firmware (for Linux kernel module: intel_vpu).
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.