File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 3434 rocmGpuTargets ? builtins . concatStringsSep ";" rocmPackages . clr . gpuTargets ,
3535 enableCurl ? true ,
3636 useVulkan ? false ,
37+ buildAllCudaFaQuants ? false ,
3738 llamaVersion ? "0.0.0" , # Arbitrary version, substituted by the flake
3839
3940 # It's necessary to consistently use backendStdenv when building with CUDA support,
9596 clr
9697 hipblas
9798 rocblas
99+ llvm . lld
100+ llvm . bintools
98101 ] ;
99102
100103 vulkanBuildInputs = [
@@ -160,7 +163,8 @@ effectiveStdenv.mkDerivation (finalAttrs: {
160163 buildInputs =
161164 optionals effectiveStdenv . isDarwin darwinBuildInputs
162165 ++ optionals useCuda cudaBuildInputs
163- ++ optionals useMpi [ mpi ]
166+ ++ optionals ( useMpi && ! useRocm ) [ mpi ]
167+ ++ optionals ( useMpi && useRocm ) [ rocmPackages . mpi ]
164168 ++ optionals useRocm rocmBuildInputs
165169 ++ optionals useBlas [ blas ]
166170 ++ optionals useVulkan vulkanBuildInputs
@@ -187,10 +191,12 @@ effectiveStdenv.mkDerivation (finalAttrs: {
187191 builtins . concatStringsSep ";" ( map dropDot cudaCapabilities )
188192 )
189193 )
194+ ( cmakeBool "GGML_CUDA_FA_ALL_QUANTS" buildAllCudaFaQuants )
190195 ]
191196 ++ optionals useRocm [
192197 ( cmakeFeature "CMAKE_HIP_COMPILER" "${ rocmPackages . llvm . clang } /bin/clang" )
193198 ( cmakeFeature "CMAKE_HIP_ARCHITECTURES" rocmGpuTargets )
199+ ( cmakeBool "GGML_CUDA_FA_ALL_QUANTS" buildAllCudaFaQuants )
194200 ]
195201 ++ optionals useMetalKit [
196202 ( lib . cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1" )
You can’t perform that action at this time.
0 commit comments