diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 6d766b5cc6..a1f365dade 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -76,4 +76,5 @@ libsolv-py = pkgs.callPackage ./libsolv-py.nix { }; tailscale = import ./tailscale pkgs.tailscale; + intel-oclcpuexp = pkgs.callPackage ./intel-oclcpuexp { }; } // (import ./heptapod-runner args) diff --git a/nix/pkgs/intel-oclcpuexp/default.nix b/nix/pkgs/intel-oclcpuexp/default.nix new file mode 100644 index 0000000000..42b0fca7d6 --- /dev/null +++ b/nix/pkgs/intel-oclcpuexp/default.nix @@ -0,0 +1,33 @@ +{ stdenv +, fetchurl +, tbb_2021_8 +, zlib +, autoPatchelfHook +, ... }: + +stdenv.mkDerivation rec { + pname = "intel-oclcpuexp"; + version = "2023.15.3.0.20"; + + src = fetchurl { + url = "https://github.com/intel/llvm/releases/download/2023-WW13/oclcpuexp-2023.15.3.0.20_rel.tar.gz"; + sha256 = "sha256:1mib1zm0hf8sgznsbmv9i84g7m17064abgkh50s3rp2fl66j5iwl"; + }; + + buildInputs = [ + tbb_2021_8 + zlib + autoPatchelfHook + ]; + + doBuild = false; + doCheck = false; + + installPhase = '' + install -d -m0755 $out/lib + cp * $out/lib + + install -d -m0755 $out/etc/OpenCL/vendors + echo $out/lib/libintelocl.so > $out/etc/OpenCL/vendors/${pname}.icd + ''; +} diff --git a/ops/nixos/porcorosso/default.nix b/ops/nixos/porcorosso/default.nix index 93916c1c89..f9a022beb3 100644 --- a/ops/nixos/porcorosso/default.nix +++ b/ops/nixos/porcorosso/default.nix @@ -180,7 +180,8 @@ in { services.xserver.videoDrivers = lib.mkForce [ "intel" ]; hardware.nvidia.modesetting.enable = lib.mkForce false; hardware.nvidia.prime.offload.enable = lib.mkForce false; - boot.initrd.kernelModules = lib.mkForce []; + hardware.nvidia.prime.sync.enable = lib.mkForce false; + boot.initrd.kernelModules = lib.mkForce [ "zfs" "spl" "dm_mod" ]; }; services.xserver.displayManager.gdm = { enable = true; @@ -199,6 +200,8 @@ in { hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages = with pkgs; [ intel-media-driver libva + # intel-compute-runtime # intel gpu + depot.nix.pkgs.intel-oclcpuexp ]; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; hardware.acpilight.enable = true;