-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
nixos/hardware/intel: add opencl option #219657
Conversation
OpenCL on intel is messy, I believe this is the support table as it currently exists:
Footnotes |
Thanks for the table! Should we make |
That is probably the best approach, perhaps another option to use |
That then belongs into nixos-hardware propably. |
config = lib.mkIf config.hardware.intel.opencl.enable { | ||
hardware.opengl.extraPackages = with pkgs; [ | ||
intel-compute-runtime | ||
intel-ocl |
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.
Having that under video is not fully correct, as it also has parts that only use the CPU, it is more general intel hardware.
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 should also update https://github.com/NixOS/nixpkgs/blob/6f558d3009c20cd2decc5b36057f78a033a6ff11/nixos/doc/manual/configuration/gpu-accel.chapter.md#intel-sec-gpu-accel-opencl-intel and possible
nixpkgs/nixos/modules/hardware/opengl.nix
Line 119 in 6f558d3
example = literalExpression "with pkgs; [ intel-media-driver intel-ocl vaapiIntel ]"; |
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.
@Mic92 could you rebase this and address the issues raised?
); | ||
default = null; | ||
description = '' | ||
Select the Intel OpenCL runtime to use. Choose your runtime based on your Intel CPU/GPU generation. |
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 consider this option documentation, also it's the same amount of code to add stuff to extraPackages, this one makes it easier to discover what needs to be done to get opencl running on a given Intel CPU.
Done. Anything else? |
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.
LGTM, but this probably is too minimal to have its own module
I agree with NixOS/nixos-hardware#992 (comment) and I feel like small modules like this can be merged into a big and general intel module.
If we would make a cut and ignore anything older than broadwell, this could probably just be part of an igpu module instead? I am not sure how relevant opencl was in previous generations... |
Perhaps this module could be moved as-is to gpu? Like nixos/modules/services/hardware/amdgpu.nix Edit: Oops, amdgpu is not under gpu directory, but maybe it should be? |
Sounds good. If someone wants to take over, feel free. I might get back to this later otherwise. |
Description of changes
Part of NixOS/nixos-hardware#573
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)