File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 69
69
"-DLLAMA_CLBLAST=ON"
70
70
] ;
71
71
} ;
72
+ packages . cuda = pkgs . stdenv . mkDerivation {
73
+ inherit name src meta postPatch nativeBuildInputs postInstall ;
74
+ buildInputs = with pkgs ; buildInputs ++ [ cudaPackages . cudatoolkit ] ;
75
+
76
+ # HACK(Green-Sky): nix currently has issues with cmake findcudatoolkit, so we force gnu make
77
+ # see https://github.com/NixOS/nixpkgs/issues/224291
78
+ dontUseCmakeConfigure = true ;
79
+ dontUseNinjaBuild = true ;
80
+
81
+ buildFlags = [ "LLAMA_CUBLAS=1" ] ;
82
+ installPhase = ''
83
+ mkdir -p $out/bin
84
+
85
+ # TODO(Green-Sky): add install target to Makefile, or wait for cmake support
86
+ mv main $out/bin/
87
+ mv server $out/bin/
88
+ mv speculative $out/bin/
89
+ mv perplexity $out/bin/
90
+ mv embedding $out/bin/
91
+ mv quantize $out/bin/
92
+ mv llama-bench $out/bin/
93
+ mv train-text-from-scratch $out/bin/
94
+ '' ;
95
+ } ;
72
96
packages . rocm = pkgs . stdenv . mkDerivation {
73
97
inherit name src meta postPatch nativeBuildInputs postInstall ;
74
98
buildInputs = with pkgs ; buildInputs ++ [ hip hipblas rocblas ] ;
You can’t perform that action at this time.
0 commit comments