llama-cpp: assert that only one of the *Support arguments is true
When experimenting with llama-cpp I experienced a mysterious build error that in the end I tracked down to me setting openclSupport and openblasSupport to true. To prevent others from this mistake add an assert that complains if more than one of the arguments openclSupport, openblasSupport and rocmSupport is set to true.
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
assert lib.assertMsg
|
||||
(lib.count lib.id [openclSupport openblasSupport rocmSupport] == 1)
|
||||
"llama-cpp: exactly one of openclSupport, openblasSupport and rocmSupport should be enabled";
|
||||
|
||||
let
|
||||
cudatoolkit_joined = symlinkJoin {
|
||||
name = "${cudaPackages.cudatoolkit.name}-merged";
|
||||
|
||||
Reference in New Issue
Block a user