mirror of
				https://github.com/ItsDrike/nixdots
				synced 2025-11-04 02:46:36 +00:00 
			
		
		
		
	amdgpu: Enable OpenCL & HIP
This commit is contained in:
		
							parent
							
								
									b371662ad0
								
							
						
					
					
						commit
						0f76593d32
					
				
					 1 changed files with 17 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -22,13 +22,24 @@ in
 | 
			
		|||
      vulkan-extension-layer
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    # Enable OpenGL
 | 
			
		||||
    hardware.graphics = {
 | 
			
		||||
    hardware = {
 | 
			
		||||
      graphics = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
 | 
			
		||||
      # Enable OpenCL and AMDVLK
 | 
			
		||||
        # Enable AMDVLK (AMD's open-source Vulkan driver)
 | 
			
		||||
        extraPackages = with pkgs; [ amdvlk ];
 | 
			
		||||
        extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      # OpenCL (Universal GPU computing API - not AMD specific)
 | 
			
		||||
      # To check if this works, run: `nix run nixpkgs#clinfo` (after rebooting)
 | 
			
		||||
      opengl.extraPackages = with pkgs; [rocmPackages.clr.icd];
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # HIP (SDK that allows running CUDA code on AMD GPUs)
 | 
			
		||||
    # Most software has the paths hard-coded
 | 
			
		||||
    systemd.tmpfiles.rules = [
 | 
			
		||||
        "L+    /opt/rocm/hip   -    -    -     -    ${pkgs.rocmPackages.clr}"
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue