Skip to content

Commit

Permalink
Add ZLUDA to AMD config
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Oct 15, 2024
1 parent c7619f3 commit 1e372bf
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/nixos/environment/amd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
}: {
imports = [
./rocm.nix
./zluda.nix
];

options.amd.enable = lib.mkEnableOption "Setup amd tools";

config = lib.mkIf config.amd.enable {
amd.rocm.enable = lib.mkDefault false;
amd = {
rocm.enable = lib.mkDefault false;
zluda.enable = lib.mkDefault false;
};

services.xserver.videoDrivers = ["amdgpu"];

Expand Down
40 changes: 40 additions & 0 deletions modules/nixos/environment/amd/zluda.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
pkgs,
config,
lib,
...
}: {
options.amd.zluda.enable = lib.mkEnableOption "ZLUDA: alternative for CUDA but for AMD";

config = lib.mkIf config.amd.zluda.enable {
environment.systemPackages = with pkgs; [
zluda
];

# systemd.tmpfiles.rules = let
# rocmEnv = pkgs.symlinkJoin {
# name = "rocm-combined";
# paths = with pkgs.rocmPackages_5; [
# clr
# llvm.lld
# hipcc
# hipfft
# hipsolver
# hipblas
# rocblas
# rocalution
# rocfft
# rocm-runtime
# rocrand
# rocsparse
# rocsolver
# rccl
# miopen
# ];
# };
# in [
# "L+ /opt/rocm - - - - ${rocmEnv}"
# "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
# ];
};
}

0 comments on commit 1e372bf

Please sign in to comment.