katago: 1.5.0 -> 1.6.0

This commit is contained in:
Michael Reilly 2020-08-23 17:00:52 -04:00
parent f9a5d8539d
commit 9d7a579b2e
2 changed files with 27 additions and 9 deletions

View file

@ -13,17 +13,25 @@
, opencl-headers ? null
, ocl-icd ? null
, gperftools ? null
, eigen ? null
, gpuEnabled ? true
, useAVX2 ? false
, cudaSupport ? false
, useTcmalloc ? true}:
assert !gpuEnabled -> (
eigen != null &&
!cudaSupport);
assert cudaSupport -> (
libGL_driver != null &&
cudatoolkit != null &&
cudnn != null);
assert !cudaSupport -> (
opencl-headers != null &&
ocl-icd != null);
!gpuEnabled || (
opencl-headers != null &&
ocl-icd != null));
assert useTcmalloc -> (
gperftools != null);
@ -35,13 +43,13 @@ let
in env.mkDerivation rec {
pname = "katago";
version = "1.5.0";
version = "1.6.0";
src = fetchFromGitHub {
owner = "lightvector";
repo = "katago";
rev = "${version}";
sha256 = "0ajdjdmlzwh7zwk5v0k9zzjawgkf7w30pzqp5bhcsdqz4svvyll2";
rev = "v${version}";
sha256 = "1r84ws2rj7j8085v1cqffy9rg65rzrhk6z8jbxivqxsmsgs2zs48";
};
nativeBuildInputs = [
@ -52,10 +60,12 @@ in env.mkDerivation rec {
buildInputs = [
libzip
boost
] ++ lib.optionals cudaSupport [
] ++ lib.optionals (!gpuEnabled) [
eigen
] ++ lib.optionals (gpuEnabled && cudaSupport) [
cudnn
libGL_driver
] ++ lib.optionals (!cudaSupport) [
] ++ lib.optionals (gpuEnabled && !cudaSupport) [
opencl-headers
ocl-icd
] ++ lib.optionals useTcmalloc [
@ -64,9 +74,13 @@ in env.mkDerivation rec {
cmakeFlags = [
"-DNO_GIT_REVISION=ON"
] ++ lib.optionals cudaSupport [
] ++ lib.optionals (!gpuEnabled) [
"-DUSE_BACKEND=EIGEN"
] ++ lib.optionals useAVX2 [
"-DUSE_AVX2=ON"
] ++ lib.optionals (gpuEnabled && cudaSupport) [
"-DUSE_BACKEND=CUDA"
] ++ lib.optionals (!cudaSupport) [
] ++ lib.optionals (gpuEnabled && !cudaSupport) [
"-DUSE_BACKEND=OPENCL"
] ++ lib.optionals useTcmalloc [
"-DUSE_TCMALLOC=ON"

View file

@ -24383,6 +24383,10 @@ in
cudatoolkit = cudatoolkit_10_2;
};
katagoCPU = katago.override {
gpuEnabled = false;
};
klavaro = callPackage ../games/klavaro {};
kobodeluxe = callPackage ../games/kobodeluxe { };